mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
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:
@@ -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()
|
||||
|
@@ -3,7 +3,6 @@ Module
|
||||
description: Create the top menu
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
reloadable: true
|
||||
|
||||
@onLoad: |
|
||||
dofile 'topmenu'
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user