mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
restore old modules
* partially restore vip, battle, healthbar, skills and inventory modules * more fixes on UIWidgets * implement UIMiniWindow close/minimize functionality * allow drag and drop miniwindows beteween game panels
This commit is contained in:
@@ -48,15 +48,15 @@ end
|
||||
|
||||
-- public functions
|
||||
function CombatControls.init()
|
||||
combatControlsButton = TopMenu.addGameButton('combatControlsButton', 'Combat Controls', 'combatcontrols.png', CombatControls.toggle)
|
||||
combatControlsButton = TopMenu.addGameToggleButton('combatControlsButton', 'Combat Controls', 'combatcontrols.png', CombatControls.toggle)
|
||||
combatControlsButton:setOn(true)
|
||||
combatControlsWindow = loadUI('combatcontrols.otui', GameInterface.getRightPanel())
|
||||
|
||||
fightOffensiveBox = combatControlsWindow:getChildById('fightOffensiveBox')
|
||||
fightBalancedBox = combatControlsWindow:getChildById('fightBalancedBox')
|
||||
fightDefensiveBox = combatControlsWindow:getChildById('fightDefensiveBox')
|
||||
chaseModeButton = combatControlsWindow:getChildById('chaseModeBox')
|
||||
safeFightButton = combatControlsWindow:getChildById('safeFightBox')
|
||||
fightOffensiveBox = combatControlsWindow:recursiveGetChildById('fightOffensiveBox')
|
||||
fightBalancedBox = combatControlsWindow:recursiveGetChildById('fightBalancedBox')
|
||||
fightDefensiveBox = combatControlsWindow:recursiveGetChildById('fightDefensiveBox')
|
||||
chaseModeButton = combatControlsWindow:recursiveGetChildById('chaseModeBox')
|
||||
safeFightButton = combatControlsWindow:recursiveGetChildById('safeFightBox')
|
||||
|
||||
fightModeRadioGroup = RadioGroup.create()
|
||||
fightModeRadioGroup:addWidget(fightOffensiveBox)
|
||||
|
@@ -19,25 +19,29 @@ ChaseModeBox < CombatBox
|
||||
SafeFightBox < CombatBox
|
||||
image-source: /game_combatcontrols/icons/safefight.png
|
||||
|
||||
UIWindow
|
||||
width: 130
|
||||
height: 30
|
||||
margin-top: 10
|
||||
margin-left: 6
|
||||
margin-right: 6
|
||||
MiniWindow
|
||||
text: Combat Controls
|
||||
icon: combatcontrols.png
|
||||
height: 64
|
||||
@onClose: CombatControls.toggle()
|
||||
|
||||
FightOffensiveBox
|
||||
id: fightOffensiveBox
|
||||
anchors.right: next.left
|
||||
FightBalancedBox
|
||||
id: fightBalancedBox
|
||||
anchors.right: next.left
|
||||
FightDefensiveBox
|
||||
id: fightDefensiveBox
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
ChaseModeBox
|
||||
id: chaseModeBox
|
||||
anchors.left: prev.right
|
||||
SafeFightBox
|
||||
id: safeFightBox
|
||||
anchors.left: prev.right
|
||||
MiniWindowContents
|
||||
FightOffensiveBox
|
||||
id: fightOffensiveBox
|
||||
anchors.right: next.left
|
||||
anchors.top: next.top
|
||||
FightBalancedBox
|
||||
id: fightBalancedBox
|
||||
anchors.right: next.left
|
||||
anchors.top: next.top
|
||||
FightDefensiveBox
|
||||
id: fightDefensiveBox
|
||||
anchors.centerIn: parent
|
||||
ChaseModeBox
|
||||
id: chaseModeBox
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
SafeFightBox
|
||||
id: safeFightBox
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
|
Reference in New Issue
Block a user