master
Baptiste ARNAUD 5 years ago
parent 88a7e41aa4
commit 5995bb9013

@ -11,6 +11,7 @@ using Xamarin.Forms;
namespace TheGameExtreme.Droid
{
[Activity(Label = "OrderStacks", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Landscape)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
@ -18,6 +19,13 @@ namespace TheGameExtreme.Droid
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
int uiOptions = (int)Window.DecorView.SystemUiVisibility;
uiOptions |= (int)SystemUiFlags.LowProfile;
uiOptions |= (int)SystemUiFlags.Fullscreen;
uiOptions |= (int)SystemUiFlags.HideNavigation;
uiOptions |= (int)SystemUiFlags.ImmersiveSticky;
Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
base.OnCreate(savedInstanceState);
Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);

@ -240,7 +240,6 @@ namespace TheGameExtreme.Resx {
///
/// - Le but est de poser les 98 cartes du jeu sur les différentes piles à votre disposition.
/// (Pour ce faire confer les règles de tour de jeu ci-dessous)
///
/// [le reste de la chaîne a été tronqué]";.
/// </summary>
public static string StrRules {

@ -204,7 +204,9 @@
- Le type de jeu permet de définir les cartes avec lesquelles vous allez jouer: relatif, décimal...
- le nombre de piles correspond au nombre de piles initial sur lesquelles vous pourrez poser des cartes. La moitié des piles sont toujours ascendantes et l'autre moitié sont quant à elles toujours descendantes. Par ailleurs, plus le nombre de piles est important plus le jeu est facile."</value>
- le nombre de piles correspond au nombre de piles initial sur lesquelles vous pourrez poser des cartes.
La moitié des piles sont toujours ascendantes et l'autre moitié sont quant à elles toujours descendantes.
Par ailleurs, plus le nombre de piles est important plus le jeu est facile.</value>
</data>
<data name="StrTitle" xml:space="preserve">
<value>OrderStacks</value>

@ -69,6 +69,9 @@
<EmbeddedResource Update="DictionnaireBGCWhite.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="view\RulesGame.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Update="Resx\AppResources.Designer.cs">

@ -91,6 +91,7 @@
VerticalOptions="End"
HorizontalOptions="Center"
Clicked="Theme_Clicked"
BorderColor="{DynamicResource SkyBlueColor}"
BackgroundColor="Transparent"/>
</Grid>

@ -33,9 +33,9 @@ namespace TheGameExtreme.view
//await Navigation.PushAsync(new MultiPlayerMode());
}
private async void Rules_Clicked(object sender, EventArgs e)
private async void Rules_Clicked(object sender, EventArgs args)
{
await DisplayAlert(AppResources.StrTitleRules, AppResources.StrRules, AppResources.StrCloseWind);
await Navigation.PushAsync(new RulesGame());
}
@ -60,7 +60,7 @@ namespace TheGameExtreme.view
{
bool b;
ButtonGrid.Children.Remove(imageButton);
System.Diagnostics.Debug.WriteLine("Source : " + imageButton.Source);
if(homepageT.BackgroundColor == Color.Black)
{
b = true;
@ -68,8 +68,8 @@ namespace TheGameExtreme.view
Application.Current.Resources["WhiteColor"] = Color.Black;
imageButton = new ImageButton()
{
BackgroundColor = (Color)Application.Current.Resources["BlackColor"]
BackgroundColor = Color.Transparent,
BorderColor = (Color)Application.Current.Resources["SkyBlueColor"]
};
imageButton.Source = "LuneSombreTheme.png";
}
@ -80,7 +80,10 @@ namespace TheGameExtreme.view
Application.Current.Resources["WhiteColor"] = Color.White;
imageButton = new ImageButton()
{
BackgroundColor = (Color)Application.Current.Resources["BlackColor"]
BackgroundColor = Color.Transparent,
BorderColor = (Color)Application.Current.Resources["SkyBlueColor"]
};
imageButton.Source = "SoleilThemes.png";

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage BackgroundColor="{DynamicResource BlackColor}"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resources="clr-namespace:TheGameExtreme.Resx"
x:Class="TheGameExtreme.view.RulesGame"
mc:Ignorable="d">
<Grid Margin="20,20,20,20">
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Label
Text="{x:Static resources:AppResources.StrTitleRules}"
VerticalOptions="Center"
HorizontalOptions="Center"
Grid.Column="1"
Grid.Row="0"
FontSize="35"
TextColor="{DynamicResource WhiteColor}"/>
<Button Text="Jouer"
Grid.Row="0"
Grid.Column="2"
BackgroundColor="{DynamicResource SkyBlueColor}"
VerticalOptions="Center"
HorizontalOptions="Center"
CornerRadius="10"
Clicked="ClickToPlay"/>
<ImageButton Source="HomeIcon.png"
Grid.Column="0"
Grid.Row="0"
VerticalOptions="Start"
HorizontalOptions="StartAndExpand"
HeightRequest="50"
WidthRequest="60"
Clicked="BackToHome"
BackgroundColor="Transparent"/>
<ScrollView Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="3">
<Label
Text="{x:Static resources:AppResources.StrRules}"
VerticalOptions="Center"
HorizontalOptions="Center"
Grid.Column="1"
Grid.Row="1"
FontSize="16"
TextColor="{DynamicResource WhiteColor}"/>
</ScrollView>
</Grid>
</ContentPage>

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TheGameExtreme.view
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class RulesGame : ContentPage
{
public RulesGame()
{
InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false);
}
private async void BackToHome(object sender, EventArgs args)
{
await Navigation.PushAsync(new HomePage());
}
private async void ClickToPlay(object sender, EventArgs args)
{
await Navigation.PushAsync(new GamePreparationPage());
}
}
}
Loading…
Cancel
Save