[Orxonox-commit 2796] r7499 - in code/branches/tutorial2/data/gui: layouts scripts
dafrick at orxonox.net
dafrick at orxonox.net
Wed Sep 29 14:49:27 CEST 2010
Author: dafrick
Date: 2010-09-29 14:49:26 +0200 (Wed, 29 Sep 2010)
New Revision: 7499
Modified:
code/branches/tutorial2/data/gui/layouts/ChatBox.layout
code/branches/tutorial2/data/gui/scripts/ChatBox.lua
Log:
Fix to get rid of lua/cegui error.
Modified: code/branches/tutorial2/data/gui/layouts/ChatBox.layout
===================================================================
--- code/branches/tutorial2/data/gui/layouts/ChatBox.layout 2010-09-28 20:11:25 UTC (rev 7498)
+++ code/branches/tutorial2/data/gui/layouts/ChatBox.layout 2010-09-29 12:49:26 UTC (rev 7499)
@@ -24,7 +24,6 @@
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.02,0},{1,-30},{0.98,0},{1,-5}}" />
</Window>
- <Event Name="CloseClicked" Function="ChatBox.ChatBoxCloseButton_clicked"/>
</Window>
</Window>
</GUILayout>
Modified: code/branches/tutorial2/data/gui/scripts/ChatBox.lua
===================================================================
--- code/branches/tutorial2/data/gui/scripts/ChatBox.lua 2010-09-28 20:11:25 UTC (rev 7498)
+++ code/branches/tutorial2/data/gui/scripts/ChatBox.lua 2010-09-29 12:49:26 UTC (rev 7499)
@@ -2,6 +2,11 @@
local P = createMenuSheet("ChatBox")
+function P.onLoad()
+ local window = winMgr:getWindow("orxonox/ChatBox")
+ orxonox.GUIManager:subscribeEventHelper(window, "CloseClicked", P.name .. ".ChatBoxCloseButton_clicked")
+end
+
function P.ChatBoxCloseButton_clicked(e)
orxonox.ChatInputHandler:getInstance():deactivate()
end
More information about the Orxonox-commit
mailing list