Merge remote-tracking branch 'origin/master'
continuous-integration/drone/push Build is passing Details

master
Jules LASCRET 11 months ago
commit 35134c2bbc

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

@ -20,7 +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 !");
Navigation.PushAsync(new SetPlayers()); Shell.Current.GoToAsync("SetPlayers");
//Navigation.PushAsync(new SetPlayers());
} }
public async void OnContinueClicked(object sender, EventArgs e) public async void OnContinueClicked(object sender, EventArgs e)
@ -29,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();
}
} }

@ -9,8 +9,8 @@ public partial class GoBack : ContentView
InitializeComponent(); InitializeComponent();
} }
private async void Button_OnClicked(object? sender, EventArgs e) private void Button_OnClicked(object? sender, EventArgs e)
{ {
await Navigation.PopToRootAsync(); Navigation.PopAsync();
} }
} }
Loading…
Cancel
Save