mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
modules changes
* speedup widget destruction checks * rework outfit module using grid layout and the new design * fixes in console, terminal, textmessage modules
This commit is contained in:
@@ -50,7 +50,7 @@ end
|
||||
function CombatControls.init()
|
||||
combatControlsButton = TopMenu.addGameButton('combatControlsButton', 'Combat Controls', 'combatcontrols.png', CombatControls.toggle)
|
||||
combatControlsButton:setOn(true)
|
||||
combatControlsWindow = loadUI('combatcontrols.otui')
|
||||
combatControlsWindow = loadUI('combatcontrols.otui', GameInterface.getRightPanel())
|
||||
|
||||
fightOffensiveBox = combatControlsWindow:getChildById('fightOffensiveBox')
|
||||
fightBalancedBox = combatControlsWindow:getChildById('fightBalancedBox')
|
||||
@@ -101,7 +101,6 @@ function CombatControls.terminate()
|
||||
end
|
||||
|
||||
function CombatControls.online()
|
||||
g_game.gameRightPanel:addChild(combatControlsWindow)
|
||||
combatControlsWindow:setVisible(combatControlsButton:isOn())
|
||||
|
||||
local fightMode = g_game.getFightMode()
|
||||
@@ -121,7 +120,6 @@ function CombatControls.online()
|
||||
end
|
||||
|
||||
function CombatControls.offline()
|
||||
g_game.gameRightPanel:removeChild(combatControlsWindow)
|
||||
end
|
||||
|
||||
function CombatControls.toggle()
|
||||
|
@@ -4,9 +4,9 @@ Module
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
|
||||
onLoad: |
|
||||
@onLoad: |
|
||||
dofile 'combatcontrols'
|
||||
CombatControls.init()
|
||||
|
||||
onUnload: |
|
||||
@onUnload: |
|
||||
CombatControls.terminate()
|
||||
|
Reference in New Issue
Block a user