I wanted to change button image with LUA. This is the code so far:
Code: Select all
local button = wmgr:createWindow("WindowsLook/Button","toolbartestbutton");
button:setText( "Test" )
button:setSize( CEGUI.Size:new_local(0.5,0.1) )
button:setPosition( CEGUI.Point:new_local(0.0,0.8) )
local imagesetman = CEGUI.ImagesetManager:getSingleton()
local imageset = imagesetman:getImageset("Editor")
local image = imageset:getImage("ToolbarIcon1")
button:setProperty( "NormalImage", image );
As you might guess, it does not work as property gets always a string a parameter. How can I make this work?
I really would like to see more LUA+CEGUI source code online. Good documentation would not hurt either.