GUI Menu Setup
Hi.
I'm currently in the works of making a pretty GUI-heavy game with NoesisGUI for Unity. I've got the basics down, but I'm still wondering how to best switch between different menus/submenus in the game.
Say, for instance, I have a Main Menu, consisting of multiple buttons. The Settings-button opens the Settings-menu, and the Profile-button opens the Profile-menu, etc. Each submenu (Profile, Settings, etc.) also has buttons to go back to the Main Menu, as well as to other specific menu-screens.
So my questions is: How would one go about to best implement switching between menus/views taking up the whole screen with NoesisGUI in Unity?
What should the triggered Button-click do? Switch to a separate .xaml-file? Enable/disable buttons (would be a lot of buttons to handle, so maybe enabling/disabling menu-states)?
Hope it's not too much of a silly questions, but I'm kind of unsure of how to go about this.
Thanks!
I'm currently in the works of making a pretty GUI-heavy game with NoesisGUI for Unity. I've got the basics down, but I'm still wondering how to best switch between different menus/submenus in the game.
Say, for instance, I have a Main Menu, consisting of multiple buttons. The Settings-button opens the Settings-menu, and the Profile-button opens the Profile-menu, etc. Each submenu (Profile, Settings, etc.) also has buttons to go back to the Main Menu, as well as to other specific menu-screens.
So my questions is: How would one go about to best implement switching between menus/views taking up the whole screen with NoesisGUI in Unity?
What should the triggered Button-click do? Switch to a separate .xaml-file? Enable/disable buttons (would be a lot of buttons to handle, so maybe enabling/disabling menu-states)?
Hope it's not too much of a silly questions, but I'm kind of unsure of how to go about this.
Thanks!
-
-
sfernandez
Site Admin
- Posts: 3222
- Joined:
Re: GUI Menu Setup
There could be many alternatives, I will expose a simple one.
To manage the entire UI you have a master xaml where different panels are loaded and presented in a root container.
You will have each menu panel defined in a different xaml, probably a custom user control. To load a new panel you can call NoesisGUISystem.LoadXaml<T>, or if using user controls, you can directly create a new instance of the user control.
When a menu button is clicked:
To enhance the user experience, you can define animations to transition between menus panels. To do this, you will need a root container that permits adding more than one child, for example, a Canvas or a Grid.
Is this what you are looking for?
To manage the entire UI you have a master xaml where different panels are loaded and presented in a root container.
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Border x:Name="RootContainer">
</Border>
</Grid>
Code: Select all
var startMenu = new StartMenu();
this._rootContainer.SetChild(startMenu);
Code: Select all
var settingsMenu = new SettingsMenu();
this._rootContainer.SetChild(settingsMenu );
Is this what you are looking for?
Re: GUI Menu Setup
By the way, our SamplesGallery, whose source is included in the SDK, is organized that way.
Re: GUI Menu Setup
Thanks!
I'll start working on it from the setup in the ControlGallery-sample. Seems to be a good way of doing it
I'll start working on it from the setup in the ControlGallery-sample. Seems to be a good way of doing it

Re: GUI Menu Setup
We are working in a sample showing a minimal application with several screens and transitions. I think this sample will be a lot easier to study that our Browser.
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 2 guests