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:local="clr-namespace:Qwirkle"
xmlns:localPages="clr-namespace:Qwirkle.Pages" xmlns:localPages="clr-namespace:Qwirkle.Pages"
Shell.FlyoutBehavior="Flyout" Shell.FlyoutBehavior="Flyout"
Title="Qwirkle"> Title="Qwirkle"
FlyoutBackgroundColor="White">
<ShellContent <ShellContent
Title="MainPage"
ContentTemplate="{DataTemplate local:MainPage}" ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" /> Route="MainPage" />
<ShellContent <ShellContent

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

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

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

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

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

@ -19,6 +19,10 @@
<Setter Property="StrokeThickness" Value="1"/> <Setter Property="StrokeThickness" Value="1"/>
</Style> </Style>
<Style TargetType="Border" x:Key="MainBorder">
<Setter Property="Stroke" Value="Transparent" />
</Style>
<Style TargetType="BoxView"> <Style TargetType="BoxView">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" /> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style> </Style>
@ -53,6 +57,24 @@
</Setter> </Setter>
</Style> </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"> <Style TargetType="CheckBox">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" /> <Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="MinimumHeightRequest" Value="44"/> <Setter Property="MinimumHeightRequest" Value="44"/>
@ -115,13 +137,15 @@
</Style> </Style>
<Style TargetType="Entry"> <Style TargetType="Entry">
<Setter Property="TextColor" Value="Black" /> <Setter Property="TextColor" Value="Grey" />
<Setter Property="BackgroundColor" Value="White" /> <Setter Property="BackgroundColor" Value="White" />
<Setter Property="FontFamily" Value="Lexend-Meduim"/> <Setter Property="FontFamily" Value="Lexend-Meduim"/>
<Setter Property="FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
<Setter Property="HorizontalOptions" Value="Start" />
<Setter Property="PlaceholderColor" Value="Red" /> <Setter Property="PlaceholderColor" Value="Red" />
<Setter Property="MinimumHeightRequest" Value="44"/> <Setter Property="MinimumHeightRequest" Value="44"/>
<Setter Property="MinimumWidthRequest" Value="44"/> <Setter Property="MinimumWidthRequest" Value="200"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="VisualStateManager.VisualStateGroups"> <Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList> <VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates"> <VisualStateGroup x:Name="CommonStates">
@ -187,11 +211,20 @@
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" /> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
</Style> </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"> <Style TargetType="Label" x:Key="Title">
<Setter Property="TextColor" Value="Black" /> <Setter Property="Grid.Column" Value="1" />
<Setter Property="FontSize" Value="20" /> <Setter Property="Grid.Row" Value="0" />
<Setter Property="FontSize" Value="Header" />
<Setter Property="Padding" Value="75" /> <Setter Property="Padding" Value="75" />
<Setter Property="HorizontalOptions" Value="Center" /> <Setter Property="HorizontalOptions" Value="Center" />
<Setter Property="Padding" Value="50, 10" />
<Setter Property="FontAttributes" Value="Bold" /> <Setter Property="FontAttributes" Value="Bold" />
</Style> </Style>
@ -203,12 +236,18 @@
<Setter Property="FontAttributes" Value="Bold" /> <Setter Property="FontAttributes" Value="Bold" />
</Style> </Style>
<Style TargetType="Label" x:Key="Content"> <Style TargetType="Label" x:Key="ContentCenter">
<Setter Property="TextColor" Value="Black" /> <Setter Property="TextColor" Value="Black" />
<Setter Property="FontSize" Value="20" /> <Setter Property="FontSize" Value="20" />
<Setter Property="HorizontalOptions" Value="Center" /> <Setter Property="HorizontalOptions" Value="Center" />
</Style> </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"> <Style TargetType="ListView">
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" /> <Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" /> <Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
@ -403,26 +442,26 @@
<Style TargetType="Shell" ApplyToDerivedTypes="True"> <Style TargetType="Shell" ApplyToDerivedTypes="True">
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" /> <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.TitleColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource SecondaryDarkText}}" />
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" /> <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.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
<Setter Property="Shell.NavBarHasShadow" Value="False" /> <Setter Property="Shell.NavBarHasShadow" Value="False" />
<Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" /> <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.TabBarForegroundColor" Value="Green" />
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Magenta}, Dark={StaticResource White}}" /> <Setter Property="Shell.TabBarTitleColor" Value="CornflowerBlue" />
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" /> <Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
</Style> </Style>
<Style TargetType="NavigationPage"> <Style TargetType="NavigationPage">
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" /> <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}}" /> <Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
</Style> </Style>
<Style TargetType="TabbedPage"> <Style TargetType="TabbedPage">
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" /> <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="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" /> <Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style> </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" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Qwirkle.Views.GoBack"> x:Class="Qwirkle.Views.GoBack">
<Button Text="Go Back" <Button Text="Go Back"
Grid.Column="0" Style="{StaticResource BackButton}"/>
Grid.Row="0"
HorizontalOptions="Start"
VerticalOptions="Center"
/>
</ContentView> </ContentView>

Loading…
Cancel
Save