scripting suggestions

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: scripting suggestions

Postby lindquist » Sat Jul 09, 2005 13:39

New update has been committed to CVS HEAD.

A few thing should have an explanation...

Widgets now have bindings. This means that you can write code like this:

Code: Select all

local wm = CEGUI.WindowManager:getSingleton()
local fw = CEGUI.toFrameWindow(wm:createWindow("WindowsLook/FrameWindow","fw"))
fw:setSizingEnabled(false)


I the case of ListboxItems which are not widgets, a helper function is available to create ListboxTextItems:

Code: Select all

local lbti = CEGUI.createListboxTextItem("test item",0,nil,false,true)
lb:addItem(lbti)

assuming that lb is a listbox widget return by the window manager...
the parameter to createListboxTextItem has default values just like the C++ constructor.

Another special case is the Thumb widget.
getVertRange and getHorzRange returns a std::pair to avoid binding any standard c++ stuff, in Lua these now return the pair as two return values. fx:

Code: Select all

local thumb = ...
min,max = thumb:getVertRange()


No RenderableElement classes are exportet yet.

I think that's about it.
Anyone wanting to know more should look at the package directory.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests