diff --git a/AideDeJeu/AideDeJeu/Views/DicesPage.xaml b/AideDeJeu/AideDeJeu/Views/DicesPage.xaml
index f55a6796..cefb639d 100644
--- a/AideDeJeu/AideDeJeu/Views/DicesPage.xaml
+++ b/AideDeJeu/AideDeJeu/Views/DicesPage.xaml
@@ -8,7 +8,7 @@
-
+
@@ -68,6 +68,7 @@
+
diff --git a/AideDeJeu/AideDeJeu/Views/DicesPage.xaml.cs b/AideDeJeu/AideDeJeu/Views/DicesPage.xaml.cs
index 10e9a6ff..d2d170f8 100644
--- a/AideDeJeu/AideDeJeu/Views/DicesPage.xaml.cs
+++ b/AideDeJeu/AideDeJeu/Views/DicesPage.xaml.cs
@@ -1,4 +1,6 @@
using AideDeJeu.ViewModels;
+using OnePlat.DiceNotation;
+using OnePlat.DiceNotation.DieRoller;
using SkiaSharp;
using System;
using System.Collections.Generic;
@@ -8,6 +10,7 @@ using System.Text;
using System.Threading.Tasks;
using Urho;
using Xamarin.Forms;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views
@@ -82,11 +85,16 @@ namespace AideDeJeu.Views
strokeFont.Dispose();
strokePaint.Dispose();
}
-
+ Charts charts = null;
private async void ContentPage_Appearing(object sender, EventArgs e)
{
//await HelloWorldUrhoSurface.Show(new Urho.ApplicationOptions(assetsFolder: null));
- await HelloWorldUrhoSurface.Show(new Urho.ApplicationOptions(assetsFolder: null));
+ charts = await HelloWorldUrhoSurface.Show(new Urho.ApplicationOptions(assetsFolder: null));
+ }
+
+ private void Button_Clicked(object sender, EventArgs e)
+ {
+ charts.Bars.ForEach(b => b.SetValueWithAnimation((new Dice()).Roll("3d6", new RandomDieRoller()).Value));
}
}
public class HelloWorld : Urho.Application
diff --git a/AideDeJeu/AideDeJeu/Views/UrhoTest.cs b/AideDeJeu/AideDeJeu/Views/UrhoTest.cs
index 582aa73e..a1dd405b 100644
--- a/AideDeJeu/AideDeJeu/Views/UrhoTest.cs
+++ b/AideDeJeu/AideDeJeu/Views/UrhoTest.cs
@@ -176,6 +176,7 @@ namespace AideDeJeu.Views
{
finalValue = value;
barNode.RunActionsAsync(new EaseBackOut(new ScaleTo(3f, 1, value / 2, 1)));
+ barNode.RunActionsAsync(new EaseBackOut(new TintTo(3f, new Color(1f - (((float)value - 3f) / 15f), (((float)value - 3f) / 15f), 0, 0.9f))));
}
public Bar(Color color)