<?xml version="1.0" encoding="UTF-8"?>

<ContentPage
    BackgroundColor="{DynamicResource BlackColor}"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="TheGameExtreme.view.GamePreparationPage">

    <ScrollView>
        <Grid
            Margin="5,0,5,5">
            <Grid.RowDefinitions>
                <RowDefinition Height="10*" />
                <RowDefinition Height="90*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50*" />
                <ColumnDefinition Width="50*" />
            </Grid.ColumnDefinitions>

            <StackLayout
                Grid.Row="0"
                Grid.Column="0">
                <ImageButton Source="ArrowSettingsBack.png"
                    VerticalOptions="Start" 
                    HorizontalOptions="StartAndExpand" 
                    HeightRequest="40" 
                    WidthRequest="50"                    
                    Clicked="Back"
                    BackgroundColor="Transparent"
                    Margin="10,5,0,0"/>
            </StackLayout>

            <StackLayout
                Grid.Row="0"
                Grid.Column="1">

                <Button
                    Text="Play"
                    Clicked="Play"
                    HorizontalOptions="End"
                    MinimumWidthRequest="30"
                    WidthRequest="100"
                    BackgroundColor="{DynamicResource SkyBlueColor}"
                    CornerRadius="10"
                    Margin="0,5,10,0"/>

            </StackLayout>

        

            <Grid
                Grid.Row="1"
                Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="10*" />
                    <RowDefinition Height="10*" />
                    <RowDefinition Height="10*" />
                    <RowDefinition Height="10*" />
                </Grid.RowDefinitions>

                <StackLayout
                    Grid.Row="0"
                    Margin="0,0,10,0"
                    Orientation="Vertical">
                    <Label Text="Nombre de joueur : "
                           TextColor="{DynamicResource WhiteColor}"
                           FontSize="16"
                           VerticalTextAlignment="Center"
                           HorizontalTextAlignment="Center"/>
                    <Picker
                            x:Name="PlayerSelecter"
                            BackgroundColor="{DynamicResource SkyBlueColor}"
                            SelectedIndexChanged="ChangedPseudo"
                            HorizontalOptions="Center"
                            VerticalOptions="Center"
                            MinimumWidthRequest="30"
                            WidthRequest="100"
                            Margin="0,0,10,0"/>            
                </StackLayout>

                <StackLayout 
                    Grid.Row="1"
                    Margin="0,0,10,0">
                    <Label Text="Jouer avec des valeurs :"
                           TextColor="{DynamicResource WhiteColor}"
                           FontSize="16"
                           VerticalTextAlignment="Center"
                           HorizontalTextAlignment="Center"/>
                    <Picker
                        x:Name="SelectMode"
                        BackgroundColor="{DynamicResource SkyBlueColor}"
                        SelectedIndexChanged="SelectMode_SelectedIndexChanged"
                        HorizontalOptions="Center"
                        VerticalOptions="Center"
                        MinimumWidthRequest="30"
                        WidthRequest="100"
                        Margin="0,0,10,0"/>
                </StackLayout>

                <StackLayout
                    Grid.Row="2"
                    Margin="0,0,10,0">

                    <Label Text="Nombre de pile en jeu :"
                           TextColor="{DynamicResource WhiteColor}"
                           FontSize="16"
                           VerticalTextAlignment="Center"
                           HorizontalTextAlignment="Center"/>
                    <Picker x:Name="SelectNbStack"
                                BackgroundColor="{DynamicResource SkyBlueColor}"
                                SelectedIndexChanged="SelectNbStack_Changed"                                               
                                Margin="0,0,10,0"
                            MinimumWidthRequest="30"
                            WidthRequest="100"
                                HorizontalOptions="Center"
                                VerticalOptions="Center"/>
                </StackLayout>

            </Grid>
            




        
                <!--<StackLayout                
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="50,30,50,0">
                <Label Text="Nom des joueurs"
                       TextColor="{DynamicResource WhiteColor}"
                       FontSize="16"
                       VerticalTextAlignment="Center"
                       HorizontalTextAlignment="Center"/>
                </StackLayout>-->
        
            <StackLayout
                x:Name="NameList"
                Grid.Column="0"
                Grid.Row="1"
                Margin="10,0,0,0">

                <Label
                    Text="Entrer vos pseudo ici:"
                    TextColor="{DynamicResource WhiteColor}"
                    FontSize="16"
                    VerticalTextAlignment="Center"
                    HorizontalTextAlignment="Center"/>
            
                <Entry
                    BackgroundColor="{DynamicResource SkyBlueColor}"                    
                    Placeholder="Pseudo"
                    HorizontalOptions="Center"
                    MinimumWidthRequest="50"
                    WidthRequest="200"/>

            </StackLayout>

        </Grid>
    </ScrollView>

</ContentPage>
