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:
Eduardo Bart
2012-03-28 11:10:21 -03:00
parent e2ea267703
commit 8d14d9bc99
34 changed files with 301 additions and 196 deletions

View File

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

View File

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