diff --git a/TheGameExtreme.Android/Resources/Resource.designer.cs b/TheGameExtreme.Android/Resources/Resource.designer.cs
index 3e31455..82453f1 100644
--- a/TheGameExtreme.Android/Resources/Resource.designer.cs
+++ b/TheGameExtreme.Android/Resources/Resource.designer.cs
@@ -5800,67 +5800,73 @@ namespace TheGameExtreme.Droid
public const int imagesRules = 2131165291;
// aapt resource value: 0x7F07006C
- public const int mtrl_snackbar_background = 2131165292;
+ public const int LuneSombreTheme = 2131165292;
// aapt resource value: 0x7F07006D
- public const int mtrl_tabs_default_indicator = 2131165293;
+ public const int mtrl_snackbar_background = 2131165293;
// aapt resource value: 0x7F07006E
- public const int navigation_empty_icon = 2131165294;
+ public const int mtrl_tabs_default_indicator = 2131165294;
// aapt resource value: 0x7F07006F
- public const int notification_action_background = 2131165295;
+ public const int navigation_empty_icon = 2131165295;
// aapt resource value: 0x7F070070
- public const int notification_bg = 2131165296;
+ public const int notification_action_background = 2131165296;
// aapt resource value: 0x7F070071
- public const int notification_bg_low = 2131165297;
+ public const int notification_bg = 2131165297;
// aapt resource value: 0x7F070072
- public const int notification_bg_low_normal = 2131165298;
+ public const int notification_bg_low = 2131165298;
// aapt resource value: 0x7F070073
- public const int notification_bg_low_pressed = 2131165299;
+ public const int notification_bg_low_normal = 2131165299;
// aapt resource value: 0x7F070074
- public const int notification_bg_normal = 2131165300;
+ public const int notification_bg_low_pressed = 2131165300;
// aapt resource value: 0x7F070075
- public const int notification_bg_normal_pressed = 2131165301;
+ public const int notification_bg_normal = 2131165301;
// aapt resource value: 0x7F070076
- public const int notification_icon_background = 2131165302;
+ public const int notification_bg_normal_pressed = 2131165302;
// aapt resource value: 0x7F070077
- public const int notification_template_icon_bg = 2131165303;
+ public const int notification_icon_background = 2131165303;
// aapt resource value: 0x7F070078
- public const int notification_template_icon_low_bg = 2131165304;
+ public const int notification_template_icon_bg = 2131165304;
// aapt resource value: 0x7F070079
- public const int notification_tile_bg = 2131165305;
+ public const int notification_template_icon_low_bg = 2131165305;
// aapt resource value: 0x7F07007A
- public const int notify_panel_notification_icon_bg = 2131165306;
+ public const int notification_tile_bg = 2131165306;
// aapt resource value: 0x7F07007B
- public const int rules = 2131165307;
+ public const int notify_panel_notification_icon_bg = 2131165307;
// aapt resource value: 0x7F07007C
- public const int rulesImg = 2131165308;
+ public const int rules = 2131165308;
// aapt resource value: 0x7F07007D
- public const int tooltip_frame_dark = 2131165309;
+ public const int rulesImg = 2131165309;
// aapt resource value: 0x7F07007E
- public const int tooltip_frame_light = 2131165310;
+ public const int SoleilThemes = 2131165310;
// aapt resource value: 0x7F07007F
- public const int TrierImageB = 2131165311;
+ public const int tooltip_frame_dark = 2131165311;
// aapt resource value: 0x7F070080
- public const int UsersExiticon = 2131165312;
+ public const int tooltip_frame_light = 2131165312;
+
+ // aapt resource value: 0x7F070081
+ public const int TrierImageB = 2131165313;
+
+ // aapt resource value: 0x7F070082
+ public const int UsersExiticon = 2131165314;
static Drawable()
{
diff --git a/TheGameExtreme.Android/Resources/drawable/LuneSombreTheme.png b/TheGameExtreme.Android/Resources/drawable/LuneSombreTheme.png
new file mode 100644
index 0000000..86aaf63
Binary files /dev/null and b/TheGameExtreme.Android/Resources/drawable/LuneSombreTheme.png differ
diff --git a/TheGameExtreme.Android/Resources/drawable/SoleilThemes.png b/TheGameExtreme.Android/Resources/drawable/SoleilThemes.png
new file mode 100644
index 0000000..211c84e
Binary files /dev/null and b/TheGameExtreme.Android/Resources/drawable/SoleilThemes.png differ
diff --git a/TheGameExtreme.Android/TheGameExtreme.Android.csproj b/TheGameExtreme.Android/TheGameExtreme.Android.csproj
index 542677e..eed1cd7 100644
--- a/TheGameExtreme.Android/TheGameExtreme.Android.csproj
+++ b/TheGameExtreme.Android/TheGameExtreme.Android.csproj
@@ -157,5 +157,11 @@
Designer
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TheGameExtreme.iOS/Resources/LuneSombreTheme.png b/TheGameExtreme.iOS/Resources/LuneSombreTheme.png
new file mode 100644
index 0000000..86aaf63
Binary files /dev/null and b/TheGameExtreme.iOS/Resources/LuneSombreTheme.png differ
diff --git a/TheGameExtreme.iOS/Resources/SoleilThemes.png b/TheGameExtreme.iOS/Resources/SoleilThemes.png
new file mode 100644
index 0000000..211c84e
Binary files /dev/null and b/TheGameExtreme.iOS/Resources/SoleilThemes.png differ
diff --git a/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj b/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj
index 92caf6d..b48abeb 100644
--- a/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj
+++ b/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj
@@ -181,6 +181,8 @@
+
+
\ No newline at end of file
diff --git a/TheGameExtreme/view/HomePage.xaml b/TheGameExtreme/view/HomePage.xaml
index ac74460..bf6dc27 100644
--- a/TheGameExtreme/view/HomePage.xaml
+++ b/TheGameExtreme/view/HomePage.xaml
@@ -5,11 +5,12 @@
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TheGameExtreme.Resx"
- x:Class="TheGameExtreme.view.HomePage">
+ x:Class="TheGameExtreme.view.HomePage"
+ x:Name="homepageT">
-
+
@@ -32,15 +33,7 @@
VerticalTextAlignment="Center"
FontFamily=""/>
-
+
@@ -67,20 +59,40 @@
HeightRequest="57"
WidthRequest="230"
Clicked="OpenMultiPlayerMode"
- CornerRadius="10"
- Margin="15"
+ CornerRadius="10"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TheGameExtreme/view/HomePage.xaml.cs b/TheGameExtreme/view/HomePage.xaml.cs
index 0b506f1..136f961 100644
--- a/TheGameExtreme/view/HomePage.xaml.cs
+++ b/TheGameExtreme/view/HomePage.xaml.cs
@@ -18,7 +18,7 @@ namespace TheGameExtreme.view
{
InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false);
-
+ SetTheme();
LoadParameterOptionOnHomepage();
}
@@ -31,12 +31,7 @@ namespace TheGameExtreme.view
{
await DisplayAlert("Mode en cours de développement", "Ce mode n'est pas encore implémenté !", "Fermer");
//await Navigation.PushAsync(new MultiPlayerMode());
- }
-
- private async void OpenSetting(object sender, EventArgs args)
- {
- await Navigation.PushAsync(new Settings());
- }
+ }
private async void Rules_Clicked(object sender, EventArgs e)
{
@@ -51,15 +46,63 @@ namespace TheGameExtreme.view
{
Application.Current.Resources["BlackColor"] = Color.Black;
Application.Current.Resources["WhiteColor"] = Color.White;
+ imageButton.Source = "SoleilThemes.png";
}
else
{
Application.Current.Resources["BlackColor"] = Color.White;
Application.Current.Resources["WhiteColor"] = Color.Black;
+ imageButton.Source = "LuneSombreTheme.png";
}
}
-
-
+ private void Theme_Clicked(object sender, EventArgs e)
+ {
+ bool b;
+ ButtonGrid.Children.Remove(imageButton);
+ System.Diagnostics.Debug.WriteLine("Source : " + imageButton.Source);
+ if(homepageT.BackgroundColor == Color.Black)
+ {
+ b = true;
+ Application.Current.Resources["BlackColor"] = Color.White;
+ Application.Current.Resources["WhiteColor"] = Color.Black;
+ imageButton = new ImageButton()
+ {
+ BackgroundColor = (Color)Application.Current.Resources["BlackColor"]
+
+ };
+ imageButton.Source = "LuneSombreTheme.png";
+ }
+ else
+ {
+ b = false;
+ Application.Current.Resources["BlackColor"] = Color.Black;
+ Application.Current.Resources["WhiteColor"] = Color.White;
+ imageButton = new ImageButton()
+ {
+ BackgroundColor = (Color)Application.Current.Resources["BlackColor"]
+ };
+ imageButton.Source = "SoleilThemes.png";
+
+ }
+ ButtonGrid.Children.Add(imageButton, 1, 1);
+ imageButton.Clicked += Theme_Clicked;
+ IOOptions.SaveOptionParameter(b);
+
+
+ }
+
+ private void SetTheme()
+ {
+ if (homepageT.BackgroundColor == Color.Black)
+ {
+ imageButton.Source = "SoleilThemes.png";
+ }
+ if(homepageT.BackgroundColor == Color.White)
+ {
+ imageButton.Source = "LuneSombreTheme";
+ }
+
+ }
}
}
diff --git a/TheGameExtreme/view/MultiPlayerMode.xaml b/TheGameExtreme/view/MultiPlayerMode.xaml
index aa9ee97..f960c7e 100644
--- a/TheGameExtreme/view/MultiPlayerMode.xaml
+++ b/TheGameExtreme/view/MultiPlayerMode.xaml
@@ -7,9 +7,9 @@
-
-
-
+
+
+
@@ -32,7 +32,7 @@
HorizontalTextAlignment="Center"
Grid.Column="1" Grid.Row="0"/>
-
+ BackgroundColor="{DynamicResource SkyBlueColor}"/>