-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
346 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1 @@ | ||
[ | ||
{ | ||
"id":"ranked", | ||
"name": "_ranked", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_ranked.jpg", | ||
"description": "_ranked_description", | ||
"gamemodes": [ | ||
{ | ||
"id": "world_tour", | ||
"name": "_world_tour", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_ranked_world_tour.jpg", | ||
"description": "_world_tour_description", | ||
"rpc": "_world_tour_rpc" | ||
}, | ||
{ | ||
"id": "ranked_cashout", | ||
"name": "_ranked_cashout", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_ranked_cashout.jpg", | ||
"description": "_ranked_cashout_description", | ||
"rpc": "_ranked_cashout_rpc" | ||
} | ||
] | ||
}, | ||
{ | ||
"id":"casual", | ||
"name": "_casual", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_casual.jpg", | ||
"description": "_casual_description", | ||
"gamemodes": [ | ||
{ | ||
"id": "casual_quick_cash", | ||
"name": "_casual_quick_cash", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_casual_quick_cash.png", | ||
"description": "_casual_quick_cash_description", | ||
"rpc": "_casual_quick_cash_rpc" | ||
}, | ||
{ | ||
"id": "casual_bank_it", | ||
"name": "_casual_bank_it", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_casual_bank_it.png", | ||
"description": "_casual_bank_it_description", | ||
"rpc": "_casual_bank_it_rpc" | ||
}, | ||
{ | ||
"id": "casual_power_shift", | ||
"name": "_casual_power_shift", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_casual_power_shift.png", | ||
"description": "_casual_power_shift_description", | ||
"rpc": "_casual_power_shift_rpc" | ||
}, | ||
{ | ||
"id": "casual_terminal_attack", | ||
"name": "_casual_terminal_attack", | ||
"image": "https://alexisl61.github.io/Games_RichPresence/assets/the_finals/gamemodes/the_finals_casual_terminal_attack.png", | ||
"description": "_casual_terminal_attack_description", | ||
"rpc": "_casual_terminal_attack_rpc" | ||
} | ||
] | ||
} | ||
] | ||
[] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
games_richpresence/lib/components/helldivers/molecules/panels/large_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import 'package:flutter/widgets.dart'; | ||
|
||
class HelldiversLargePanel extends StatelessWidget { | ||
final Color? borderColor; | ||
final String title; | ||
final String subtitle; | ||
final Widget? icon; | ||
final Widget? child; | ||
final String description; | ||
|
||
const HelldiversLargePanel( | ||
{super.key, | ||
this.borderColor, | ||
required this.title, | ||
required this.subtitle, | ||
this.icon, | ||
this.child, | ||
required this.description}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
width: 400, | ||
decoration: BoxDecoration( | ||
color: Color.fromRGBO(0, 0, 0, 0.8), | ||
border: Border.all( | ||
color: borderColor ?? Color(0xFF30302f), | ||
width: 2, | ||
), | ||
), | ||
child: Padding( | ||
padding: const EdgeInsets.all(18), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Row( | ||
children: [ | ||
if (icon != null) icon!, | ||
if (icon != null) SizedBox(width: 20), | ||
Expanded( | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text( | ||
subtitle, | ||
style: TextStyle( | ||
color: Color.fromRGBO(120, 120, 116, 1), | ||
fontSize: 14, | ||
), | ||
), | ||
Text( | ||
title, | ||
style: TextStyle( | ||
color: Color.fromRGBO(255, 255, 255, 1), | ||
fontSize: 20, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
], | ||
)) | ||
], | ||
), | ||
SizedBox(height: 10), | ||
Text(description, | ||
style: TextStyle( | ||
color: Color.fromRGBO(255, 255, 255, 1), | ||
fontSize: 16, | ||
)), | ||
if (child != null) SizedBox(height: 20), | ||
if (child != null) child!, | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
games_richpresence/lib/components/helldivers/molecules/panels/planet_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:games_richpresence/model/class/game_activities/helldivers/faction.dart'; | ||
import 'package:games_richpresence/model/class/game_activities/helldivers/planets.dart'; | ||
|
||
class HelldiversPlanetPanel extends StatelessWidget { | ||
final HelldiversPlanet planet; | ||
|
||
const HelldiversPlanetPanel({super.key, required this.planet}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
width: 400, | ||
decoration: BoxDecoration( | ||
color: Color.fromRGBO(0, 0, 0, 0.8), | ||
border: Border.all( | ||
color: Color(0xFFc9c9cb), | ||
width: 2, | ||
), | ||
), | ||
child: Column( | ||
children: [ | ||
Row( | ||
children: [ | ||
Image(image: AssetImage(planet.owner.icon), width: 70, height: 70), | ||
SizedBox(width: 20), | ||
Expanded( | ||
child: Column( | ||
children: [ | ||
Text( | ||
planet.name, | ||
style: TextStyle( | ||
color: planet.owner.color, | ||
fontSize: 20, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
SizedBox(width: 10), | ||
Text( | ||
planet.sector, | ||
style: TextStyle( | ||
color: planet.owner.color, | ||
fontSize: 14, | ||
), | ||
), | ||
], | ||
)), | ||
Image.network( | ||
planet.biomeImage, | ||
width: 400, | ||
height: 200, | ||
fit: BoxFit.cover, | ||
errorBuilder: (context, error, stackTrace) => Container( | ||
width: 400, | ||
height: 200, | ||
color: Color(0xFF3F3F3F), | ||
), | ||
), | ||
], | ||
) | ||
], | ||
)); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
games_richpresence/lib/model/class/game_activities/helldivers/faction.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:games_richpresence/gen/assets.gen.dart'; | ||
|
||
enum HelldiversFactions { | ||
humans, | ||
terminids, | ||
automatons; | ||
|
||
static HelldiversFactions fromString(String faction) { | ||
switch (faction) { | ||
case 'Humans': | ||
return HelldiversFactions.humans; | ||
case 'Terminids': | ||
return HelldiversFactions.terminids; | ||
case 'Automatons': | ||
return HelldiversFactions.automatons; | ||
} | ||
throw Exception('Unknown faction: $faction'); | ||
} | ||
} | ||
|
||
extension HelldiversFactionsExtension on HelldiversFactions { | ||
String get icon { | ||
switch (this) { | ||
case HelldiversFactions.humans: | ||
return Assets.helldivers.images.superhearthIcon.path; | ||
case HelldiversFactions.terminids: | ||
return Assets.helldivers.images.terminidIcon.path; | ||
case HelldiversFactions.automatons: | ||
return Assets.helldivers.images.automatonIcon.path; | ||
} | ||
} | ||
|
||
Color get color { | ||
switch (this) { | ||
case HelldiversFactions.humans: | ||
return const Color(0xFFa7daeb); | ||
case HelldiversFactions.terminids: | ||
return const Color(0xFFfe6d72); | ||
case HelldiversFactions.automatons: | ||
return const Color(0xFFffc100); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
games_richpresence/lib/model/class/game_activities/helldivers/planets.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import 'package:games_richpresence/model/class/game_activities/helldivers/faction.dart'; | ||
|
||
class HelldiversPlanet { | ||
final int id; | ||
final String name; | ||
final String sector; | ||
final String biomeImage; | ||
final Position position; | ||
final HelldiversFactions owner; | ||
|
||
HelldiversPlanet( | ||
{required this.id, | ||
required this.name, | ||
required this.sector, | ||
required this.biomeImage, | ||
required this.position, | ||
required this.owner}); | ||
} | ||
|
||
class Position { | ||
final double x; | ||
final double y; | ||
|
||
Position({required this.x, required this.y}); | ||
} |
Oops, something went wrong.