new lua function for creating widgets: createWidget

This commit is contained in:
Eduardo Bart
2012-01-02 22:42:53 -02:00
parent 9fbdf3f5cb
commit 05230f44e4
29 changed files with 137 additions and 120 deletions

View File

@@ -12,15 +12,14 @@ local function onCreatureSpeak(name, level, msgtype, message)
style = 'YellowChatLabel'
end
local label = UILabel.create()
label:setStyle(style)
local label = createWidget(style)
label:setText(message)
chatBuffer:addChild(label)
end
-- public functions
function Chat.create()
chatPanel = UI.display('chat.otui', { parent = Game.gameBottomPanel } )
chatPanel = displayUI('chat.otui', { parent = Game.gameBottomPanel } )
chatBuffer = chatPanel:getChildById('chatBuffer')
end