diff --git a/TheGameExtreme/view/GamePreparationPage.xaml b/TheGameExtreme/view/GamePreparationPage.xaml
index 81c8fc7..29c0ef1 100644
--- a/TheGameExtreme/view/GamePreparationPage.xaml
+++ b/TheGameExtreme/view/GamePreparationPage.xaml
@@ -35,28 +35,36 @@
-
+ Grid.ColumnSpan="2">
+
+ Grid.Column="0"
+ Margin="50,0,50,0">
+ BackgroundColor="{DynamicResource SkyBlueColor}"
+ SelectedIndexChanged="ChangedPseudo"
+ Margin="50,0,50,0"/>
+ Grid.Column="1"
+ Margin="50,0,50,0"
+ x:Name="NameList">
+ Grid.ColumnSpan="2">
diff --git a/TheGameExtreme/view/GamePreparationPage.xaml.cs b/TheGameExtreme/view/GamePreparationPage.xaml.cs
index c782909..7eba6ee 100644
--- a/TheGameExtreme/view/GamePreparationPage.xaml.cs
+++ b/TheGameExtreme/view/GamePreparationPage.xaml.cs
@@ -18,7 +18,7 @@ namespace TheGameExtreme.view
OnPropertyChanged("InstructionText");
}
}
- public List listNbPlayer = new List();
+ public List listNbPlayer = new List { "1", "2", "3", "4", "5" };
public GamePreparationPage()
@@ -27,11 +27,7 @@ namespace TheGameExtreme.view
NavigationPage.SetHasNavigationBar(this, false);
Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this));
InstructionText = AppRessource.StrPlayerSelection;
- listNbPlayer.Add(1);
- listNbPlayer.Add(2);
- listNbPlayer.Add(3);
- listNbPlayer.Add(4);
- listNbPlayer.Add(5);
+ PlayerSelecter.ItemsSource = listNbPlayer;
}
private async void Back(object sender, EventArgs e)
@@ -43,5 +39,21 @@ namespace TheGameExtreme.view
{
await Navigation.PushAsync(new MainPage());
}
+
+ private void ChangedPseudo(object sender, EventArgs args)
+ {
+ while (NameList.Children.Count != (int)PlayerSelecter.SelectedItem)
+ if (NameList.Children.Count < (int)PlayerSelecter.SelectedItem)
+ {
+ Editor e = new Editor();
+ e.Placeholder = "Enter your pseudo";
+
+ NameList.Children.Add(e);
+ }
+ else
+ {
+
+ }
+ }
}
}