Multiprotocol 8.1-9.6 finally working

Still have many minor issues, tests are needed
No recompilation needed anymore
9.60 messages is not fully implemented
This commit is contained in:
Eduardo Bart
2012-07-26 06:12:20 -03:00
parent 98c279c10b
commit 36c029fc69
28 changed files with 575 additions and 511 deletions

View File

@@ -32,6 +32,7 @@ table.insert(LifeBarColors, {percentAbove = 3, color = '#3C0000' } )
table.insert(LifeBarColors, {percentAbove = -1, color = '#4F0000' } )
function init()
g_ui.importStyle('battlebutton.otui')
battleWindow = g_ui.loadUI('battle.otui', modules.game_interface.getRightPanel())
battleButton = TopMenu.addRightGameToggleButton('battleButton', tr('Battle') .. ' (Ctrl+B)', 'battle.png', toggle)
battleButton:setOn(true)
@@ -173,10 +174,12 @@ function addCreature(creature)
local creatureId = creature:getId()
if battleButtonsByCreaturesList[creatureId] == nil then
local battleButton = g_ui.loadUI('battlebutton.otui', battlePanel)
local battleButton = g_ui.createWidget('BattleButton', battlePanel)
local creatureWidget = battleButton:getChildById('creature')
local labelWidget = battleButton:getChildById('label')
local lifeBarWidget = battleButton:getChildById('lifeBar')
battleButton.onHoverChange = onbattleButtonHoverChange
battleButton.onMouseRelease = onMouseRelease
battleButton:setId('BattleButton_' .. creature:getName():gsub('%s','_'))
battleButton.creatureId = creatureId

View File

@@ -1,11 +1,7 @@
BattleButton < UIButton
BattleButton
height: 20
margin-top: 5
fixed-size: true
&onHoverChange: onbattleButtonHoverChange
&onMouseRelease: onMouseRelease
&isBattleButton: true
UICreature