mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
More modules fixes
This commit is contained in:
@@ -18,8 +18,8 @@ currentHotkeysList = nil
|
||||
hotkeyLabelSelectedOnList = nil
|
||||
currentItemPreview = nil
|
||||
itemWidget = nil
|
||||
addHotkey = nil
|
||||
removeHotkey = nil
|
||||
addHotkeyButton = nil
|
||||
removeHotkeyButton = nil
|
||||
hotkeyText = nil
|
||||
hotKeyTextLabel = nil
|
||||
sendAutomatically = nil
|
||||
@@ -43,8 +43,8 @@ function init()
|
||||
|
||||
currentHotkeysList = hotkeysWindow:getChildById('currentHotkeys')
|
||||
currentItemPreview = hotkeysWindow:getChildById('itemPreview')
|
||||
addHotkey = hotkeysWindow:getChildById('addHotkey')
|
||||
removeHotkey = hotkeysWindow:getChildById('removeHotkey')
|
||||
addHotkeyButton = hotkeysWindow:getChildById('addHotkeyButton')
|
||||
removeHotkeyButton = hotkeysWindow:getChildById('removeHotkeyButton')
|
||||
hotkeyText = hotkeysWindow:getChildById('hotkeyText')
|
||||
hotKeyTextLabel = hotkeysWindow:getChildById('hotKeyTextLabel')
|
||||
sendAutomatically = hotkeysWindow:getChildById('sendAutomatically')
|
||||
@@ -164,7 +164,7 @@ function onChooseItemMouseRelease(self, mousePosition, mouseButton)
|
||||
hotkeyLabelSelectedOnList.itemId = item:getId()
|
||||
changeUseType(HOTKEY_MANAGER_USEONSELF)
|
||||
checkSelectedHotkey(hotkeyLabelSelectedOnList)
|
||||
HotkeysManager:show()
|
||||
show()
|
||||
end
|
||||
|
||||
g_mouse.restoreCursor()
|
||||
@@ -182,7 +182,7 @@ function startChooseItem()
|
||||
mouseGrabberWidget:grabMouse()
|
||||
g_mouse.setTargetCursor()
|
||||
|
||||
HotkeysManager:hide()
|
||||
hide()
|
||||
end
|
||||
|
||||
function clearObject()
|
||||
@@ -314,7 +314,7 @@ function checkSelectedHotkey(focused)
|
||||
hotkeyLabelSelectedOnList = focused
|
||||
|
||||
if hotkeyLabelSelectedOnList ~= nil then
|
||||
removeHotkey:enable()
|
||||
removeHotkeyButton:enable()
|
||||
|
||||
if hotkeyLabelSelectedOnList.itemId == nil then
|
||||
hotkeyText:enable()
|
||||
@@ -347,7 +347,7 @@ function checkSelectedHotkey(focused)
|
||||
changeUseType(hotkeyLabelSelectedOnList.useType)
|
||||
else
|
||||
hotkeyText:clearText()
|
||||
removeHotkey:disable()
|
||||
removeHotkeyButton:disable()
|
||||
hotkeyText:disable()
|
||||
sendAutomatically:disable()
|
||||
sendAutomatically:setChecked(false)
|
||||
|
@@ -13,8 +13,8 @@ MainWindow
|
||||
!text: tr('Hotkeys')
|
||||
size: 340 460
|
||||
|
||||
@onEnter: hide()
|
||||
@onEscape: hide()
|
||||
@onEnter: modules.game_hotkeys.hide()
|
||||
@onEscape: modules.game_hotkeys.hide()
|
||||
|
||||
Label
|
||||
id: currentHotkeysLabel
|
||||
@@ -50,23 +50,23 @@ MainWindow
|
||||
margin-top: 10
|
||||
|
||||
Button
|
||||
id: addHotkey
|
||||
id: addHotkeyButton
|
||||
!text: tr('Add')
|
||||
width: 64
|
||||
anchors.left: parent.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
@onClick: addHotkey()
|
||||
@onClick: modules.game_hotkeys.addHotkey()
|
||||
|
||||
Button
|
||||
id: removeHotkey
|
||||
id: removeHotkeyButton
|
||||
!text: tr('Remove')
|
||||
width: 64
|
||||
enabled: false
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
margin-left: 10
|
||||
@onClick: removeHotkey()
|
||||
@onClick: modules.game_hotkeys.removeHotkey()
|
||||
|
||||
Label
|
||||
id: hotKeyTextLabel
|
||||
@@ -84,7 +84,7 @@ MainWindow
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-bottom: 2
|
||||
@onTextChange: onHotkeyTextChange(self:getId(), self:getText())
|
||||
@onTextChange: modules.game_hotkeys.onHotkeyTextChange(self:getId(), self:getText())
|
||||
|
||||
CheckBox
|
||||
id: sendAutomatically
|
||||
@@ -94,7 +94,7 @@ MainWindow
|
||||
anchors.top: prev.bottom
|
||||
enabled:false
|
||||
margin-top: 10
|
||||
@onCheckChange: setSendAutomatically(self:isChecked())
|
||||
@onCheckChange: modules.game_hotkeys.setSendAutomatically(self:isChecked())
|
||||
|
||||
Item
|
||||
id: itemPreview
|
||||
@@ -111,7 +111,7 @@ MainWindow
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
margin-left: 10
|
||||
@onClick: startChooseItem()
|
||||
@onClick: modules.game_hotkeys.startChooseItem()
|
||||
|
||||
Button
|
||||
id: clearObjectButton
|
||||
@@ -122,7 +122,7 @@ MainWindow
|
||||
anchors.right: prev.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
@onClick: clearObject()
|
||||
@onClick: modules.game_hotkeys.clearObject()
|
||||
|
||||
ButtonBox
|
||||
id: useOnSelf
|
||||
@@ -134,7 +134,7 @@ MainWindow
|
||||
anchors.top: selectObjectButton.top
|
||||
checked: false
|
||||
margin-left: 10
|
||||
@onCheckChange: changeUseType(HOTKEY_MANAGER_USEONSELF, self:isChecked())
|
||||
@onCheckChange: modules.game_hotkeys.changeUseType(HOTKEY_MANAGER_USEONSELF, self:isChecked())
|
||||
|
||||
ButtonBox
|
||||
id: useOnTarget
|
||||
@@ -146,7 +146,7 @@ MainWindow
|
||||
anchors.top: prev.bottom
|
||||
checked: false
|
||||
margin-top: 2
|
||||
@onCheckChange: changeUseType(HOTKEY_MANAGER_USEONTARGET, self:isChecked())
|
||||
@onCheckChange: modules.game_hotkeys.changeUseType(HOTKEY_MANAGER_USEONTARGET, self:isChecked())
|
||||
|
||||
ButtonBox
|
||||
id: useWith
|
||||
@@ -158,11 +158,11 @@ MainWindow
|
||||
anchors.top: prev.bottom
|
||||
checked: false
|
||||
margin-top: 2
|
||||
@onCheckChange: changeUseType(HOTKEY_MANAGER_USEWITH, self:isChecked())
|
||||
@onCheckChange: modules.game_hotkeys.changeUseType(HOTKEY_MANAGER_USEWITH, self:isChecked())
|
||||
|
||||
Button
|
||||
!text: tr('Close')
|
||||
width: 64
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
@onClick: hide()
|
||||
@onClick: modules.game_hotkeys.hide()
|
||||
|
Reference in New Issue
Block a user