From 311bc220a813e4f9411a56bea96fe24f815ff415 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Wed, 23 Jan 2013 16:55:10 -0200 Subject: [PATCH] Fix a warning --- data/locales/pt.lua | 20 ++++++++++---------- modules/game_npctrade/npctrade.lua | 13 +++++-------- src/framework/platform/platform.cpp | 1 - src/framework/ui/uiwidgetbasestyle.cpp | 2 +- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/data/locales/pt.lua b/data/locales/pt.lua index 2dcfcaa4..62958baa 100644 --- a/data/locales/pt.lua +++ b/data/locales/pt.lua @@ -40,7 +40,7 @@ locale = { ["All modules and scripts were reloaded."] = "Todos módulos e scripts foram recarregados.", ["Allow auto chase override"] = "Permitir sobrescrever o modo de perseguição", ["Also known as dash in tibia community, recommended\nfor playing characters with high speed"] = "Também conhecido como dash na comunidade tibiana, recomendado\npara jogar com personagem que possuam velocidade alta", - ["Ambient light: %s%%"] = false, + ["Ambient light: %s%%"] = "Luz ambiente: %s%%", ["Amount:"] = "Quantidade:", ["Amount"] = "Quantidade", ["Anonymous"] = "Anônimo", @@ -72,7 +72,7 @@ locale = { ["Character List"] = "Lista de personagens", ["Classic control"] = "Controle clássico", ["Clear current message window"] = "Apagar mensagens", - ["Clear Messages"] = false, + ["Clear Messages"] = "Limpar mensagens", ["Clear object"] = "Limpar objeto", ["Client needs update."] = "O client do jogo precisa ser atualizado", ["Close"] = "Fechar", @@ -87,25 +87,25 @@ locale = { ["Copy message"] = "Copiar mensagem", ["Copy name"] = "Copiar nome", ["Copy Name"] = "Copiar Nome", - ["Create Map Mark"] = false, - ["Create mark"] = false, + ["Create Map Mark"] = "Criar marca no mapa", + ["Create mark"] = "Criar marca", ["Create New Offer"] = "Criar nova oferta", ["Create Offer"] = "Criar oferta", ["Current hotkeys:"] = "Atalhos atuais", ["Current hotkey to add: %s"] = "Atalho atual para adicionar: %s", ["Current Offers"] = "Ofertas atuais", ["Default"] = "Padrão", - ["Delete mark"] = false, - ["Description:"] = false, + ["Delete mark"] = "Deletar marca", + ["Description:"] = "Descrição", ["Description"] = "Descrição", ["Destructive Behaviour"] = "Comportamento destrutivo", ["Detail"] = "Detalhe", ["Details"] = "Detalhes", ["Disable Shared Experience"] = "Desativar experiência compartilhada", - ["Dismount"] = false, + ["Dismount"] = "Desmontar", ["Display connection speed to the server (milliseconds)"] = "Exibir a velocidade de conexão com o servidor (milisegundos)", ["Distance Fighting"] = "Combate a Distância", - ["Don't stretch/shrink Game Window"] = false, + ["Don't stretch/shrink Game Window"] = "Não esticar a janela do game", ["Edit hotkey text:"] = "Editar texto do atalho", ["Edit List"] = "Editar lista", ["Edit Text"] = "Editar Texto", @@ -116,7 +116,7 @@ locale = { ["Enable walk booster"] = "Ativar andar intensificado", ["Enter Game"] = "Entrar no jogo", ["Enter one name per line."] = "Entre somente um nome por linha.", - ["Enter with your account again to update your client."] = false, + ["Enter with your account again to update your client."] = "Entre com sua conta denovo para atualizar o client.", ["Error"] = "Erro", ["Error"] = "Erro", ["Excessive Unjustified Player Killing"] = "Assassinato em excesso, sem justificativa, de jogadores", @@ -130,7 +130,7 @@ locale = { ["Fist Fighting"] = "Porrada", ["Follow"] = "Seguir", ["Force Exit"] = "Forçar Saida", - ["For Your Information"] = false, + ["For Your Information"] = "Para sua informação", ["Free Account"] = false, ["Fullscreen"] = "Tela cheia", ["Game"] = "Jogo", diff --git a/modules/game_npctrade/npctrade.lua b/modules/game_npctrade/npctrade.lua index 3ba18d67..4e47c952 100644 --- a/modules/game_npctrade/npctrade.lua +++ b/modules/game_npctrade/npctrade.lua @@ -33,7 +33,7 @@ tradeItems = {} playerItems = nil selectedItem = nil -mouseWidget = nil +cancelNextRelease = nil function init() npcWindow = g_ui.displayUI('npctrade') @@ -65,10 +65,7 @@ function init() radioTabs:selectWidget(buyTab) radioTabs.onSelectionChange = onTradeTypeChange - mouseWidget = g_ui.createWidget('UIButton') - mouseWidget:setVisible(false) - mouseWidget:setFocusable(false) - mouseWidget.cancelNextRelease = false + cancelNextRelease = false if g_game.isOnline() then playerFreeCapacity = g_game.getLocalPlayer():getFreeCapacity() @@ -157,8 +154,8 @@ function onSearchTextChange() end function itemPopup(self, mousePosition, mouseButton) - if mouseWidget.cancelNextRelease then - mouseWidget.cancelNextRelease = false + if cancelNextRelease then + cancelNextRelease = false return false end @@ -169,7 +166,7 @@ function itemPopup(self, mousePosition, mouseButton) return true elseif ((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or (g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then - mouseWidget.cancelNextRelease = true + cancelNextRelease = true g_game.inspectNpcTrade(self:getItem()) return true end diff --git a/src/framework/platform/platform.cpp b/src/framework/platform/platform.cpp index aa0a4923..9b7f02b9 100644 --- a/src/framework/platform/platform.cpp +++ b/src/framework/platform/platform.cpp @@ -21,6 +21,5 @@ */ #include "platform.h" -#include Platform g_platform; diff --git a/src/framework/ui/uiwidgetbasestyle.cpp b/src/framework/ui/uiwidgetbasestyle.cpp index 2c2483b3..760279e0 100644 --- a/src/framework/ui/uiwidgetbasestyle.cpp +++ b/src/framework/ui/uiwidgetbasestyle.cpp @@ -43,7 +43,7 @@ void UIWidget::initBaseStyle() // generate an unique id, this is need because anchored layouts find widgets by id static unsigned long id = 1; - m_id = stdext::format("widget %d", id++); + m_id = stdext::format("widget%d", id++); } void UIWidget::parseBaseStyle(const OTMLNodePtr& styleNode)