mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 22:45:44 +00:00
Workaround menu sous urho surface (qui pose d'autres problèmes)
This commit is contained in:
parent
bd7e55938e
commit
1f7ba9b51f
2 changed files with 19 additions and 3 deletions
|
|
@ -6,7 +6,14 @@
|
|||
xmlns:urho="clr-namespace:Urho.Forms;assembly=UrhoSharp.Forms"
|
||||
x:Class="AideDeJeu.Views.DicesPage"
|
||||
Appearing="ContentPage_Appearing"
|
||||
Disappearing="ContentPage_Disappearing" Title="Dés" >
|
||||
Disappearing="ContentPage_Disappearing"
|
||||
Title="Dés"
|
||||
Shell.FlyoutBehavior="Disabled"
|
||||
Visual="Material">
|
||||
<!--<Shell.BackButtonBehavior>
|
||||
<BackButtonBehavior Command="{Binding BackCommand}"
|
||||
IconOverride="back.png" />
|
||||
</Shell.BackButtonBehavior>-->
|
||||
<!--Visual="Material"-->
|
||||
<ContentPage.Content>
|
||||
<StackLayout>
|
||||
|
|
@ -71,7 +78,10 @@
|
|||
|
||||
</skviews:SKCanvasView>-->
|
||||
|
||||
<Button Text="Générer" Clicked="Button_Clicked"/>
|
||||
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
|
||||
<Button Text="Menu" Clicked="Menu_Clicked"/>
|
||||
<Button Text="Générer" Clicked="Refresh_Clicked"/>
|
||||
</StackLayout>
|
||||
<urho:UrhoSurface x:Name="HelloWorldUrhoSurface" VerticalOptions="FillAndExpand" BackgroundColor="White" />
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ namespace AideDeJeu.Views
|
|||
try
|
||||
{
|
||||
var ao = new Urho.ApplicationOptions(assetsFolder: null);
|
||||
HelloWorldUrhoSurface = new Urho.Forms.UrhoSurface();
|
||||
charts = await HelloWorldUrhoSurface.Show<Charts>(ao);
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
|
@ -116,7 +117,7 @@ namespace AideDeJeu.Views
|
|||
charts?.Bars.ForEach(b => b.SetValueWithAnimation((new Dice()).Roll("3d6", new RandomDieRoller()).Value));
|
||||
}
|
||||
|
||||
private void Button_Clicked(object sender, EventArgs e)
|
||||
private void Refresh_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
charts?.Bars.ForEach(b => b.SetValueWithAnimation((new Dice()).Roll("3d6", new RandomDieRoller()).Value));
|
||||
}
|
||||
|
|
@ -133,6 +134,11 @@ namespace AideDeJeu.Views
|
|||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void Menu_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
Shell.Current.GoToAsync("//home", true);
|
||||
}
|
||||
}
|
||||
public class HelloWorld : Urho.Application
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue