Rajout de style pour les frames et les labels

master
commit ffa08bea6c

@ -7,13 +7,13 @@
<VerticalStackLayout >
<FlexLayout Direction="Row" JustifyContent="SpaceAround" AlignContent="Center" VerticalOptions="Center" Margin="10">
<Image Source="defaite.png" MaximumHeightRequest="100" MaximumWidthRequest="100" />
<Frame BackgroundColor="Black" HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="Defaite" TextColor="White" FontSize="Large" HorizontalOptions="Center"></Label>
<Frame HorizontalOptions="Center" VerticalOptions="Center" Style="{StaticResource FrameTitrePage}" >
<Label Text="Defaite" Style="{StaticResource TexteTitre}"/>
</Frame>
<Image Source="defaite.png" MaximumHeightRequest="100" MaximumWidthRequest="100"/>
</FlexLayout>
<Frame BackgroundColor="Grey" Margin="20">
<Label HorizontalOptions="Center" Text="Aucun des deux joueurs, Joueur 1 et Joueur 2 n'a trouvé le code secret"/>
<Frame Margin="20">
<Label HorizontalOptions="Center" Text="Aucun des deux joueurs, Joueur 1 et Joueur 2 n'a trouvé le code secret" Style="{StaticResource TexteFrame}"/>
</Frame>
<Button Text="Menu" VerticalOptions="End" HorizontalOptions="Center"></Button>
</VerticalStackLayout>

@ -7,13 +7,13 @@
<VerticalStackLayout>
<FlexLayout Direction="Row" JustifyContent="SpaceAround" AlignContent="Center" VerticalOptions="Center" Margin="10">
<Image Source="egaliter.jpg" MaximumHeightRequest="100" MaximumWidthRequest="100" />
<Frame BackgroundColor="Black" HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="Egaliter" TextColor="White" FontSize="Large" HorizontalOptions="Center"></Label>
<Frame HorizontalOptions="Center" VerticalOptions="Center" Style="{StaticResource FrameTitrePage}">
<Label Text="Egaliter" Style="{StaticResource TexteTitre}"/>
</Frame>
<Image Source="egaliter.jpg" MaximumHeightRequest="100" MaximumWidthRequest="100"/>
</FlexLayout>
<Frame BackgroundColor="Grey" Margin="20">
<Label HorizontalOptions="Center" Text="Les deux joueur ont trouvé en même temps"/>
<Frame Margin="20">
<Label HorizontalOptions="Center" Text="Les deux joueur ont trouvé en même temps" Style="{StaticResource TexteFrame}"/>
</Frame>
<Button Text="Menu" VerticalOptions="End" HorizontalOptions="Center"></Button>
</VerticalStackLayout>

@ -8,22 +8,22 @@
<VerticalStackLayout>
<FlexLayout Direction="Row" JustifyContent="SpaceAround">
<Image Source="livre.png" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center" Margin="0,24,0,0"/>
<Frame BorderColor="Black" CornerRadius="5" BackgroundColor="Black" Margin="10" HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="Règle" HorizontalOptions="Center" FontSize="75" VerticalOptions="Start" Margin="0,10,0,10" TextColor="White" />
<Frame CornerRadius="5" Margin="10" HorizontalOptions="Center" VerticalOptions="Center" Style="{StaticResource FrameTitrePage}">
<Label Text="Règle" Style="{StaticResource TexteTitre}" />
</Frame>
<Grid RowDefinitions="auto,auto">
<ImageButton Grid.Row="0" Style="{StaticResource ButtonFermeture}"/>
<Image Grid.Row="1" Source="livre.png" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="10"/>
</Grid>
</FlexLayout>
<Frame BackgroundColor="LightGray" Margin="20">
<Frame Margin="20">
<Grid ColumnDefinitions="*,auto">
<Label Text="
Le but du jeu est de découvrir la combinaison. On génère aléatoirement deux combinaisons de 4 couleurs (six couleurs au total : jaune, bleu, rouge, vert, blanc et noir), une combinaison pour chaque joueur.
Deux joueurs se battent pour trouver la combinaison en premier, il y a douze tours.
Le premier joueur à trouver la combinaison à gagner, chaque joueur a le même nombre de coups à réaliser. Donc si le joueur un à trouvé la solution au bout de huit coups, le joueur deux doit finir son huitième coup. Si le joueur deux trouve la combinaison, les deux joueurs sont à égalité. Sinon, le joueur un gagne.
Pour trouver la combinaison, les joueurs disposent de quatre indicateurs. Ces indicateurs sont quatre ronds qui représentent les quatre couleurs sélectionnées par le joueur. Un rond noir signifie quune couleur est à la bonne place, un rond blanc correspond à une mauvaise place et s'il ny a pas dindicateur aucune des couleurs nest présentent dans la combinaison.
" />
" Style="{StaticResource TexteFrame}" />
<Image Source="mastermind.png" Grid.Column="1" MaximumHeightRequest="100" MaximumWidthRequest="100"/>
</Grid>
</Frame>

