npctrade closing trade and focusing window

This commit is contained in:
Henrique Santiago 2012-04-29 20:06:23 -03:00
parent 170d4fd365
commit 37d943fc28
2 changed files with 3 additions and 6 deletions

View File

@ -201,9 +201,6 @@ end
-- public functions -- public functions
function NPCTrade.init() function NPCTrade.init()
cacheItems = {}
cacheGoods = {}
npcWindow = displayUI('npctrade.otui') npcWindow = displayUI('npctrade.otui')
npcWindow:setVisible(false) npcWindow:setVisible(false)
@ -292,6 +289,7 @@ function NPCTrade.show()
npcWindow:show() npcWindow:show()
npcWindow:raise() npcWindow:raise()
npcWindow:focus()
end end
end end

View File

@ -33,8 +33,7 @@ MainWindow
id: npcWindow id: npcWindow
!text: tr('NPC Trade') !text: tr('NPC Trade')
size: 550 515 size: 550 515
@onEscape: g_game.closeNpcTrade()
@onEscape: NPCTrade.hide()
TabButton TabButton
id: buyTab id: buyTab
@ -264,4 +263,4 @@ MainWindow
width: 64 width: 64
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@onClick: NPCTrade.hide() @onClick: g_game.closeNpcTrade()