add chat panel, send text messages, guard forbidden functions with an ifdef

This commit is contained in:
Eduardo Bart
2011-11-03 18:54:53 -02:00
parent 6d6479e4a9
commit b216b00a32
16 changed files with 142 additions and 37 deletions

19
modules/chat/chat.lua Normal file
View File

@@ -0,0 +1,19 @@
Chat = {}
-- private variables
local chatPanel
-- public functions
function Chat.create()
chatPanel = loadUI("/chat/chat.otui", Game.gameBottomPanel)
end
function Chat.destroy()
chatPanel:destroy()
chatPanel = nil
end
-- hooked events
connect(Game, { onLogin = Chat.create,
onLogout = Chat.destroy })