From d16d488477ce02681dcea077d10212c46ed427f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Mouyon?= Date: Fri, 7 Jun 2024 10:15:10 +0200 Subject: [PATCH] revert branch by remy without sound revert fix the navigation in gameboard --- Qwirkle/QwirkleViews/App.xaml.cs | 1 - Qwirkle/QwirkleViews/MainPage.xaml.cs | 2 +- Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs | 6 +----- Qwirkle/QwirkleViews/Pages/Gameboard.xaml | 1 - Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs | 2 +- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Qwirkle/QwirkleViews/App.xaml.cs b/Qwirkle/QwirkleViews/App.xaml.cs index 62a72ef..bb478eb 100644 --- a/Qwirkle/QwirkleViews/App.xaml.cs +++ b/Qwirkle/QwirkleViews/App.xaml.cs @@ -22,7 +22,6 @@ namespace Qwirkle MainPage = new AppShell(); Routing.RegisterRoute(nameof(SetPlayers), typeof(SetPlayers)); - Routing.RegisterRoute(nameof(Settings), typeof(Settings)); Routing.RegisterRoute(nameof(Gameboard), typeof(Gameboard)); Routing.RegisterRoute(nameof(Rules), typeof(Rules)); Routing.RegisterRoute(nameof(MainPage), typeof(MainPage)); diff --git a/Qwirkle/QwirkleViews/MainPage.xaml.cs b/Qwirkle/QwirkleViews/MainPage.xaml.cs index fe69cba..e4bfe0f 100644 --- a/Qwirkle/QwirkleViews/MainPage.xaml.cs +++ b/Qwirkle/QwirkleViews/MainPage.xaml.cs @@ -20,7 +20,7 @@ namespace Qwirkle { DisplayAlert("Game notification", "Enter minimun 2 player and max 4 player !", "Ok ! Lets's go !"); - Shell.Current.GoToAsync("SetPlayers"); + Navigation.PushAsync(new SetPlayers()); } public async void OnContinueClicked(object sender, EventArgs e) diff --git a/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs b/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs index e338b6b..b3eb3e0 100644 --- a/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs +++ b/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs @@ -249,11 +249,7 @@ public partial class Gameboard : ContentPage private void OnButtonBookClicked(object? sender, EventArgs e) { - Shell.Current.GoToAsync("Rules"); - } - private void OnButtonSettingsClicked(object? sender, EventArgs e) - { - Shell.Current.GoToAsync("Settings"); + Navigation.PushAsync(new Rules()); } diff --git a/Qwirkle/QwirkleViews/Pages/Gameboard.xaml b/Qwirkle/QwirkleViews/Pages/Gameboard.xaml index 008959e..80f91e2 100644 --- a/Qwirkle/QwirkleViews/Pages/Gameboard.xaml +++ b/Qwirkle/QwirkleViews/Pages/Gameboard.xaml @@ -65,7 +65,6 @@ HorizontalOptions="Start" Grid.Row="2" Grid.Column="1" Text="Settings" - Clicked="OnButtonSettingsClicked" ToolTipProperties.Text="Click to check your settings -_-" Style="{StaticResource GameButton}" /> diff --git a/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs b/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs index e843be3..9bcced0 100644 --- a/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs +++ b/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs @@ -53,7 +53,7 @@ public partial class SetPlayers : ContentPage game.StartGame(); game.GiveTilesToPlayers(); game.SetNextPlayer(); - Shell.Current.GoToAsync("Gameboard"); + Navigation.PushAsync(new Gameboard()); }