From bee170570de7a796ac7b5ba6c0b39b253380b5e3 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 30 Nov 2012 18:12:32 +0200 Subject: On-demand item meshes and textures --- src/guiFormSpecMenu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/guiFormSpecMenu.cpp') diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 66ac4c08f..986f30494 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -46,7 +46,7 @@ void drawItemStack(video::IVideoDriver *driver, return; const ItemDefinition &def = item.getDefinition(gamedef->idef()); - video::ITexture *texture = def.inventory_texture; + video::ITexture *texture = gamedef->idef()->getInventoryTexture(def.name, gamedef); // Draw the inventory texture if(texture != NULL) @@ -519,7 +519,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize) IItemDefManager *idef = m_gamedef->idef(); ItemStack item; item.deSerialize(fimage, idef); - video::ITexture *texture = item.getDefinition(idef).inventory_texture; + video::ITexture *texture = idef->getInventoryTexture(item.getDefinition(idef).name, m_gamedef); std::string tooltip = item.getDefinition(idef).description; FieldSpec spec = FieldSpec( narrow_to_wide(fname.c_str()), -- cgit v1.2.3