Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 8 and Version 9 of code/doc/GUI


Ignore:
Timestamp:
May 21, 2009, 5:29:49 PM (16 years ago)
Author:
bknecht
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/GUI

    v8 v9  
    9696Every GUI-element is a window. The underlying class-structure inherits everything from a basic window element. Buttons and text input elements implement various new parameters and functions. They also need different kinds of images. At the moment we advise to use a predefined look for our GUI, namely the !TaharezLook. However this may change in the future, when we want to define our own looks. Check out the parameters and functions of each element in the layouts already in the media directory or in the [http://www.cegui.org.uk/api_reference/ CEGUI-API]. The API is written for C++, but you can access the same function in a similar fashion, using Lua or XML.
    9797
     98==== Window ====
     99
     100Every element in CEGUI is a window. So all elements have the following properties. You may want to disable or enable certain elements to render them unresponsive to user input. Some elements like buttons do change their look, when you change their state. Every element is enabled by default. To disable an element from the beginning you can add this line to your layout:
     101
     102{{{
     103<Property Name="Disabled" Value="true"/>
     104}}}
     105
     106Please note, that there is no property called ''Enabled''. So trying to set it to ''false'' will not work. In Lua however you can either enable or disable a window simply like this:
     107
     108
     109{{{
     110win = windowManager:createWindow("TaharezLook/Button", "test")
     111if b_disableNewButtons == false then
     112    win:enable()
     113else
     114    win:disable()
     115end
     116}}}
     117
     118
    98119==== Listbox ====
    99120