Code: Select all
local root = winMgr:loadWindowLayout("ppt.layout")
root:setMousePassThroughEnabled( true)
CEGUI.System:getSingleton():getGUISheet():addChildWindow(root)
function luaRollUp(e)
local we = CEGUI.toWindowEventArgs(e)
we.window:toggleRollup()
if we.window:isRollup() then
we.window:setText("ON ROLLUP OFF");
else
we.window:setText("ON ROLLUP ON");
end
end
root:subscribeEvent("RollUpToggled","luaRollUp")
root:subscribeEvent("RollupToggled","luaRollUp")
So First it never entered on the function, maybe it's not RollUpToogled ? in c++ it's EventRollupToogled
So i tried to associate it to the CloseClicked
Code: Select all
root:subscribeEvent("CloseClicked","luaRollUp")
But now it crashed, because i guess i should cast it to FrameWindow but i don't know how to do that in lua