optimize of credits / scoreboard / setplayers with new styles

test_old_branch
Jérémy Mouyon 1 year ago
parent d227c60e5e
commit a4ba562586

@ -6,9 +6,13 @@
xmlns:local="clr-namespace:Qwirkle"
xmlns:localPages="clr-namespace:Qwirkle.Pages"
Shell.FlyoutBehavior="Flyout"
Title="Qwirkle">
Title="Qwirkle"
FlyoutBackgroundColor="White">
<ShellContent
Title="MainPage"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
<ShellContent

@ -1,7 +1,8 @@
<?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.MainPage">
x:Class="Qwirkle.MainPage"
xmlns:controls="clr-namespace:Qwirkle.Views">
<ScrollView>
<VerticalStackLayout
@ -10,10 +11,7 @@
<Label
Text="QWIRKLE"
FontSize="100"
FontFamily="DiloWorld"
TextColor="DarkSlateGrey"
HorizontalTextAlignment="Center"
Style="{StaticResource SuperTitle}"
/>
<Image
@ -21,13 +19,14 @@
HeightRequest="300"
Aspect="AspectFit"
/>
<!-- Ci dessous, la content view qu'il faudra binder quand on sera faire-->
<Border Stroke="Transparent">
<Button
WidthRequest="200"
Text="Play"
HorizontalOptions="Center"
/>
Style="{StaticResource MainButton}"/>
<Border.Shadow>
<Shadow></Shadow>
</Border.Shadow>
@ -35,10 +34,8 @@
<Border Stroke="Transparent">
<Button
WidthRequest="200"
Text="Continue"
HorizontalOptions="Center"
/>
Style="{StaticResource MainButton}"/>
<Border.Shadow>
<Shadow></Shadow>
</Border.Shadow>
@ -46,10 +43,8 @@
<Border Stroke="Transparent">
<Button
WidthRequest="200"
Text="Leaderboard"
HorizontalOptions="Center"
/>
Style="{StaticResource MainButton}"/>
<Border.Shadow>
<Shadow></Shadow>
</Border.Shadow>
@ -57,10 +52,8 @@
<Border Stroke="Transparent">
<Button
WidthRequest="200"
Text="Rules"
HorizontalOptions="Center"
/>
Style="{StaticResource MainButton}"/>
<Border.Shadow>
<Shadow></Shadow>
</Border.Shadow>
@ -68,10 +61,8 @@
<Border Stroke="Transparent">
<Button
WidthRequest="200"
Text="Settings"
HorizontalOptions="Center"
/>
Style="{StaticResource MainButton}"/>
<Border.Shadow>
<Shadow></Shadow>
</Border.Shadow>
@ -79,10 +70,8 @@
<Border Stroke="Transparent">
<Button
WidthRequest="200"
Text="Credits"
HorizontalOptions="Center"
/>
Style="{StaticResource MainButton}"/>
<Border.Shadow>
<Shadow></Shadow>
</Border.Shadow>

@ -2,20 +2,16 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Qwirkle.Pages.Credits"
xmlns:controls="clr-namespace:Qwirkle.Views"
xmlns:controls="clr-namespace:Qwirkle.Views"
Title="Credits">
<ScrollView>
<VerticalStackLayout>
<Grid ColumnDefinitions="*, 4*,*"
Margin="10, 0">
<controls:GoBack></controls:GoBack>
<Label FontSize="Header"
Grid.Column="1"
Grid.Row="0"
FontAttributes="Bold"
HorizontalOptions="Center"
Padding="50, 10"
Text="Credits"/>
<Label Text="Credits"
Style="{StaticResource Title}"/>
</Grid>
<Label
@ -23,13 +19,13 @@
Style="{StaticResource SubTitle}"/>
<Label
Text="Jules Lascret"
Style="{StaticResource Content}"/>
Style="{StaticResource ContentCenter}"/>
<Label
Text="Rémy Portet"
Style="{StaticResource Content}"/>
Style="{StaticResource ContentCenter}"/>
<Label
Text="Jérémy Mouyon (Project leader)"
Style="{StaticResource Content}"/>
Style="{StaticResource ContentCenter}"/>
<Label
Text="We would like to thank the University Institute of Technology for allowing us to carry out this project"
Style="{StaticResource SubTitle}"/>

@ -8,12 +8,7 @@
<VerticalStackLayout Spacing="25" Padding="5, 5, 5, 10">
<Grid ColumnDefinitions="*, 4*,*"
Margin="10, 0">
<Button Text="Go Back"
Grid.Column="0"
Grid.Row="0"
HorizontalOptions="Start"
VerticalOptions="Center"
/>
<controls:GoBack></controls:GoBack>
<Label FontSize="Header"
Grid.Column="1"
Grid.Row="0"

@ -8,44 +8,35 @@
<Label
Text="SetPlayers"
FontSize="51"
VerticalOptions="Center"
HorizontalOptions="Center" />
Style="{StaticResource Title}"/>
<Label
Text="Players 1"
FontSize="20"
HorizontalOptions="Start" />
Style="{StaticResource ContentStart}"/>
<Entry Text="Entry tag of player1" TextColor="Gray" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Entry Text="Entry tag of player1"/>
<Label
Text="Players 2"
FontSize="20"
HorizontalOptions="Start" />
Style="{StaticResource ContentStart}"/>
<Entry Text="Entry tag of player2" TextColor="Gray" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Entry Text="Entry tag of player2"/>
<Label
Text="Players 3"
FontSize="20"
HorizontalOptions="Start" />
Style="{StaticResource ContentStart}"/>
<Entry Text="Entry tag of player3" TextColor="Gray" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Entry Text="Entry tag of player3"/>
<Label
Text="Players 4"
FontSize="20"
HorizontalOptions="Start" />
Style="{StaticResource ContentStart}"/>
<Entry Text="Entry tag of player4" TextColor="Gray" HorizontalOptions="Start" MinimumWidthRequest="200" Margin="10"/>
<Entry Text="Entry tag of player4"/>
<Button Text="Confirm"
Margin="200"
HorizontalOptions="Center"
VerticalOptions="End"
/>
Style="{StaticResource ConfirmButton}"/>
</VerticalStackLayout>
</ScrollView>

