Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 2 (modified by bknecht, 15 years ago) (diff)

Graphical User Interface

TracNav(TracNav/TOC_Development)?

The GUI in Orxonox is administered with CEGUI. We use the GUI for interactions with the user in shops, Questsystem or parts of the HUD and of course the main menu.

CEGUI

CEGUI (Crazy Edi's GUI) is available for various graphic engines like Ogre or Irrlicht. In Orxonox we use the OgreCEGUIRenderer to display our GUI.

GUI Framework

The framework consists of various elements, putting all necessary elements together for a functioning GUI. Those elements are basically the GUIManager, Lua-scripts, layouts and the corresponding graphics.

GUIManager

Written in C++ the GUIManager manages all the GUIs in Orxonox and represents the interface to CEGUI. Connected to Lua via a tolua++ interface it is able to load Lua-scripts and connect C++-functions to Lua and vice versa.

Lua-scripts

Lua-scripts are written in Lua and implement the functionalities of CEGUI like interactivity. Each GUI needs a separate Lua-script which will be loaded by the main script.

Usually you would set some variables and define some events inside the Lua-script. You may want for instance to define what layout you want to load. Check out the existing scripts to get an idea of the intended use.

Imagesets

Images are loaded in so called imagesets. As the name suggests, you can group several images into one single imageset. This can be used for instance when defining "active", "hover", "clicked" and "inactive" state of a button. You'd load just one image file into the imageset, but define various images from that imageset.

Imageset files are written in XML and very easy to use. To be able to use the specified images though, you need to include the imageset into a scheme file.

Schemes

Layouts

GUI-Elements

Winodws

Cursor