From 0b08552bbce8433db4c1b6c4dbf0a64839de5a5d Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Tue, 17 Jan 2012 06:26:13 -0200 Subject: [PATCH] fix a loading error crash, command to debug containers items ids --- modules/addon_terminal/commands.lua | 12 ++++++++---- src/framework/luascript/luaexception.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/addon_terminal/commands.lua b/modules/addon_terminal/commands.lua index ee255e8d..37c83f6d 100644 --- a/modules/addon_terminal/commands.lua +++ b/modules/addon_terminal/commands.lua @@ -19,8 +19,12 @@ function showMap() if map then map:show() end end -function displayItem(id) - local itemWidget = createWidget('Item', rootWidget) - itemWidget:setItem(Item.create(id)) +function debugContainersItems() + function UIItem:onHoverChange(hovered) + if hovered then + ToolTip.display(self:getItem():getId()) + else + ToolTip.hide() + end + end end - diff --git a/src/framework/luascript/luaexception.h b/src/framework/luascript/luaexception.h index 24cf0d41..b238dbe2 100644 --- a/src/framework/luascript/luaexception.h +++ b/src/framework/luascript/luaexception.h @@ -25,7 +25,7 @@ #include "declarations.h" -class LuaException : public std::exception +class LuaException : public Exception { public: LuaException(const std::string& error, int traceLevel = -1);