now goBack fucking works ! better dirty than not working
continuous-integration/drone/push Build is passing Details

master
rportet 11 months ago
parent 6ea1bdc7f0
commit 0a34f4bc43

@ -19,8 +19,8 @@ namespace Qwirkle
InitializeComponent(); InitializeComponent();
MainPage = new NavigationPage(new MainPage()); //MainPage = new NavigationPage(new MainPage());
//MainPage = new AppShell(); MainPage = new AppShell();
Routing.RegisterRoute(nameof(SetPlayers), typeof(SetPlayers)); Routing.RegisterRoute(nameof(SetPlayers), typeof(SetPlayers));
Routing.RegisterRoute(nameof(Gameboard), typeof(Gameboard)); Routing.RegisterRoute(nameof(Gameboard), typeof(Gameboard));

@ -20,8 +20,8 @@ namespace Qwirkle
{ {
DisplayAlert("Game notification", "Enter minimun 2 player and max 4 player !", "Ok ! Lets's go !"); DisplayAlert("Game notification", "Enter minimun 2 player and max 4 player !", "Ok ! Lets's go !");
Shell.Current.GoToAsync("SetPlayers");
Navigation.PushAsync(new SetPlayers()); //Navigation.PushAsync(new SetPlayers());
} }
public async void OnContinueClicked(object sender, EventArgs e) public async void OnContinueClicked(object sender, EventArgs e)
@ -30,7 +30,8 @@ namespace Qwirkle
try try
{ {
((App)Application.Current!).Game = gameLoad.LoadGame(); ((App)Application.Current!).Game = gameLoad.LoadGame();
await Navigation.PushAsync(new Gameboard()); await Shell.Current.GoToAsync("Gameboard");
//await Navigation.PushAsync(new Gameboard());
} }
catch catch
{ {

@ -252,5 +252,10 @@ public partial class Gameboard : ContentPage
Navigation.PushAsync(new Rules()); Navigation.PushAsync(new Rules());
} }
private void OnButtonSettingsClicked(object? sender, EventArgs e)
{
Navigation.PushAsync(new Settings());
}
} }

@ -62,6 +62,7 @@
HorizontalOptions="Start" HorizontalOptions="Start"
Grid.Row="2" Grid.Column="1" Grid.Row="2" Grid.Column="1"
Text="Settings" Text="Settings"
Clicked="OnButtonSettingsClicked"
ToolTipProperties.Text="Click to check your settings -_-" ToolTipProperties.Text="Click to check your settings -_-"
Style="{StaticResource GameButton}" /> Style="{StaticResource GameButton}" />

@ -53,7 +53,8 @@ public partial class SetPlayers : ContentPage
game.StartGame(); game.StartGame();
game.GiveTilesToPlayers(); game.GiveTilesToPlayers();
game.SetNextPlayer(); game.SetNextPlayer();
Navigation.PushAsync(new Gameboard()); Shell.Current.GoToAsync("Gameboard");
//Navigation.PushAsync(new Gameboard());
} }

@ -6,9 +6,4 @@ public partial class Settings : ContentPage
{ {
InitializeComponent(); InitializeComponent();
} }
public void OnGoBackClicked(object sender, EventArgs e)
{
Navigation.PopAsync();
}
} }
Loading…
Cancel
Save