From 2a225b99b789ddafa3f81b1299e144198e8f99d4 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Mon, 25 Feb 2013 23:16:15 -0300 Subject: [PATCH] Only show ping when available --- modules/client_topmenu/topmenu.lua | 2 +- modules/game_viplist/viplist.lua | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/client_topmenu/topmenu.lua b/modules/client_topmenu/topmenu.lua index 1ed2c9aa..a807cd20 100644 --- a/modules/client_topmenu/topmenu.lua +++ b/modules/client_topmenu/topmenu.lua @@ -68,7 +68,7 @@ end function online() showGameButtons() - if modules.client_options.getOption('showFps') then + if modules.client_options.getOption('showFps') and (g_game.getFeature(GameClientPing) or g_game.getFeature(GameExtendedClientPing)) then pingLabel:show() end end diff --git a/modules/game_viplist/viplist.lua b/modules/game_viplist/viplist.lua index c6e32aa2..c82baeb8 100644 --- a/modules/game_viplist/viplist.lua +++ b/modules/game_viplist/viplist.lua @@ -183,11 +183,14 @@ function onVipListLabelMousePress(widget, mousePos, mouseButton) menu:addOption(tr('Add new VIP'), function() createAddWindow() end) menu:addOption(tr('Remove %s', widget:getText()), function() if widget then g_game.removeVip(widget:getId():sub(4)) vipList:removeChild(widget) end end) menu:addSeparator() - menu:addOption(tr('Copy Name'), function() g_window.setClipboardText(widget:getText()) end) if modules.game_console.getOwnPrivateTab() then + menu:addOption(tr('Copy Name'), function() g_window.setClipboardText(widget:getText()) end) + + if modules.game_console.getOwnPrivateTab() then menu:addSeparator() menu:addOption(tr('Invite to private chat'), function() g_game.inviteToOwnChannel(creatureName) end) menu:addOption(tr('Exclude from private chat'), function() g_game.excludeFromOwnChannel(creatureName) end) end + if not isHiddingOffline() then menu:addOption(tr('Hide Offline'), function() hideOffline(true) end) else