@ -115,6 +115,9 @@
<MauiXaml Update="Pages\Settings.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\ButtonShadow.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\GoBack.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -19,6 +19,10 @@
<Setter Property="StrokeThickness" Value="1"/>
</Style>
<Style TargetType="Border" x:Key="MainBorder">
<Setter Property="Stroke" Value="Transparent" />
</Style>
<Style TargetType="BoxView">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style>
@ -53,6 +57,24 @@
</Setter>
</Style>
<Style TargetType="Button" x:Key="BackButton">
<Setter Property="Grid.Column" Value="0" />
<Setter Property="Grid.Row" Value="0" />
<Setter Property="HorizontalOptions" Value="Start"/>
<Setter Property="VerticalOptions" Value="Center"/>
</Style>
<Style TargetType="Button" x:Key="MainButton">
<Setter Property="WidthRequest" Value="200" />
<Setter Property="HorizontalOptions" Value="Center"/>
</Style>
<Style TargetType="Button" x:Key="ConfirmButton">
<Setter Property="Margin" Value="200" />
<Setter Property="HorizontalOptions" Value="Center"/>
<Setter Property="VerticalOptions" Value="End"/>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="MinimumHeightRequest" Value="44"/>
@ -115,13 +137,15 @@
</Style>
<Style TargetType="Entry">
<Setter Property="TextColor" Value="Black" />
<Setter Property="TextColor" Value="Grey" />
<Setter Property="BackgroundColor" Value="White" />
<Setter Property="FontFamily" Value="Lexend-Meduim"/>
<Setter Property="FontSize" Value="14" />
<Setter Property="HorizontalOptions" Value="Start" />
<Setter Property="PlaceholderColor" Value="Red" />
<Setter Property="MinimumHeightRequest" Value="44"/>
<Setter Property="MinimumWidthRequest" Value="44"/>
<Setter Property="MinimumWidthRequest" Value="200"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
@ -187,11 +211,20 @@
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
</Style>
<Style TargetType="Label" x:Key="SuperTitle">
<Setter Property="FontSize" Value="100" />
<Setter Property="FontFamily" Value="DiloWorld" />
<Setter Property="TextColor" Value="DarkSlateGrey" />
<Setter Property="HorizontalOptions" Value="Center" />
</Style>
<Style TargetType="Label" x:Key="Title">
<Setter Property="TextColor" Value="Black" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Grid.Row" Value="0" />
<Setter Property="FontSize" Value="Header" />
<Setter Property="Padding" Value="75" />
<Setter Property="HorizontalOptions" Value="Center" />
<Setter Property="Padding" Value="50, 10" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
@ -203,12 +236,18 @@
<Setter Property="FontAttributes" Value="Bold" />
</Style>
<Style TargetType="Label" x:Key="Content">
<Style TargetType="Label" x:Key="ContentCenter">
<Setter Property="TextColor" Value="Black" />
<Setter Property="FontSize" Value="20" />
<Setter Property="HorizontalOptions" Value="Center" />
</Style>
<Style TargetType="Label" x:Key="ContentStart">
<Setter Property="TextColor" Value="Black" />
<Setter Property="FontSize" Value="20" />
<Setter Property="HorizontalOptions" Value="Start" />
</Style>
<Style TargetType="ListView">
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
@ -403,26 +442,26 @@
<Style TargetType="Shell" ApplyToDerivedTypes="True">
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" />
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
<Setter Property="Shell.ForegroundColor" Value="Green" />
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource SecondaryDarkText}}" />
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
<Setter Property="Shell.NavBarHasShadow" Value="False" />
<Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
<Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource Magenta}, Dark={StaticResource White}}" />
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Magenta}, Dark={StaticResource White}}" />
<Setter Property="Shell.TabBarForegroundColor" Value="Green" />
<Setter Property="Shell.TabBarTitleColor" Value="CornflowerBlue" />
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
</Style>
<Style TargetType="NavigationPage">
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" />
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
<Setter Property="BarTextColor" Value="Orange" />
<Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
</Style>
<Style TargetType="TabbedPage">
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" />
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Magenta}, Dark={StaticResource White}}" />
<Setter Property="BarTextColor" Value="DarkSalmon" />
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style>

@ -0,0 +1,13 @@
<?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.ButtonShadow">
<Border Stroke="Transparent">
<Button
Text="Settings"
Style="{StaticResource MainButton}"/>
<Border.Shadow>
<Shadow></Shadow>
</Border.Shadow>
</Border>
</ContentView>

@ -0,0 +1,9 @@
namespace Qwirkle.Views;
public partial class ButtonShadow : ContentView
{
public ButtonShadow()
{
InitializeComponent();
}
}

@ -3,9 +3,5 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Qwirkle.Views.GoBack">
<Button Text="Go Back"
Grid.Column="0"
Grid.Row="0"
HorizontalOptions="Start"
VerticalOptions="Center"
/>
Style="{StaticResource BackButton}"/>
</ContentView>

Loading…
Cancel
Save