mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-11-03 16:49:58 +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"
 | 
					             xmlns:urho="clr-namespace:Urho.Forms;assembly=UrhoSharp.Forms"
 | 
				
			||||||
             x:Class="AideDeJeu.Views.DicesPage" 
 | 
					             x:Class="AideDeJeu.Views.DicesPage" 
 | 
				
			||||||
             Appearing="ContentPage_Appearing"
 | 
					             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"-->
 | 
					    <!--Visual="Material"-->
 | 
				
			||||||
    <ContentPage.Content>
 | 
					    <ContentPage.Content>
 | 
				
			||||||
        <StackLayout>
 | 
					        <StackLayout>
 | 
				
			||||||
| 
						 | 
					@ -71,7 +78,10 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            </skviews:SKCanvasView>-->
 | 
					            </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" />
 | 
					            <urho:UrhoSurface x:Name="HelloWorldUrhoSurface" VerticalOptions="FillAndExpand" BackgroundColor="White" />
 | 
				
			||||||
        </StackLayout>
 | 
					        </StackLayout>
 | 
				
			||||||
    </ContentPage.Content>
 | 
					    </ContentPage.Content>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -92,6 +92,7 @@ namespace AideDeJeu.Views
 | 
				
			||||||
            try
 | 
					            try
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                var ao = new Urho.ApplicationOptions(assetsFolder: null);
 | 
					                var ao = new Urho.ApplicationOptions(assetsFolder: null);
 | 
				
			||||||
 | 
					                HelloWorldUrhoSurface = new Urho.Forms.UrhoSurface();
 | 
				
			||||||
                charts = await HelloWorldUrhoSurface.Show<Charts>(ao);
 | 
					                charts = await HelloWorldUrhoSurface.Show<Charts>(ao);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch(Exception ex)
 | 
					            catch(Exception ex)
 | 
				
			||||||
| 
						 | 
					@ -116,7 +117,7 @@ namespace AideDeJeu.Views
 | 
				
			||||||
            charts?.Bars.ForEach(b => b.SetValueWithAnimation((new Dice()).Roll("3d6", new RandomDieRoller()).Value));
 | 
					            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));
 | 
					            charts?.Bars.ForEach(b => b.SetValueWithAnimation((new Dice()).Roll("3d6", new RandomDieRoller()).Value));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -133,6 +134,11 @@ namespace AideDeJeu.Views
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch { }
 | 
					            catch { }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void Menu_Clicked(object sender, EventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            Shell.Current.GoToAsync("//home", true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    public class HelloWorld : Urho.Application
 | 
					    public class HelloWorld : Urho.Application
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue