fix and move textmessage to a module

master
Eduardo Bart 13 years ago
parent 667ff41ad9
commit f444dc624c

@ -1,5 +1,3 @@
require 'textmessage'
-- private functions
local function onGameKeyPress(self, keyCode, keyChar, keyboardModifiers)
if keyboardModifiers == KeyboardCtrlModifier then
@ -18,7 +16,7 @@ end
function Game.createInterface()
Background.hide()
CharacterList.destroyLoadBox()
Game.gameUi = loadUI('/game/ui/gameinterface.otui', UI.root)
Game.gameUi = loadUI('/game/game.otui', UI.root)
Game.gameMapPanel = Game.gameUi:getChildById('mapPanel')
Game.gameRightPanel = Game.gameUi:getChildById('rightPanel')
Game.gameBottomPanel = Game.gameUi:getChildById('bottomPanel')

@ -1,7 +1,7 @@
TextMessage = {}
-- require styles
importStyles '/game/ui/textmessage.otui'
importStyles '/textmessage/textmessage.otui'
-- private variables
local bottomLabelWidget, centerLabelWidget
@ -56,3 +56,7 @@ function Game.onTextMessage(type, message)
end, time)
end
end
connect(Game, { onLogin = TextMessage.create,
onLogout = TextMessage.destroy })

@ -0,0 +1,13 @@
Module
name: textmessage
description: Manage game text messages
author: OTClient team
website: https://github.com/edubart/otclient
autoLoad: true
dependencies:
- game
onLoad: |
require 'textmessage'
return true
Loading…
Cancel
Save