From 389fe31ace38a8f53c210ff5ae823eae1780dfc8 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 5 Apr 2011 00:24:47 +0300 Subject: changed node metadata format to better accomodate future needs and problems --- src/guiInventoryMenu.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/guiInventoryMenu.cpp') diff --git a/src/guiInventoryMenu.cpp b/src/guiInventoryMenu.cpp index 2d20b24aa..b83a84449 100644 --- a/src/guiInventoryMenu.cpp +++ b/src/guiInventoryMenu.cpp @@ -80,15 +80,13 @@ GUIInventoryMenu::GUIInventoryMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, IMenuManager *menumgr, v2s16 menu_size, - core::array &init_draw_spec, InventoryContext *c, InventoryManager *invmgr ): GUIModalMenu(env, parent, id, menumgr), m_menu_size(menu_size), m_c(c), - m_invmgr(invmgr), - m_init_draw_spec(init_draw_spec) + m_invmgr(invmgr) { m_selected_item = NULL; } @@ -103,7 +101,7 @@ GUIInventoryMenu::~GUIInventoryMenu() void GUIInventoryMenu::removeChildren() { - /*const core::list &children = getChildren(); + const core::list &children = getChildren(); core::list children_copy; for(core::list::ConstIterator i = children.begin(); i != children.end(); i++) @@ -115,12 +113,12 @@ void GUIInventoryMenu::removeChildren() i != children_copy.end(); i++) { (*i)->remove(); - }*/ - { + } + /*{ gui::IGUIElement *e = getElementFromId(256); if(e != NULL) e->remove(); - } + }*/ } void GUIInventoryMenu::regenerateGui(v2u32 screensize) @@ -326,6 +324,10 @@ bool GUIInventoryMenu::OnEvent(const SEvent& event) inv_from->getList(m_selected_item->listname); InventoryList *list_to = inv_to->getList(s.listname); + if(list_from == NULL) + dstream<<"from list doesn't exist"<