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" Title="Home"
ContentTemplate="{DataTemplate local:MainPage}" ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" /> Route="MainPage" />
<ShellContent
Title="SetPlayers"
ContentTemplate="{DataTemplate localPages:SetPlayers}"
Route="SetPlayers" />
<ShellContent <ShellContent
Title="Gameboard" Title="Gameboard"
ContentTemplate="{DataTemplate localPages:Gameboard}" ContentTemplate="{DataTemplate localPages:Gameboard}"

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

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

@ -2,11 +2,50 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Qwirkle.Pages.Scoreboard" x:Class="Qwirkle.Pages.Scoreboard"
xmlns:controls="clr-namespace:Qwirkle.Views"
Title="Scoreboard"> Title="Scoreboard">
<VerticalStackLayout> <ScrollView>
<VerticalStackLayout Spacing="50">
<Label <Label
Text="Scoreboard" Text="Scoreboard"
VerticalOptions="Center" FontSize="Header"
HorizontalOptions="Center"/> 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> </VerticalStackLayout>
</Border>
<Button Text="Return"
Margin="10"
HorizontalOptions="Center"
VerticalOptions="End"
/>
</VerticalStackLayout>
</ScrollView>
</ContentPage> </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 <Label
Text="Settings" Text="Settings"
TextColor="Black"
FontSize="51" FontSize="51"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Center" /> HorizontalOptions="Center" />
@ -15,7 +14,6 @@
<HorizontalStackLayout> <HorizontalStackLayout>
<Label <Label
Text="Sound" Text="Sound"
TextColor="Black"
VerticalOptions="Start" VerticalOptions="Start"
HorizontalOptions="Start" HorizontalOptions="Start"
FontAttributes="Bold" FontAttributes="Bold"
@ -35,8 +33,11 @@
HorizontalOptions="Start" HorizontalOptions="Start"
/> />
<Button Text="Return"
Margin="200"
HorizontalOptions="Center"
VerticalOptions="End"
/>
</VerticalStackLayout> </VerticalStackLayout>
</ContentPage> </ContentPage>

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

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