mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 04:24:54 +02:00
Fix #576, PopupMenus close when leaving the game
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user