mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-19 22:23:28 +02:00
Version 2.4 - http://otclient.net/showthread.php?tid=160
This commit is contained in:
@@ -51,9 +51,9 @@ function setupExtraHotkeys(combobox)
|
||||
end
|
||||
local battlePanel = modules.game_battle.battlePanel
|
||||
local attackedCreature = g_game.getAttackingCreature()
|
||||
local prevChild = battlePanel:getLastChild()
|
||||
local prevChild = nil
|
||||
for i, child in ipairs(battlePanel:getChildren()) do
|
||||
if not child.creature or child:isDisabled() then
|
||||
if not child.creature or child:isDisabled() or child:isHidden() then
|
||||
break
|
||||
end
|
||||
if child.creature == attackedCreature then
|
||||
|
@@ -43,7 +43,9 @@ configValueChanged = false
|
||||
|
||||
-- public functions
|
||||
function init()
|
||||
hotkeysButton = modules.client_topmenu.addLeftGameButton('hotkeysButton', tr('Hotkeys') .. ' (Ctrl+K)', '/images/topbuttons/hotkeys', toggle, false, 7)
|
||||
if not g_app.isMobile() then
|
||||
hotkeysButton = modules.client_topmenu.addLeftGameButton('hotkeysButton', tr('Hotkeys') .. ' (Ctrl+K)', '/images/topbuttons/hotkeys', toggle, false, 7)
|
||||
end
|
||||
g_keyboard.bindKeyDown('Ctrl+K', toggle)
|
||||
hotkeysWindow = g_ui.displayUI('hotkeys_manager')
|
||||
hotkeysWindow:setVisible(false)
|
||||
@@ -104,7 +106,9 @@ function terminate()
|
||||
unload()
|
||||
|
||||
hotkeysWindow:destroy()
|
||||
hotkeysButton:destroy()
|
||||
if hotkeysButton then
|
||||
hotkeysButton:destroy()
|
||||
end
|
||||
mouseGrabberWidget:destroy()
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user