Rajout de style pour les frames et les labels

master
commit ffa08bea6c

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

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

@ -8,22 +8,22 @@
<VerticalStackLayout> <VerticalStackLayout>
<FlexLayout Direction="Row" JustifyContent="SpaceAround"> <FlexLayout Direction="Row" JustifyContent="SpaceAround">
<Image Source="livre.png" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center" Margin="0,24,0,0"/> <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"> <Frame CornerRadius="5" Margin="10" HorizontalOptions="Center" VerticalOptions="Center" Style="{StaticResource FrameTitrePage}">
<Label Text="Règle" HorizontalOptions="Center" FontSize="75" VerticalOptions="Start" Margin="0,10,0,10" TextColor="White" /> <Label Text="Règle" Style="{StaticResource TexteTitre}" />
</Frame> </Frame>
<Grid RowDefinitions="auto,auto"> <Grid RowDefinitions="auto,auto">
<ImageButton Grid.Row="0" Style="{StaticResource ButtonFermeture}"/> <ImageButton Grid.Row="0" Style="{StaticResource ButtonFermeture}"/>
<Image Grid.Row="1" Source="livre.png" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="10"/> <Image Grid.Row="1" Source="livre.png" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="10"/>
</Grid> </Grid>
</FlexLayout> </FlexLayout>
<Frame BackgroundColor="LightGray" Margin="20"> <Frame Margin="20">
<Grid ColumnDefinitions="*,auto"> <Grid ColumnDefinitions="*,auto">
<Label Text=" <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. 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. 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. 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. 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"/> <Image Source="mastermind.png" Grid.Column="1" MaximumHeightRequest="100" MaximumWidthRequest="100"/>
</Grid> </Grid>
</Frame> </Frame>

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

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

@ -27,6 +27,12 @@
<Color x:Key="Perry">#358F92</Color> <Color x:Key="Perry">#358F92</Color>
<Color x:Key="Bordeaux">#662323</Color> <Color x:Key="Bordeaux">#662323</Color>
<Color x:Key="Peche">#F2B861</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="Gray100">#E1E1E1</Color>
<Color x:Key="Gray200">#C8C8C8</Color> <Color x:Key="Gray200">#C8C8C8</Color>

@ -4,7 +4,6 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" 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">
<Style TargetType="Page" ApplyToDerivedTypes="True"> <Style TargetType="Page" ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Poussin}, Dark={StaticResource Raisin}}"/> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Poussin}, Dark={StaticResource Raisin}}"/>
</Style> </Style>
@ -13,6 +12,17 @@
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Vin}, Dark={StaticResource Perry}}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Vin}, Dark={StaticResource Perry}}"/>
</Style> </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"> <Style TargetType="Button">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Diego}, Dark={StaticResource Peche}}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Diego}, Dark={StaticResource Peche}}"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Pomme}, Dark={StaticResource Bordeaux}}" /> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Pomme}, Dark={StaticResource Bordeaux}}" />
@ -21,6 +31,10 @@
<Setter Property="Margin" Value="200, 0"/> <Setter Property="Margin" Value="200, 0"/>
</Style> </Style>
<Style TargetType="Frame">
<Setter Property="BorderColor" Value="Black"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightSaumon}, Dark={StaticResource LightPurple}}"/>
</Style>
<Style TargetType="Entry"> <Style TargetType="Entry">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Diego}, Dark={StaticResource Peche}}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Diego}, Dark={StaticResource Peche}}"/>
</Style> </Style>
@ -29,6 +43,10 @@
<Setter Property="HeightRequest" Value="150" /> <Setter Property="HeightRequest" Value="150" />
<Setter Property="WidthRequest" Value="150" /> <Setter Property="WidthRequest" Value="150" />
</Style> </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"> <Style TargetType="ImageButton">
<Setter Property="BackgroundColor" Value="Transparent"/> <Setter Property="BackgroundColor" Value="Transparent"/>
@ -37,7 +55,6 @@
<Style TargetType="ImageButton" x:Key="ButtonFermeture"> <Style TargetType="ImageButton" x:Key="ButtonFermeture">
<Setter Property="BackgroundColor" Value="DarkRed" />
<Setter Property="WidthRequest" Value="50"/> <Setter Property="WidthRequest" Value="50"/>
<Setter Property="HeightRequest" Value="50"/> <Setter Property="HeightRequest" Value="50"/>
<Setter Property="Source" Value="Fleche_Retour.png"/> <Setter Property="Source" Value="Fleche_Retour.png"/>
@ -48,46 +65,20 @@
<Setter Property="Padding" Value="14,10"/> <Setter Property="Padding" Value="14,10"/>
<Setter Property="MinimumHeightRequest" Value="20"/> <Setter Property="MinimumHeightRequest" Value="20"/>
<Setter Property="MinimumWidthRequest" Value="20"/> <Setter Property="MinimumWidthRequest" Value="20"/>
<Setter Property="VisualStateManager.VisualStateGroups"> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightRed}, Dark={StaticResource DarkRed}}"/>
<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>
</Style> </Style>
<Style TargetType="Button" x:Key="ButtonTableau"> <Style TargetType="Button" x:Key="ButtonTableau">
<Setter Property="TextColor" Value="Black" />
<Setter Property="BackgroundColor" Value="Transparent"/> <Setter Property="BackgroundColor" Value="Transparent"/>
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderWidth" Value="0"/> <Setter Property="BorderWidth" Value="0"/>
<Setter Property="CornerRadius" Value="8"/> <Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="0"/> <Setter Property="Padding" Value="0"/>
<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="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource DarkRed}}"/>
<VisualStateGroupList> <Setter Property="FontSize" Value="25"/>
<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>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>

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

Loading…
Cancel
Save