Fix #576, PopupMenus close when leaving the game

This commit is contained in:
TheSumm
2015-04-19 13:56:03 +02:00
parent ab5bed456b
commit 84f6cdec86
6 changed files with 25 additions and 1 deletions

View File

@@ -599,6 +599,7 @@ end
function processChannelTabMenu(tab, mousePos, mouseButton)
local menu = g_ui.createWidget('PopupMenu')
menu:setGameMenu(true)
channelName = tab:getText()
if tab ~= defaultTab and tab ~= serverTab then
@@ -618,6 +619,7 @@ end
function processMessageMenu(mousePos, mouseButton, creatureName, text, label, tab)
if mouseButton == MouseRightButton then
local menu = g_ui.createWidget('PopupMenu')
menu:setGameMenu(true)
if creatureName and #creatureName > 0 then
if creatureName ~= g_game.getCharacterName() then
menu:addOption(tr('Message to ' .. creatureName), function () g_game.openPrivateChannel(creatureName) end)