diff --git a/TheGameExtreme.Android/Resources/Resource.designer.cs b/TheGameExtreme.Android/Resources/Resource.designer.cs
index 27e2d81..33ac565 100644
--- a/TheGameExtreme.Android/Resources/Resource.designer.cs
+++ b/TheGameExtreme.Android/Resources/Resource.designer.cs
@@ -5746,121 +5746,103 @@ namespace TheGameExtreme.Droid
public const int abc_vector_test = 2131165273;
// aapt resource value: 0x7F07005A
- public const int Apple = 2131165274;
+ public const int ArrowSettingsBack = 2131165274;
// aapt resource value: 0x7F07005B
- public const int ArrowSettingsBack = 2131165275;
+ public const int avd_hide_password = 2131165275;
// aapt resource value: 0x7F07005C
- public const int avd_hide_password = 2131165276;
+ public const int avd_show_password = 2131165276;
// aapt resource value: 0x7F07005D
- public const int avd_show_password = 2131165277;
+ public const int design_bottom_navigation_item_background = 2131165277;
// aapt resource value: 0x7F07005E
- public const int design_bottom_navigation_item_background = 2131165278;
+ public const int design_fab_background = 2131165278;
// aapt resource value: 0x7F07005F
- public const int design_fab_background = 2131165279;
+ public const int design_ic_visibility = 2131165279;
// aapt resource value: 0x7F070060
- public const int design_ic_visibility = 2131165280;
+ public const int design_ic_visibility_off = 2131165280;
// aapt resource value: 0x7F070061
- public const int design_ic_visibility_off = 2131165281;
+ public const int design_password_eye = 2131165281;
// aapt resource value: 0x7F070062
- public const int design_password_eye = 2131165282;
+ public const int design_snackbar_background = 2131165282;
// aapt resource value: 0x7F070063
- public const int design_snackbar_background = 2131165283;
+ public const int EngrenageV1 = 2131165283;
// aapt resource value: 0x7F070064
- public const int Engrenage = 2131165284;
+ public const int HomeIcon = 2131165284;
// aapt resource value: 0x7F070065
- public const int EngrenageV1 = 2131165285;
+ public const int ic_mtrl_chip_checked_black = 2131165285;
// aapt resource value: 0x7F070066
- public const int HomeIcon = 2131165286;
-
- // aapt resource value: 0x7F07006A
- public const int IconPique = 2131165290;
+ public const int ic_mtrl_chip_checked_circle = 2131165286;
// aapt resource value: 0x7F070067
- public const int ic_mtrl_chip_checked_black = 2131165287;
+ public const int ic_mtrl_chip_close_circle = 2131165287;
// aapt resource value: 0x7F070068
- public const int ic_mtrl_chip_checked_circle = 2131165288;
+ public const int imagesRules = 2131165288;
// aapt resource value: 0x7F070069
- public const int ic_mtrl_chip_close_circle = 2131165289;
+ public const int mtrl_snackbar_background = 2131165289;
+
+ // aapt resource value: 0x7F07006A
+ public const int mtrl_tabs_default_indicator = 2131165290;
// aapt resource value: 0x7F07006B
- public const int imagesRules = 2131165291;
+ public const int navigation_empty_icon = 2131165291;
// aapt resource value: 0x7F07006C
- public const int mtrl_snackbar_background = 2131165292;
+ public const int notification_action_background = 2131165292;
// aapt resource value: 0x7F07006D
- public const int mtrl_tabs_default_indicator = 2131165293;
+ public const int notification_bg = 2131165293;
// aapt resource value: 0x7F07006E
- public const int navigation_empty_icon = 2131165294;
+ public const int notification_bg_low = 2131165294;
// aapt resource value: 0x7F07006F
- public const int notification_action_background = 2131165295;
+ public const int notification_bg_low_normal = 2131165295;
// aapt resource value: 0x7F070070
- public const int notification_bg = 2131165296;
+ public const int notification_bg_low_pressed = 2131165296;
// aapt resource value: 0x7F070071
- public const int notification_bg_low = 2131165297;
+ public const int notification_bg_normal = 2131165297;
// aapt resource value: 0x7F070072
- public const int notification_bg_low_normal = 2131165298;
+ public const int notification_bg_normal_pressed = 2131165298;
// aapt resource value: 0x7F070073
- public const int notification_bg_low_pressed = 2131165299;
+ public const int notification_icon_background = 2131165299;
// aapt resource value: 0x7F070074
- public const int notification_bg_normal = 2131165300;
+ public const int notification_template_icon_bg = 2131165300;
// aapt resource value: 0x7F070075
- public const int notification_bg_normal_pressed = 2131165301;
+ public const int notification_template_icon_low_bg = 2131165301;
// aapt resource value: 0x7F070076
- public const int notification_icon_background = 2131165302;
+ public const int notification_tile_bg = 2131165302;
// aapt resource value: 0x7F070077
- public const int notification_template_icon_bg = 2131165303;
+ public const int notify_panel_notification_icon_bg = 2131165303;
// aapt resource value: 0x7F070078
- public const int notification_template_icon_low_bg = 2131165304;
+ public const int tooltip_frame_dark = 2131165304;
// aapt resource value: 0x7F070079
- public const int notification_tile_bg = 2131165305;
+ public const int tooltip_frame_light = 2131165305;
// aapt resource value: 0x7F07007A
- public const int notify_panel_notification_icon_bg = 2131165306;
-
- // aapt resource value: 0x7F07007B
- public const int rules = 2131165307;
-
- // aapt resource value: 0x7F07007C
- public const int rulesImg = 2131165308;
-
- // aapt resource value: 0x7F07007D
- public const int tooltip_frame_dark = 2131165309;
-
- // aapt resource value: 0x7F07007E
- public const int tooltip_frame_light = 2131165310;
-
- // aapt resource value: 0x7F07007F
- public const int TrierImageB = 2131165311;
-
- // aapt resource value: 0x7F070080
- public const int UsersExiticon = 2131165312;
+ public const int TrierImageB = 2131165306;
static Drawable()
{
diff --git a/TheGameExtreme.Android/Resources/TrierImageB.png b/TheGameExtreme.Android/Resources/TrierImageB.png
deleted file mode 100644
index 347821f..0000000
Binary files a/TheGameExtreme.Android/Resources/TrierImageB.png and /dev/null differ
diff --git a/TheGameExtreme.Android/Resources/drawable/Apple.png b/TheGameExtreme.Android/Resources/drawable/Apple.png
deleted file mode 100644
index a8533f0..0000000
Binary files a/TheGameExtreme.Android/Resources/drawable/Apple.png and /dev/null differ
diff --git a/TheGameExtreme.Android/Resources/drawable/Engrenage.jpeg b/TheGameExtreme.Android/Resources/drawable/Engrenage.jpeg
deleted file mode 100644
index 47ba18b..0000000
Binary files a/TheGameExtreme.Android/Resources/drawable/Engrenage.jpeg and /dev/null differ
diff --git a/TheGameExtreme.Android/Resources/drawable/IconPique.ico b/TheGameExtreme.Android/Resources/drawable/IconPique.ico
deleted file mode 100644
index 2123e66..0000000
Binary files a/TheGameExtreme.Android/Resources/drawable/IconPique.ico and /dev/null differ
diff --git a/TheGameExtreme.Android/Resources/drawable/UsersExiticon.png b/TheGameExtreme.Android/Resources/drawable/UsersExiticon.png
deleted file mode 100644
index 192cebc..0000000
Binary files a/TheGameExtreme.Android/Resources/drawable/UsersExiticon.png and /dev/null differ
diff --git a/TheGameExtreme.Android/Resources/drawable/rules.png b/TheGameExtreme.Android/Resources/drawable/rules.png
deleted file mode 100644
index 104fe85..0000000
Binary files a/TheGameExtreme.Android/Resources/drawable/rules.png and /dev/null differ
diff --git a/TheGameExtreme.Android/Resources/drawable/rulesImg.png b/TheGameExtreme.Android/Resources/drawable/rulesImg.png
deleted file mode 100644
index 65d99c4..0000000
Binary files a/TheGameExtreme.Android/Resources/drawable/rulesImg.png and /dev/null differ
diff --git a/TheGameExtreme.Android/TheGameExtreme.Android.csproj b/TheGameExtreme.Android/TheGameExtreme.Android.csproj
index ee1ccb0..ab714e6 100644
--- a/TheGameExtreme.Android/TheGameExtreme.Android.csproj
+++ b/TheGameExtreme.Android/TheGameExtreme.Android.csproj
@@ -81,12 +81,6 @@
-
-
-
-
-
-
@@ -105,15 +99,6 @@
-
-
-
-
-
-
-
-
-
@@ -130,27 +115,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
MSBuild:UpdateGeneratedFiles
diff --git a/TheGameExtreme.iOS/Apple.ico b/TheGameExtreme.iOS/Apple.ico
deleted file mode 100644
index 5c179eb..0000000
Binary files a/TheGameExtreme.iOS/Apple.ico and /dev/null differ
diff --git a/TheGameExtreme.iOS/IconPique.ico b/TheGameExtreme.iOS/IconPique.ico
deleted file mode 100644
index 2123e66..0000000
Binary files a/TheGameExtreme.iOS/IconPique.ico and /dev/null differ
diff --git a/TheGameExtreme.iOS/OrderStacks.csproj b/TheGameExtreme.iOS/OrderStacks.csproj
index 0ee0d97..42dfc51 100644
--- a/TheGameExtreme.iOS/OrderStacks.csproj
+++ b/TheGameExtreme.iOS/OrderStacks.csproj
@@ -79,12 +79,10 @@
-
- TheGameExtreme.iOS.Resources.Apple.png
-
-
-
-
+
+
+
+
@@ -141,29 +139,12 @@
TheGameExtreme
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TheGameExtreme.iOS/Resources/AndroidManifest.xml b/TheGameExtreme.iOS/Resources/AndroidManifest.xml
deleted file mode 100644
index a2e8d0c..0000000
--- a/TheGameExtreme.iOS/Resources/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TheGameExtreme.iOS/Resources/Apple.ico b/TheGameExtreme.iOS/Resources/Apple.ico
deleted file mode 100644
index 5c179eb..0000000
Binary files a/TheGameExtreme.iOS/Resources/Apple.ico and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/Apple.png b/TheGameExtreme.iOS/Resources/Apple.png
deleted file mode 100644
index a8533f0..0000000
Binary files a/TheGameExtreme.iOS/Resources/Apple.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/Default-568h@2x.png b/TheGameExtreme.iOS/Resources/Default-568h@2x.png
deleted file mode 100644
index 26c6461..0000000
Binary files a/TheGameExtreme.iOS/Resources/Default-568h@2x.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/Default-Portrait.png b/TheGameExtreme.iOS/Resources/Default-Portrait.png
deleted file mode 100644
index 5d0d1ab..0000000
Binary files a/TheGameExtreme.iOS/Resources/Default-Portrait.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/Default-Portrait@2x.png b/TheGameExtreme.iOS/Resources/Default-Portrait@2x.png
deleted file mode 100644
index 0ee2688..0000000
Binary files a/TheGameExtreme.iOS/Resources/Default-Portrait@2x.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/Default.png b/TheGameExtreme.iOS/Resources/Default.png
deleted file mode 100644
index b74643c..0000000
Binary files a/TheGameExtreme.iOS/Resources/Default.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/Default@2x.png b/TheGameExtreme.iOS/Resources/Default@2x.png
deleted file mode 100644
index dbd6bd3..0000000
Binary files a/TheGameExtreme.iOS/Resources/Default@2x.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/Engrenage.jpeg b/TheGameExtreme.iOS/Resources/Engrenage.jpeg
deleted file mode 100644
index 47ba18b..0000000
Binary files a/TheGameExtreme.iOS/Resources/Engrenage.jpeg and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/IconPique.ico b/TheGameExtreme.iOS/Resources/IconPique.ico
deleted file mode 100644
index 2123e66..0000000
Binary files a/TheGameExtreme.iOS/Resources/IconPique.ico and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/IconPique60ptmax.ico b/TheGameExtreme.iOS/Resources/IconPique60ptmax.ico
deleted file mode 100644
index e5b2db2..0000000
Binary files a/TheGameExtreme.iOS/Resources/IconPique60ptmax.ico and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/TrierImage.ico b/TheGameExtreme.iOS/Resources/TrierImage.ico
deleted file mode 100644
index 8d94e8b..0000000
Binary files a/TheGameExtreme.iOS/Resources/TrierImage.ico and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/UsersExiticon.png b/TheGameExtreme.iOS/Resources/UsersExiticon.png
deleted file mode 100644
index 192cebc..0000000
Binary files a/TheGameExtreme.iOS/Resources/UsersExiticon.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/imagesRules.png b/TheGameExtreme.iOS/Resources/imagesRules.png
new file mode 100644
index 0000000..52a4df2
Binary files /dev/null and b/TheGameExtreme.iOS/Resources/imagesRules.png differ
diff --git a/TheGameExtreme.iOS/Resources/la-rotation-des-engrenages-318-56336.jpg b/TheGameExtreme.iOS/Resources/la-rotation-des-engrenages-318-56336.jpg
deleted file mode 100644
index e4b966f..0000000
Binary files a/TheGameExtreme.iOS/Resources/la-rotation-des-engrenages-318-56336.jpg and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/rules.png b/TheGameExtreme.iOS/Resources/rules.png
deleted file mode 100644
index 104fe85..0000000
Binary files a/TheGameExtreme.iOS/Resources/rules.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/Resources/rulesImg.png b/TheGameExtreme.iOS/Resources/rulesImg.png
deleted file mode 100644
index 65d99c4..0000000
Binary files a/TheGameExtreme.iOS/Resources/rulesImg.png and /dev/null differ
diff --git a/TheGameExtreme.iOS/TrierImageB.ico b/TheGameExtreme.iOS/TrierImageB.ico
index 58422bb..6888576 100644
Binary files a/TheGameExtreme.iOS/TrierImageB.ico and b/TheGameExtreme.iOS/TrierImageB.ico differ
diff --git a/TheGameExtreme/model/gameActions/classic/GameModeClassic.cs b/TheGameExtreme/model/gameActions/classic/GameModeClassic.cs
index 0058a88..c020abe 100644
--- a/TheGameExtreme/model/gameActions/classic/GameModeClassic.cs
+++ b/TheGameExtreme/model/gameActions/classic/GameModeClassic.cs
@@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.classic
}
else
{
- Message = ((JouerUneCarteClassic)gameActions[1]).ErrorMessage;
+ TestEndGame(currentHand);
+ if (!end)
+ {
+ Message = ((JouerUneCarteClassic)gameActions[1]).ErrorMessage;
+ }
return false;
}
}
diff --git a/TheGameExtreme/model/gameActions/decimals/GameModeDecimal.cs b/TheGameExtreme/model/gameActions/decimals/GameModeDecimal.cs
index 4bb0c7c..e15b2e1 100644
--- a/TheGameExtreme/model/gameActions/decimals/GameModeDecimal.cs
+++ b/TheGameExtreme/model/gameActions/decimals/GameModeDecimal.cs
@@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.decimals
}
else
{
- Message = ((JouerUneCarteDecimal)gameActions[1]).ErrorMessage;
+ TestEndGame(currentHand);
+ if (!end)
+ {
+ Message = ((JouerUneCarteDecimal)gameActions[1]).ErrorMessage;
+ }
return false;
}
}
diff --git a/TheGameExtreme/model/gameActions/fraction/GameModeFraction.cs b/TheGameExtreme/model/gameActions/fraction/GameModeFraction.cs
index aec63a3..ad4ee86 100644
--- a/TheGameExtreme/model/gameActions/fraction/GameModeFraction.cs
+++ b/TheGameExtreme/model/gameActions/fraction/GameModeFraction.cs
@@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.fraction
}
else
{
- Message = ((JouerUneCarteFraction)gameActions[1]).ErrorMessage;
+ TestEndGame(currentHand);
+ if (!end)
+ {
+ Message = ((JouerUneCarteFraction)gameActions[1]).ErrorMessage;
+ }
return false;
}
}
diff --git a/TheGameExtreme/view/GamePreparationPage.xaml b/TheGameExtreme/view/GamePreparationPage.xaml
index b19a883..c357bfe 100644
--- a/TheGameExtreme/view/GamePreparationPage.xaml
+++ b/TheGameExtreme/view/GamePreparationPage.xaml
@@ -21,31 +21,26 @@
-
+
-
-
-
+ BackgroundColor="Transparent"/>
-
+ CornerRadius="10"/>
diff --git a/TheGameExtreme/view/GamePreparationPage.xaml.cs b/TheGameExtreme/view/GamePreparationPage.xaml.cs
index d680988..760a909 100644
--- a/TheGameExtreme/view/GamePreparationPage.xaml.cs
+++ b/TheGameExtreme/view/GamePreparationPage.xaml.cs
@@ -43,6 +43,7 @@ namespace TheGameExtreme.view
IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex);
await Navigation.PopAsync();
}
+
protected override bool OnBackButtonPressed()
{
IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex);
diff --git a/TheGameExtreme/view/HomePage.xaml b/TheGameExtreme/view/HomePage.xaml
index ac74460..4cc17c2 100644
--- a/TheGameExtreme/view/HomePage.xaml
+++ b/TheGameExtreme/view/HomePage.xaml
@@ -7,83 +7,80 @@
xmlns:resources="clr-namespace:TheGameExtreme.Resx"
x:Class="TheGameExtreme.view.HomePage">
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
-
-
+
-
+
-
+
diff --git a/TheGameExtreme/view/MainPage.xaml b/TheGameExtreme/view/MainPage.xaml
index 1a197d9..8b905a6 100644
--- a/TheGameExtreme/view/MainPage.xaml
+++ b/TheGameExtreme/view/MainPage.xaml
@@ -12,7 +12,8 @@
x:Class="TheGameExtreme.view.MainPage">
+ x:Name="Display"
+ Margin="10,10,10,10">
diff --git a/TheGameExtreme/view/MainPage.xaml.cs b/TheGameExtreme/view/MainPage.xaml.cs
index d194d5b..c69d5d0 100644
--- a/TheGameExtreme/view/MainPage.xaml.cs
+++ b/TheGameExtreme/view/MainPage.xaml.cs
@@ -7,8 +7,6 @@ using SkiaSharp;
using SkiaSharp.Views.Forms;
using TouchTracking;
using Xamarin.Essentials;
-using System.IO;
-using System.Reflection;
using TheGameExtreme.Resx;
namespace TheGameExtreme.view
@@ -197,29 +195,26 @@ namespace TheGameExtreme.view
stackCollection.Clear();
SKPaint textPaint = new SKPaint();
- SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / (viewmodel.getListOrderedStacks().Count * 2)) + (float)(DeviceDisplay.MainDisplayInfo.Width * 0.01), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.1) + (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.01 + 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
+ SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width) / (viewmodel.getListOrderedStacks().Count * 2)), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.1) + (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.01 + 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
float inflateWidth;
if (indexMode == 4 || indexMode == 3)
{
- inflateWidth = 0.02f * (float)DeviceDisplay.MainDisplayInfo.Width;
+ inflateWidth = 0.01f * (float)DeviceDisplay.MainDisplayInfo.Width;
}
else
{
inflateWidth = 0.02f * (float)DeviceDisplay.MainDisplayInfo.Width;
}
+ position.X -= inflateWidth;
+
for (int i = 0; i < viewmodel.getListOrderedStacks().Count; i++)
{
textPaint = new SKPaint();
float textWidth;
- if (indexMode == 2 || indexMode == 5)
- {
- textWidth = textPaint.MeasureText("00");
- textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
- }
- else if (indexMode == 3)
+ if (indexMode == 3)
{
textWidth = textPaint.MeasureText("000");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000");
@@ -231,8 +226,8 @@ namespace TheGameExtreme.view
}
else
{
+ textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
- textWidth = textPaint.MeasureText(viewmodel.getListOrderedStacks()[i].Peek().Value.ToString());
}
position.X -= textWidth * 0.5f;
@@ -243,7 +238,7 @@ namespace TheGameExtreme.view
InitialPoint = position
});
- position.X += (float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / viewmodel.getListOrderedStacks().Count) + textWidth * 0.5f;
+ position.X += (float)((DeviceDisplay.MainDisplayInfo.Width) / viewmodel.getListOrderedStacks().Count);
}
}
@@ -254,7 +249,7 @@ namespace TheGameExtreme.view
private void InflateHand()
{
SKPaint textPaint = new SKPaint();
- SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / (viewmodel.CurrentHand.Count * 2)) + (float)(DeviceDisplay.MainDisplayInfo.Width * 0.01), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.9) - (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.1 - 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
+ SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width) / (viewmodel.CurrentHand.Count * 2)), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.9) - (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.1 - 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
float inflateWidth;
if (indexMode == 4 || indexMode == 3)
@@ -266,17 +261,14 @@ namespace TheGameExtreme.view
inflateWidth = 0.015f * (float)DeviceDisplay.MainDisplayInfo.Width;
}
+ position.X -= inflateWidth;
+
for (int i = 0; i < viewmodel.CurrentHand.Count; i++)
{
textPaint = new SKPaint();
float textWidth;
- if (indexMode == 2 || indexMode == 5)
- {
- textWidth = textPaint.MeasureText("00");
- textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
- }
- else if (indexMode == 3)
+ if (indexMode == 3)
{
textWidth = textPaint.MeasureText("000");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000");
@@ -288,8 +280,8 @@ namespace TheGameExtreme.view
}
else
{
+ textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
- textWidth = textPaint.MeasureText(viewmodel.CurrentHand[i].Value.ToString());
}
position.X -= textWidth * 0.5f;
@@ -300,7 +292,7 @@ namespace TheGameExtreme.view
InitialPoint = position
});
- position.X += (float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / viewmodel.CurrentHand.Count) + textWidth * 0.5f;
+ position.X += (float)((DeviceDisplay.MainDisplayInfo.Width) / viewmodel.CurrentHand.Count);
}
}
@@ -316,7 +308,7 @@ namespace TheGameExtreme.view
Button retryButton = new Button();
retryButton.Text = "Retry";
retryButton.Clicked += Retry;
- retryButton.BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"];
+ retryButton.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(retryButton);
}
@@ -347,6 +339,8 @@ namespace TheGameExtreme.view
viewmodel.EndGame += OnEndGame;
+ viewmodel.AlertChanged += OnAlertChanged;
+
pseudo.SetBinding(Label.TextProperty, new Binding("Pseudo", source: viewmodel));
textCollection.Clear();
@@ -358,8 +352,8 @@ namespace TheGameExtreme.view
gameOption.Children.Clear();
Button button = new Button();
button.Text = AppResources.StrEndTurn;
- button.Clicked += Retry;
- button.BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"];
+ button.Clicked += EndTurn;
+ button.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(button);
}
diff --git a/TheGameExtreme/view/TouchManipulationCard.cs b/TheGameExtreme/view/TouchManipulationCard.cs
index 8c0b5ad..925c79d 100644
--- a/TheGameExtreme/view/TouchManipulationCard.cs
+++ b/TheGameExtreme/view/TouchManipulationCard.cs
@@ -33,7 +33,7 @@ namespace TheGameExtreme.view
this.textPaint = textPaint;
Value = value;
this.width = width;
- height = 2f * this.width;
+ height = (0.2f * (float)DeviceDisplay.MainDisplayInfo.Height - textPaint.TextSize) * 0.5f;
if (Value.View.GetType() == typeof(FractionCard))
{
@@ -49,7 +49,7 @@ namespace TheGameExtreme.view
{
if (Value.Value.CompareTo(-10m) <= 0)
{
- this.width -= textPaint.MeasureText("0") * 0.5f;
+ this.width -= textPaint.MeasureText("0") * 0.25f;
}
if (Value.Value.CompareTo(0m) >= 0 && Value.Value.CompareTo(10) < 0)
{
@@ -109,16 +109,16 @@ namespace TheGameExtreme.view
canvas.DrawRect(card, textPaint1);
if (((FractionCard)Value.View).Fraction.Numerateur < 10 && ((FractionCard)Value.View).Fraction.Numerateur > 0)
{
- canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Numerateur.ToString()) * 0.5f, -50, textPaint);
+ canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Numerateur.ToString()) * 0.5f, - textPaint.TextSize * 0.5f - height * 0.5f, textPaint);
}
else
{
- canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), 0, -50, textPaint);
+ canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), 0, - textPaint.TextSize * 0.5f - height * 0.5f, textPaint);
}
- canvas.DrawText("__", textPaint.MeasureText("__") * 0.1f, -textPaint.TextSize * 0.4f, textPaint1);
+ canvas.DrawText("__", textPaint.MeasureText("__") * 0.1f, -textPaint.TextSize * 0.6f, textPaint1);
if (((FractionCard)Value.View).Fraction.Denominateur < 10 && ((FractionCard)Value.View).Fraction.Denominateur > 0)
{
- canvas.DrawText(((FractionCard)Value.View).Fraction.Denominateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Denominateur.ToString()) * 0.5f, 50, textPaint2);
+ canvas.DrawText(((FractionCard)Value.View).Fraction.Denominateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Denominateur.ToString()) * 0.5f, height * 0.5f, textPaint2);
}
else
{