Well, the fact you've got a window up means that you already know 95% of what you need to know to create all those other widget types you mention, just specifying the appropriate type and optional name. The types available to you is generally determined by the scheme(s) you load, although types may also come via other places (such as concrete types, aliases and mappings specified in code, most people never need this level of functionality). So, if you were using the WindowsLook scheme, to create a (single line) text box, you might do:
Code: Select all
CEGUI::Editbox* eb1 = static_cast<CEGUI::Editbox*>(
CEGUI::WindowManager::getSingleton().createWindow( "WindowsLook/Editbox", "Editbox_1" ));
The basic approach is to create the window, add it to some parent, and then set the window's position, size and other settings and properties. The available settings and such are determined by the concrete type that underlies the widget created (such as CEGUI::PushButton for normal buttons, CEGUI::Checkbox for the check box, CEGUI::Editbox for the (single line) edit box / text box and so on. The class reference contains details, though it can be a bit daunting:
http://www.cegui.org.uk/docs/current/classes.html), and also by the WidgetLook that is in use which may specify additional properties that can be accessed via the getProperty and setProperty member functions. The exact properties available depend upon the skin / scheme in use, though for TaharezLook you can look here:
http://www.cegui.org.uk/wiki/index.php/SetProperty and for WindowsLook, here:
http://www.cegui.org.uk/wiki/index.php/ ... owsLook%29 though do note this pages are a little out of date. I am hoping to update those some time soon.
Note also that some types, such as the StaticText and StaticImage do not have an associated class (i.e. there is no CEGUI::StaticImage class), rather everything is done via the property interface.
And I also wanted to know, is there something special to do to activate the background imagery of a window? I'm using a test of the imageset TaharezLook but the bottom with the square does not appear in my window.
As far as this goes, what you can and can't do - and indeed how you do it - depends heavily on what the window type is, and what the WidgetLook definition makes available - virtually all visual aspects of a window can be controlled via it's WidgetLook definition (which comes from the XML looknfeel file).
CE.