-
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
17 changed files
with
279 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
[ | ||
{ | ||
"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" | ||
} | ||
] | ||
} | ||
] |
10 changes: 10 additions & 0 deletions
10
api/v1/helldivers/translations/available_translations.json
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,10 @@ | ||
[ | ||
{ | ||
"id":"en", | ||
"name":"English" | ||
}, | ||
{ | ||
"id":"fr", | ||
"name":"Français" | ||
} | ||
] |
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,30 @@ | ||
{ | ||
"_ranked": "Ranked", | ||
"_ranked_description": "Compete against other players in a ranked match.", | ||
"_casual": "Casual", | ||
"_casual_description": "Play a casual match with your friends.", | ||
|
||
"_world_tour": "World Tour", | ||
"_world_tour_description": "Compete in themed cashout.", | ||
"_world_tour_rpc": "Competing in world tour", | ||
|
||
"_ranked_cashout": "Tournament", | ||
"_ranked_cashout_description": "Compete in a tournament", | ||
"_ranked_cashout_rpc": "Competing in a tournament", | ||
|
||
"_casual_quick_cash": "Quick Cash", | ||
"_casual_quick_cash_description": "3v3v3 cashout", | ||
"_casual_quick_cash_rpc": "In quick cashout", | ||
|
||
"_casual_bank_it": "Bank It", | ||
"_casual_bank_it_description": "Bank coins scattered throughout the arena", | ||
"_casual_bank_it_rpc": "Banking coins in bank it", | ||
|
||
"_casual_power_shift": "Power Shift", | ||
"_casual_power_shift_description": "Escort a platform through the arena.", | ||
"_casual_power_shift_rpc": "Escorting a platform in power shift", | ||
|
||
"_casual_terminal_attack": "Terminal Attack", | ||
"_casual_terminal_attack_description": "Take turns defending and attacking an objective", | ||
"_casual_terminal_attack_rpc": "In terminal attack" | ||
} |
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,6 @@ | ||
{ | ||
"_ranked": "Classé", | ||
"_ranked_description": "Affrontez d'autres joueurs dans un match classé.", | ||
"_casual": "Non-classé", | ||
"_casual_description": "Jouez un match non-classé avec vos amis." | ||
} |
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.
23 changes: 23 additions & 0 deletions
23
games_richpresence/lib/components/helldivers/background/background.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,23 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:games_richpresence/gen/assets.gen.dart'; | ||
|
||
class HelldiversBackground extends StatefulWidget { | ||
final Widget child; | ||
|
||
const HelldiversBackground({super.key, required this.child}); | ||
|
||
@override | ||
State<HelldiversBackground> createState() => _HelldiversBackgroundState(); | ||
} | ||
|
||
class _HelldiversBackgroundState extends State<HelldiversBackground> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
width: MediaQuery.of(context).size.width, | ||
height: MediaQuery.of(context).size.height, | ||
decoration: BoxDecoration(image: DecorationImage(image: Assets.helldivers.images.background.provider())), | ||
child: widget.child, | ||
); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
40 changes: 40 additions & 0 deletions
40
games_richpresence/lib/model/class/user_data/helldivers_user_data.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,40 @@ | ||
import 'package:games_richpresence/model/class/user_data/user_data.dart'; | ||
import 'package:games_richpresence/model/class/user_group/helldivers/group.dart'; | ||
|
||
class HelldiversUserData extends UserData { | ||
HelldiversGroup? group; | ||
|
||
String Function(String) onlineTranslate; | ||
|
||
HelldiversUserData({this.group, required this.onlineTranslate}); | ||
|
||
@override | ||
String? getRpcDetails() { | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
String? getRpcLargeImageKey() { | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
String? getRpcLargeImageText() { | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
String? getRpcSmallImageKey() { | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
String? getRpcSmallImageText() { | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
String? getRpcState() { | ||
throw UnimplementedError(); | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
games_richpresence/lib/model/class/user_group/helldivers/group.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,5 @@ | ||
class HelldiversGroup { | ||
int groupSize; | ||
|
||
HelldiversGroup({required this.groupSize}); | ||
} |
33 changes: 33 additions & 0 deletions
33
games_richpresence/lib/pages/helldivers/home/home_page.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,33 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:games_richpresence/components/helldivers/background/background.dart'; | ||
import 'package:games_richpresence/model/class/user_data/user_data.dart'; | ||
import 'package:games_richpresence/model/mvvm/widget_event_observer.dart'; | ||
import 'package:games_richpresence/pages/helldivers/home/home_page_view_model.dart'; | ||
|
||
class HelldiversHomePage extends StatefulWidget { | ||
final Function(UserData) updateRpc; | ||
const HelldiversHomePage({super.key, required this.updateRpc}); | ||
|
||
@override | ||
State<HelldiversHomePage> createState() => _HelldiversHomePageState(); | ||
} | ||
|
||
class _HelldiversHomePageState extends WidgetEventObserver<HelldiversHomePage> { | ||
late HelldiversHomePageViewModel viewModel; | ||
|
||
@override | ||
void initState() { | ||
// TODO: implement initState | ||
super.initState(); | ||
viewModel = HelldiversHomePageViewModel(updateRpc: widget.updateRpc); | ||
viewModel.subscribe(this); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return HelldiversBackground( | ||
child: Column( | ||
children: [], | ||
)); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
games_richpresence/lib/pages/helldivers/home/home_page_view_model.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,35 @@ | ||
import 'package:games_richpresence/model/class/game_activities/the_finals/gamemode.dart'; | ||
import 'package:games_richpresence/model/class/user_data/the_finals_user_data.dart'; | ||
import 'package:games_richpresence/model/class/user_data/user_data.dart'; | ||
import 'package:games_richpresence/model/class/user_group/the_finals/group.dart'; | ||
import 'package:games_richpresence/model/mvvm/view_events/push_route_event.dart'; | ||
import 'package:games_richpresence/model/mvvm/view_model.dart'; | ||
import 'package:games_richpresence/pages/the_finals/gamemodes/gamemodes_categories_page.dart'; | ||
import 'package:games_richpresence/pages/the_finals/group/group_page.dart'; | ||
import 'package:games_richpresence/services/online_translation_service.dart'; | ||
import 'package:get_it/get_it.dart'; | ||
|
||
class HelldiversHomePageViewModel extends EventViewModel { | ||
late TheFinalsUserData userData; | ||
|
||
final GetIt getIt = GetIt.instance; | ||
late OnlineTranslationsService translationService; | ||
Function(UserData) updateRpc; | ||
|
||
HelldiversHomePageViewModel({OnlineTranslationsService? translationService, required this.updateRpc}) { | ||
this.translationService = translationService ?? getIt.get<OnlineTranslationsService>(); | ||
userData = TheFinalsUserData(group: null, onlineTranslate: this.translationService.onlineTranslate); | ||
} | ||
|
||
void onGroupClicked() async { | ||
userData.group = await notify(PushRouteEvent(TheFinalsGroupPage.route)) as TheFinalsGroup?; | ||
notify(); | ||
updateRpc(userData); | ||
} | ||
|
||
void onActivityClick() async { | ||
userData.gamemode = await notify(const PushRouteEvent(TheFinalsGamemodesCategoriesPage.route)) as TheFinalsGamemode?; | ||
notify(); | ||
updateRpc(userData); | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
games_richpresence/lib/pages/the_finals/home/home_page_view_model.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
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