Changes between Version 8 and Version 9 of code/doc/GUI
- Timestamp:
- May 21, 2009, 5:29:49 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/doc/GUI
v8 v9 96 96 Every 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. 97 97 98 ==== Window ==== 99 100 Every 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 106 Please 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 {{{ 110 win = windowManager:createWindow("TaharezLook/Button", "test") 111 if b_disableNewButtons == false then 112 win:enable() 113 else 114 win:disable() 115 end 116 }}} 117 118 98 119 ==== Listbox ==== 99 120