From 15fce6d4cf1cbf5982d3e0f34bad4318b76eba8c Mon Sep 17 00:00:00 2001 From: AndreFaramir Date: Wed, 28 Mar 2012 23:03:01 -0300 Subject: [PATCH] fix and remove lock --- modules/game_hotkeys/hotkeys_manager.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/game_hotkeys/hotkeys_manager.lua b/modules/game_hotkeys/hotkeys_manager.lua index 11cd62a9..15688ada 100644 --- a/modules/game_hotkeys/hotkeys_manager.lua +++ b/modules/game_hotkeys/hotkeys_manager.lua @@ -34,7 +34,6 @@ local hotkeyColors = { -- public functions function HotkeysManager.init() - print("PASSO HK INIT") hotkeysWindow = displayUI('hotkeys_manager.otui') hotkeysWindow:setVisible(false) @@ -131,14 +130,12 @@ function HotkeysManager.show() if g_game.isOnline() then hotkeysWindow:grabKeyboard() hotkeysWindow:show() - hotkeysWindow:lock() hotkeysWindow:raise() end end function HotkeysManager.hide() hotkeysWindow:ungrabKeyboard() - hotkeysWindow:unlock() hotkeysWindow:hide() end @@ -201,7 +198,7 @@ end function HotkeysManager.addHotkey() local widget - messageBox = createWidget('MainWindow', hotkeysWindow) + messageBox = createWidget('MainWindow', rootWidget) messageBox:grabKeyboard() messageBox:setId('assignWindow') messageBox:setText('Button Assign') @@ -449,11 +446,11 @@ end function HotkeysManager.hotkeyCapture(widget, keyCode, keyboardModifiers) local keyCombo = determineKeyComboDesc(keyCode, keyboardModifiers) - local comboPreview = hotkeysWindow:getChildById('assignWindow'):getChildById('comboPreview') + local comboPreview = rootWidget:getChildById('assignWindow'):getChildById('comboPreview') comboPreview:setText('Current hotkey to add: '.. keyCombo) comboPreview.keyCombo = keyCombo comboPreview:resizeToText() - hotkeysWindow:getChildById('assignWindow'):getChildById('addButton'):enable() + rootWidget:getChildById('assignWindow'):getChildById('addButton'):enable() return true end