@ -4,21 +4,20 @@
xmlns:pages="clr-namespace:mastermind.Pages"
xmlns:views="clr-namespace:mastermind.Views"
x:Class="mastermind.Pages.TableauScore"
Title="TableauScore"
BackgroundImageSource="wood.jpg">
Title="TableauScore">
<ScrollView>
<VerticalStackLayout>
<FlexLayout Direction="Row" JustifyContent="SpaceAround" AlignContent="Center" VerticalOptions="Center" >
<Image Source="star.png" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center" Margin="0,24,0,0"/>
<Frame BorderColor="Black" CornerRadius="5" BackgroundColor="Black" Margin="10" HorizontalOptions="Center" VerticalOptions="Center" >
<Label Text="Scoreboard" HorizontalOptions="Center" FontSize="75" VerticalOptions="Start" Margin="0,10,0,10" TextColor="White" />
<Frame CornerRadius="5" Margin="10" HorizontalOptions="Center" VerticalOptions="Center" Style="{StaticResource FrameTitrePage}" >
<Label Text="Scoreboard" Style="{StaticResource TexteTitre}"/>
</Frame>
<Grid RowDefinitions="auto,auto">
<ImageButton Grid.Row="0" Style="{StaticResource ButtonFermeture}"/>
<Image Grid.Row="1" Source="star.png" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="10"/>
</Grid>
</FlexLayout>
<Frame Margin="5" BorderColor="Black">
<Frame Margin="20" >
<Grid ColumnDefinitions="auto,*,auto,auto" ColumnSpacing="10">
<Button Margin="0,5,5,5" Grid.Column="0" Text="RANK" Style="{StaticResource ButtonTableau}"></Button>
<Button Margin="5" Grid.Column="1" Text="PSEUDO" Style="{StaticResource ButtonTableau}" HorizontalOptions="Start" ></Button>

@ -7,13 +7,13 @@
<VerticalStackLayout>
<FlexLayout Direction="Row" JustifyContent="SpaceAround" AlignContent="Center" VerticalOptions="Center" Margin="10">
<Image Source="trophy.jpg" MaximumHeightRequest="100" MaximumWidthRequest="100" />
<Frame BackgroundColor="Black" HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="Victoire" TextColor="White" FontSize="Large" HorizontalOptions="Center"></Label>
<Frame HorizontalOptions="Center" VerticalOptions="Center" Style="{StaticResource FrameTitrePage}">
<Label Text="Victoire" Style="{StaticResource TexteTitre}"></Label>
</Frame>
<Image Source="trophy.jpg" MaximumHeightRequest="100" MaximumWidthRequest="100"/>
</FlexLayout>
<Frame BackgroundColor="Grey" Margin="20" >
<Label HorizontalOptions="Center" Text="Le joueur x a gagné"/>
<Frame Margin="20" >
<Label HorizontalOptions="Center" Text="Le joueur x a gagné" Style="{StaticResource TexteFrame}"/>
</Frame>
<Button Text="Menu" VerticalOptions="End" HorizontalOptions="Center"></Button>
</VerticalStackLayout>

@ -27,6 +27,12 @@
<Color x:Key="Perry">#358F92</Color>
<Color x:Key="Bordeaux">#662323</Color>
<Color x:Key="Peche">#F2B861</Color>
<Color x:Key="LightSaumon">#E3A79F</Color>
<Color x:Key="DarkRed">#72170B</Color>
<Color x:Key="LightPurple">#C875A4</Color>
<Color x:Key="LightYellow">#F0C67B</Color>
<Color x:Key="DarkPurple">#622E72</Color>
<Color x:Key="LightRed">#F93A3A</Color>
<Color x:Key="Gray100">#E1E1E1</Color>
<Color x:Key="Gray200">#C8C8C8</Color>

