<?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"
    xmlns:d="http://xamarin.com/schemas/2014/forms/design"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:skia="clr-namespace:SkiaSharp.Views.Forms;assembly=SkiaSharp.Views.Forms"
    xmlns:tt="clr-namespace:TouchTracking.Forms;assembly=TouchTracking.Forms"
    mc:Ignorable="d"
    x:Class="TheGameExtreme.view.MainPage">

    <Grid
        x:Name="Display">
        <Grid.RowDefinitions>
            <RowDefinition Height="10*"/>
            <RowDefinition Height="90*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="15*"/>
            <ColumnDefinition Width="70*"/>
            <ColumnDefinition Width="15*"/>
        </Grid.ColumnDefinitions>

    
    
    

          <StackLayout
            Grid.Row="0"
            Grid.Column="1">
              <Label
                x:Name="pseudo"
                Text="Pseudo"
                HorizontalTextAlignment="Center"
                VerticalTextAlignment="Center"
                TextColor="{DynamicResource WhiteColor}"
                FontSize="28"/>
            <!--<Picker Title="Touch Mode"
                    Grid.Row="0"
                    SelectedIndexChanged="OnTouchModePickerSelectedIndexChanged">
                <Picker.ItemsSource>
                    <x:Array Type="{x:Type local:TouchManipulationMode}">
                        <x:Static Member="local:TouchManipulationMode.None" />
                        <x:Static Member="local:TouchManipulationMode.PanOnly" />
                        <x:Static Member="local:TouchManipulationMode.IsotropicScale" />
                        <x:Static Member="local:TouchManipulationMode.AnisotropicScale" />
                        <x:Static Member="local:TouchManipulationMode.ScaleRotate" />
                        <x:Static Member="local:TouchManipulationMode.ScaleDualRotate" />
                    </x:Array>
                </Picker.ItemsSource>
                <Picker.SelectedIndex>
                    4
                </Picker.SelectedIndex>
            </Picker>-->
          </StackLayout>                             
        

        <StackLayout
            Grid.Row="0"
            Grid.Column="0">
            <ImageButton
                Source="HomeIcon.png"
                HorizontalOptions="Center"
                VerticalOptions="Center"
                WidthRequest="45"
                HeightRequest="45"                     
                BackgroundColor="{DynamicResource BlackColor}"
                Clicked="PlayToHome"/>

            <Label Text="↑" TextColor="White"
                   FontSize="64"
                   Grid.Column="0" Grid.Row="1" Margin="120,0,0,10"/>
        </StackLayout>

        
        
        <StackLayout
            Grid.Row="0"
            Grid.Column="2"
            x:Name="gameOption">
            <Button
                x:Name="EndTurnButton"
                Text=""
                HorizontalOptions="End"
                VerticalOptions="Start"
                BackgroundColor="{DynamicResource SkyBlueColor}"
                HeightRequest="35"
                Clicked="EndTurn"/>
            <Label Text="↓" TextColor="White"
               FontSize="64" Grid.Column="2" Grid.Row="1" Margin="0,0,120,10"/>

        </StackLayout>
        

        <!--<Grid
            Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="20*"/>
                <ColumnDefinition Width="20*"/>
                <ColumnDefinition Width="20*"/>
                <ColumnDefinition Width="20*"/>
                <ColumnDefinition Width="20*"/>
            </Grid.ColumnDefinitions>

            <StackLayout
                Grid.Column="0">
                <Image
                    x:Name="pile1"
                    Source="UsersExiticon.png"
                    HeightRequest="45"
                    WidthRequest="45"/>
            </StackLayout>

            <StackLayout
                Grid.Column="1">
                <Image
                    x:Name="pile2"
                    Source="UsersExiticon.png"
                    HeightRequest="45"
                    WidthRequest="45"/>
            </StackLayout>

            <StackLayout
                Grid.Column="2">
                <Image
                    x:Name="pioche"
                    Source="UsersExiticon.png"
                    HeightRequest="45"
                    WidthRequest="45"/>
            </StackLayout>

            <StackLayout
                Grid.Column="3">
                <Image
                    x:Name="pile4"
                    Source="UsersExiticon.png"
                    HeightRequest="45"
                    WidthRequest="45"/>
            </StackLayout>

            <StackLayout
                Grid.Column="4">
                <Image
                    x:Name="pile5"
                    Source="UsersExiticon.png"
                    HeightRequest="45"
                    WidthRequest="45"/>
            </StackLayout>

        </Grid>-->


        <Grid
            Grid.Row="1"
            Grid.Column="0"
            Grid.ColumnSpan="3">
            <Grid.Effects>
                <tt:TouchEffect
                    Capture="True"
                    TouchAction="OnTouchEffectAction" />
            </Grid.Effects>
            <skia:SKCanvasView
                x:Name="canvasView"
                PaintSurface="OnCanvasViewPaintSurface"/>
        </Grid>
        


















         <!--<StackLayout>
            <StackLayout
                            Orientation="Vertical">
                            <Label HorizontalTextAlignment="Center" x:Name="pile0" Text="1" />
                            <StackLayout
                                Orientation="Horizontal">
                                <CheckBox x:Name="checkbox0" CheckedChanged="radioButton" />
                                <Label VerticalTextAlignment="Center" Text="Pile Ascendante" />
                            </StackLayout>
                        </StackLayout>
                        <StackLayout
                            Orientation="Vertical">
                            <Label HorizontalTextAlignment="Center" x:Name="pile1" Text="1" />
                            <StackLayout
                                Orientation="Horizontal">
                                <CheckBox x:Name="checkbox1" CheckedChanged="radioButton" />
                                <Label VerticalTextAlignment="Center" Text="Pile Ascendante" />
                            </StackLayout>
                        </StackLayout>
                        <StackLayout
                            Orientation="Vertical">
                            <Label HorizontalTextAlignment="Center" x:Name="pile2" Text="100" />
                            <StackLayout
                                Orientation="Horizontal">
                                <CheckBox x:Name="checkbox2" CheckedChanged="radioButton" />
                                <Label VerticalTextAlignment="Center" Text="Pile Descendante" />
                            </StackLayout>
                        </StackLayout>
                        <StackLayout
                            Orientation="Vertical">
                            <Label HorizontalTextAlignment="Center" x:Name="pile3" Text="100" />
                            <StackLayout
                                Orientation="Horizontal">
                                <CheckBox x:Name="checkbox3" CheckedChanged="radioButton" />
                                <Label VerticalTextAlignment="Center" Text="Pile Descendante" />
                            </StackLayout>
                        </StackLayout>
                    
                    <Label Text="Veuillez selectionner une carte à placer:" />
                    <ScrollView
                        Orientation="Horizontal"
                        Padding="0,5,0,5">
                        <StackLayout
                            Orientation="Horizontal"
                            x:Name="Hand">
                            <Button x:Name="card1" Clicked="played" />
                            <Button x:Name="card2" Clicked="played" />
                            <Button x:Name="card3" Clicked="played" />
                            <Button x:Name="card4" Clicked="played" />
                            <Button x:Name="card5" Clicked="played" />
                            <Button x:Name="card6" Clicked="played" />
                            <Button x:Name="card7" Clicked="played" />
                        </StackLayout>
                    </ScrollView>
                
                <StackLayout
                    x:Name="botPanel"
                    Orientation="Vertical"
                    Margin="20">
                    
                    <Label x:Name="Alert"/>
                </StackLayout>
        </StackLayout>--> 
    </Grid>

</ContentPage>