label → button in mainpage / add "return button" in all pages / styles edit for color label / add setplayers pages / re-use leaderboard page in scoreboard page. good night :)

test_old_branch
jeremy-my 1 year ago
parent 2864310742
commit cf79d10a11

@ -12,6 +12,10 @@
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
<ShellContent
Title="SetPlayers"
ContentTemplate="{DataTemplate localPages:SetPlayers}"
Route="SetPlayers" />
<ShellContent
Title="Gameboard"
ContentTemplate="{DataTemplate localPages:Gameboard}"

@ -11,41 +11,43 @@
<Label
Text="QWIRKLE"
FontSize="Header"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
HorizontalTextAlignment="Center"
/>
<Image
Source="qwirklelogo.jpeg"
HeightRequest="185"
Aspect="AspectFit"
SemanticProperties.Description="dot net bot in a race car number eight" />
/>
<Label
<Button
Text="Play"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
HorizontalOptions="Center"
/>
<Label
<Button
Text="Continue"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
HorizontalOptions="Center"
/>
<Label
<Button
Text="Leaderboard"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
HorizontalOptions="Center"
/>
<Label
<Button
Text="Settings"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
HorizontalOptions="Center"
/>
<Label
<Button
Text="Credits"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
HorizontalOptions="Center"
/>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -8,7 +8,6 @@
<VerticalStackLayout Spacing="50">
<Label
Text="Leaderboard"
TextColor="DarkSlateGrey"
FontSize="Header"
HorizontalOptions="Center"/>
@ -66,6 +65,16 @@
<Rectangle HeightRequest="2" BackgroundColor="Black"/>
</VerticalStackLayout>
</Border>
<Button Text="Return"
Margin="10"
HorizontalOptions="Center"
VerticalOptions="End"
/>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -2,11 +2,50 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Qwirkle.Pages.Scoreboard"
xmlns:controls="clr-namespace:Qwirkle.Views"
Title="Scoreboard">
<VerticalStackLayout>
<Label
Text="Scoreboard"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
<ScrollView>
<VerticalStackLayout Spacing="50">
<Label
Text="Scoreboard"
FontSize="Header"
HorizontalOptions="Center"/>
<Border Stroke="Black"
StrokeThickness="1.5"
Margin="5">
<Border.StrokeShape>
<RoundRectangle CornerRadius="10"/>
</Border.StrokeShape>
<VerticalStackLayout Padding="10">
<controls:ScoreboardLine></controls:ScoreboardLine>
<Rectangle HeightRequest="2" BackgroundColor="Black"/>
<controls:ScoreboardLine></controls:ScoreboardLine>
<Rectangle HeightRequest="2" BackgroundColor="Black"/>
<controls:ScoreboardLine></controls:ScoreboardLine>
<Rectangle HeightRequest="2" BackgroundColor="Black"/>
<controls:ScoreboardLine></controls:ScoreboardLine>
<Rectangle HeightRequest="2" BackgroundColor="Black"/>
<controls:ScoreboardLine></controls:ScoreboardLine>
<Rectangle HeightRequest="2" BackgroundColor="Black"/>
</VerticalStackLayout>
</Border>
<Button Text="Return"
Margin="10"
HorizontalOptions="Center"
VerticalOptions="End"
/>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Qwirkle.Pages.SetPlayers"
Title="SetPlayers">
<VerticalStackLayout>
<Label
Text="SetPlayers"
FontSize="51"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Label
Text="Players 1"
FontSize="20"
HorizontalOptions="Start" />
<Entry Text="Entry tag of player1" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Label
Text="Players 2"
FontSize="20"
HorizontalOptions="Start" />
<Entry Text="Entry tag of player2" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Label
Text="Players 3"
FontSize="20"
HorizontalOptions="Start" />
<Entry Text="Entry tag of player3" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Label
Text="Players 4"
FontSize="20"
HorizontalOptions="Start" />
<Entry Text="Entry tag of player4" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Button Text="Confirm"
Margin="200"
HorizontalOptions="Center"
VerticalOptions="End"
/>
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace Qwirkle.Pages;
public partial class SetPlayers : ContentPage
{
public SetPlayers()
{
InitializeComponent();
}
}

@ -7,7 +7,6 @@
<Label
Text="Settings"
TextColor="Black"
FontSize="51"
VerticalOptions="Center"
HorizontalOptions="Center" />
@ -15,7 +14,6 @@
<HorizontalStackLayout>
<Label
Text="Sound"
TextColor="Black"
VerticalOptions="Start"
HorizontalOptions="Start"
FontAttributes="Bold"
@ -30,13 +28,16 @@
</HorizontalStackLayout>
<Slider
Value="5"
WidthRequest="700"
HorizontalOptions="Start"
/>
Value="5"
WidthRequest="700"
HorizontalOptions="Start"
/>
<Button Text="Return"
Margin="200"
HorizontalOptions="Center"
VerticalOptions="End"
/>
</VerticalStackLayout>
</ContentPage>

@ -69,12 +69,18 @@
<Compile Update="Pages\GameBoard.xaml.cs">
<DependentUpon>Gameboard.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\SetPlayers.xaml.cs">
<DependentUpon>SetPlayers.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\Scoreboard.xaml.cs">
<DependentUpon>Scoreboard.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\Settings.xaml.cs">
<DependentUpon>Settings.xaml</DependentUpon>
</Compile>
<Compile Update="Views\ScoreboardLine.xaml.cs">
<DependentUpon>ScoreboardLine.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
@ -84,12 +90,18 @@
<MauiXaml Update="Pages\Gameboard.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\SetPlayers.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\Scoreboard.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\Settings.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\ScoreboardLine.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>

@ -24,8 +24,8 @@
</Style>
<Style TargetType="Button">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}" />
<Setter Property="TextColor" Value="Black" />
<Setter Property="BackgroundColor" Value="White" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderWidth" Value="0"/>
@ -111,11 +111,11 @@
</Style>
<Style TargetType="Entry">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="TextColor" Value="Black" />
<Setter Property="BackgroundColor" Value="White" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="PlaceholderColor" Value="Red" />
<Setter Property="MinimumHeightRequest" Value="44"/>
<Setter Property="MinimumWidthRequest" Value="44"/>
<Setter Property="VisualStateManager.VisualStateGroups">
@ -124,7 +124,7 @@
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
<Setter Property="TextColor" Value="Blue" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
@ -161,7 +161,7 @@
</Style>
<Style TargetType="Label">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
<Setter Property="TextColor" Value="DarkSlateGrey" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="FontSize" Value="14" />
@ -171,7 +171,7 @@
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
<Setter Property="TextColor" Value="DarkSlateGrey" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Qwirkle.Views.ScoreboardLine">
<Grid ColumnDefinitions="4*, 2*"
RowDefinitions="50">
<Label
Grid.Row="0"
Grid.Column="0"
FontSize="Medium"
FontAttributes="Bold"
Text="Player Tag"
TextColor="DarkSlateGrey"
VerticalOptions="Center"/>
<Label
Grid.Row="0"
Grid.Column="1"
FontSize="Medium"
FontAttributes="Bold"
Text="Points"
TextColor="DarkSlateGrey"
VerticalOptions="Center"/>
</Grid>
</ContentView>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Qwirkle.Views;
public partial class ScoreboardLine : ContentView
{
public ScoreboardLine()
{
InitializeComponent();
}
}
Loading…
Cancel
Save