History: Miyagi
Preview of version: 13
Miyagi stands for: Miyagi Is Yet Another Graphical user Interface
It can only be used by MOGRE (.NET), not by Ogre itself (C++) code.
For bug reports or feature requests please use this bug tracker.
Download:
Miyagi 1.2.0 (code, binary, sample application)
The documentation is in the Help directory.
Plus there is a sample with source code.
Controls
- Button
- CheckBox
- ComboBox
- DialogBox
- DropDownList
- Expander
- FlowLayoutPanel
- Label
- ListBox
- Panel
- PictureBox
- ProgressBar (horizontal and vertical)
- RadioButton
- RenderBox
- Slider (horizontal and vertical)
- TabControl
- TableLayoutPanel
- TextBox
Additional features
- Import from / export to {LEX()}XML{LEX} file
- 3D Gui
- Scripting via Boo, C#, JScript, Lua, Nemerle, IronPython and VB.Net
Code snippets
Miyagi and MOIS
Miyagi currently relies on MOIS for mouse and keyboard input.
You have to create a Mois.Mouse and Mois.Keyboard (that's done by the 'CreateInput' method in the sample).
And then either supply them as a parameter in 'GuiManager.Singleton.Initialize'
e.g.:
GuiManager.Singleton.Initialize(1024, 768, MySceneManager, MyCamera, MyMouse, MyKeyboard, true);
or set GuiManager.Singleton.Mouse / GuiManager.Singleton.Keyboard directly.
And you have to capture the devices in your program's main loop (for instance in the 'FrameStarted' event handler).
MyKeyboard.Capture(); MyMouse.Capture();
MOIS note 2
After creating Mois.Mouse set this:
MOIS.MouseState_NativePtr state = mouse.MouseState; state.width = (int)renderWindow.Width; state.height = (int)renderWindow.Height;
Mouse visibility and debugging
Problem:
While debugging in Visual Studio (after an exception) the mouse pointer is not visible.
Solution:
Set MOIS to non-exclusive mode when application was started in Debug mode.
MOIS.ParamList pl = new MOIS.ParamList(); IntPtr windowHnd; this.window.GetCustomAttribute("WINDOW", out windowHnd); pl.Insert("WINDOW", windowHnd.ToString()); #if DEBUG pl.Insert("w32_mouse", "DISCL_NONEXCLUSIVE"); pl.Insert("w32_mouse", "DISCL_FOREGROUND"); #endif this.inputManager = MOIS.InputManager.CreateInputSystem(pl);
Note of user Beauty:
Add more snippets, starting from this forum post.
http://www.ogre3d.org/addonforums/viewtopic.php?f=8&t=9025&start=30
See also
Miyagi related:
- SetMousePosition - Miyagi code snippet to set mouse position on given coordinates (until embedded on main code)
Common:
- GUI - an overview of GUI systems
- Mogre MyGUI wrapper - use MyGUI in Mogre
- Hikari Wrapper for MOGRE - embed Adobe Flash into Mogre (e.g. GUI menus)
- MogreBetaGUI
- Easy Debug Text for MOGRE - for plain text display
- Prototype steps of GUI development
- MQuickGUI - an outdated C# port of QuickGUI