Files
LEA2/CheckersSpielBot/GameModeDialog.xaml
T
abdelaziz bc4118704e logic
2026-03-30 07:49:37 +02:00

104 lines
4.5 KiB
XML

<Window x:Class="CheckersSpielBot.GameModeDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Checkers" Height="300" Width="400"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
Background="#222">
<Window.Resources>
<Style x:Key="RedButton" TargetType="Button">
<Setter Property="Background" Value="#CC2222"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Height" Value="50"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="6">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#AA1111"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#880000"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BlueButton" TargetType="Button">
<Setter Property="Background" Value="#2255CC"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Height" Value="50"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="6">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#1133AA"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#002288"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Margin="30">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
<RowDefinition Height="50"/>
<RowDefinition Height="12"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="Who goes first?"
Foreground="White"
FontSize="22"
FontWeight="Bold"
HorizontalAlignment="Center"
Margin="0,0,0,8"/>
<TextBlock Grid.Row="1"
Text="Your color matches your choice"
Foreground="#888"
FontSize="12"
HorizontalAlignment="Center"/>
<Button Grid.Row="3"
Content="I go first — I play as Red"
Style="{StaticResource RedButton}"
Click="HumanFirst_Click"/>
<Button Grid.Row="5"
Content="Bot goes first — I play as Blue"
Style="{StaticResource BlueButton}"
Click="BotFirst_Click"/>
</Grid>
</Window>