A nice window, but now ?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
ArKada
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Jan 23, 2009 14:46

A nice window, but now ?

Postby ArKada » Sat May 08, 2010 21:02

Hello everyone ! :D
I'm using Cegui for the first time. I managed to create a window with code, i want to create, always with code, buttons, text boxes etc. ...
I looked everywhere but I never found how i can. (Sorry if I've been a side of the plate)

How do I do ? :?

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.

Greetings everyone :rofl:

Arkada aka Gouwi

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: A nice window, but now ?

Postby CrazyEddie » Sun May 09, 2010 15:18

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests