fix and move textmessage to a module

This commit is contained in:
Eduardo Bart 2011-11-03 20:16:47 -02:00
parent 667ff41ad9
commit f444dc624c
5 changed files with 19 additions and 4 deletions

View File

@ -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')

View File

@ -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 })

View File

@ -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