restore inventory and healthbar

* make inventory/healthbar work again allowing reload
* changes in top menu toggle buttons
* all modules are now reloadable by default
* fix warning when using fade in
* remove some unused files
This commit is contained in:
Eduardo Bart
2012-03-23 10:48:05 -03:00
parent b301aa1a2b
commit 239f58296e
41 changed files with 134 additions and 407 deletions

View File

@@ -19,12 +19,7 @@ local function addButton(id, description, icon, callback, panel, toggle)
button:setId(id)
button:setTooltip(description)
button:setIcon(resolvepath(icon, 3))
if toggle then
button.onCheckChange = callback
else
button.onClick = callback
end
button.onClick = callback
return button
end
@@ -38,6 +33,10 @@ function TopMenu.init()
leftButtonsPanel = topMenu:getChildById('leftButtonsPanel')
rightButtonsPanel = topMenu:getChildById('rightButtonsPanel')
gameButtonsPanel = topMenu:getChildById('gameButtonsPanel')
if g_game.isOnline() then
gameButtonsPanel:show()
end
end
function TopMenu.terminate()

View File

@@ -3,7 +3,6 @@ Module
description: Create the top menu
author: OTClient team
website: https://github.com/edubart/otclient
reloadable: true
@onLoad: |
dofile 'topmenu'

View File

@@ -17,7 +17,7 @@ TopButton < UIButton
image-color: #ffffff44
icon-color: #ffffff44
TopToggleButton < UICheckBox
TopToggleButton < UIButton
size: 26 26
image-source: images/top_game_button.png
image-clip: 26 0 26 26
@@ -25,7 +25,7 @@ TopToggleButton < UICheckBox
image-border: 3
icon-color: #ffffffff
$checked:
$on:
image-clip: 0 0 26 26
image-color: #ffffffff
icon-color: #ffffffff
@@ -62,6 +62,7 @@ TopPanel
anchors.bottom: parent.bottom
anchors.left: prev.right
anchors.right: next.left
visible: false
TopMenuButtonsPanel
id: rightButtonsPanel