@ -4,7 +4,6 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<Style TargetType="Page" ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Poussin}, Dark={StaticResource Raisin}}"/>
</Style>
@ -13,6 +12,17 @@
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Vin}, Dark={StaticResource Perry}}"/>
</Style>
<Style TargetType="Label" x:Key="TexteFrame">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource DarkRed}}"/>
<Setter Property="FontSize" Value="20"/>
</Style>
<Style TargetType="Label" x:Key="TexteTitre">
<Setter Property="FontSize" Value="70"/>
<Setter Property="HorizontalOptions" Value="Center"/>
<Setter Property="Margin" Value="0,10,0,10"/>
</Style>
<Style TargetType="Button">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Diego}, Dark={StaticResource Peche}}"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Pomme}, Dark={StaticResource Bordeaux}}" />
@ -21,6 +31,10 @@
<Setter Property="Margin" Value="200, 0"/>
</Style>
<Style TargetType="Frame">
<Setter Property="BorderColor" Value="Black"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightSaumon}, Dark={StaticResource LightPurple}}"/>
</Style>
<Style TargetType="Entry">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Diego}, Dark={StaticResource Peche}}"/>
</Style>
@ -29,6 +43,10 @@
<Setter Property="HeightRequest" Value="150" />
<Setter Property="WidthRequest" Value="150" />
</Style>
<Style TargetType="Frame" x:Key="FrameTitrePage">
<Setter Property="BorderColor" Value="Black"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightYellow}, Dark={StaticResource DarkPurple}}"/>
</Style>
<Style TargetType="ImageButton">
<Setter Property="BackgroundColor" Value="Transparent"/>
@ -37,7 +55,6 @@
<Style TargetType="ImageButton" x:Key="ButtonFermeture">
<Setter Property="BackgroundColor" Value="DarkRed" />
<Setter Property="WidthRequest" Value="50"/>
<Setter Property="HeightRequest" Value="50"/>
<Setter Property="Source" Value="Fleche_Retour.png"/>
@ -48,46 +65,20 @@
<Setter Property="Padding" Value="14,10"/>
<Setter Property="MinimumHeightRequest" Value="20"/>
<Setter Property="MinimumWidthRequest" Value="20"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver" />
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightRed}, Dark={StaticResource DarkRed}}"/>
</Style>
<Style TargetType="Button" x:Key="ButtonTableau">
<Setter Property="TextColor" Value="Black" />
<Setter Property="BackgroundColor" Value="Transparent"/>
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderWidth" Value="0"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="MinimumHeightRequest" Value="44"/>
<Setter Property="MinimumWidthRequest" Value="44"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver" />
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource DarkRed}}"/>
<Setter Property="FontSize" Value="25"/>
</Style>
</ResourceDictionary>

@ -3,12 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="mastermind.Views.CTableauScore">
<Frame BorderColor="Black" CornerRadius="5" Padding="0" BackgroundColor="Gray" VerticalOptions="Start" Margin="5" >
<Frame CornerRadius="5" Padding="0" VerticalOptions="Start" Margin="20,0,20,10" >
<Grid ColumnDefinitions="auto,*,auto,auto" ColumnSpacing="10">
<Label Grid.Column="0" Text="N°1" Margin="20" />
<Label Grid.Column="1" Text="Joueur 1" Margin="20" />
<Label Grid.Column="2" Text="5" Margin="20" />
<Label Grid.Column="3" Text="10000" Margin="20" />
<Label Grid.Column="0" Text="N°1" Margin="20" Style="{StaticResource TexteFrame}" />
<Label Grid.Column="1" Text="Joueur 1" Margin="20" Style="{StaticResource TexteFrame}" />
<Label Grid.Column="2" Text="5" Margin="20" Style="{StaticResource TexteFrame}" />
<Label Grid.Column="3" Text="10000" Margin="20" Style="{StaticResource TexteFrame}"/>
</Grid>
</Frame>
</ContentView>

Loading…
Cancel
Save