Problems with a simple LUA script (handling?)
Posted: Mon Sep 25, 2006 15:18
Since there's practically no references for using LUA with CEGUI, I have spent some time guessing what to do. This is my very first LUA-script, so I'm not sure wether it is correct or not:
I have a button that is named as "LuaButton" and this script should change it's text into "test". But it doesn't do anything.
If the script is correct, then I guess I have some problems with lauching/handling the script...
Code: Select all
function luabtn_clicked(e)
local winMgr = CEGUI.WindowManager:getSingleton()
local temp = ceguiLua_toPushButton(winMgr:getWindow("LuaButton"))
temp:setText("test")
end
I have a button that is named as "LuaButton" and this script should change it's text into "test". But it doesn't do anything.
If the script is correct, then I guess I have some problems with lauching/handling the script...