<?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"
        Margin="10,10,10,10">
        <Grid.RowDefinitions>
            <RowDefinition Height="9*"/>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="3*"/>
            <RowDefinition Height="85*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="20*"/>
            <ColumnDefinition Width="60*"/>
            <ColumnDefinition Width="20*"/>
        </Grid.ColumnDefinitions>
        

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

          <StackLayout
            Grid.Row="0"
            Grid.Column="1"
            VerticalOptions="CenterAndExpand">
              <Label
                x:Name="pseudo"
                Text="Pseudo"
                HorizontalTextAlignment="Center"
                VerticalTextAlignment="Center"
                TextColor="{DynamicResource Gold}"
                FontSize="28"/>
          </StackLayout>

        
        
        <StackLayout
            Grid.Row="0"
            Grid.Column="2"
            VerticalOptions="CenterAndExpand"
            x:Name="gameOption">
            <Button
                x:Name="EndTurnButton"
                Text=""
                HorizontalOptions="End"
                VerticalOptions="Center"
                BackgroundColor="{DynamicResource Gold}"
                Padding="10"
                CornerRadius="10"
                Clicked="EndTurn"/>
        </StackLayout>

        <ProgressBar
            Progress="1"
            Grid.Row="2"
            Grid.ColumnSpan="3"
            x:Name="progressBar"
            ProgressColor="{DynamicResource Gold}"/>

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

    </Grid>

</ContentPage>