diff options
Diffstat (limited to 'src/guiInventoryMenu.cpp')
-rw-r--r-- | src/guiInventoryMenu.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/guiInventoryMenu.cpp b/src/guiInventoryMenu.cpp index f90a2e959..8faf3d005 100644 --- a/src/guiInventoryMenu.cpp +++ b/src/guiInventoryMenu.cpp @@ -41,7 +41,7 @@ void drawInventoryItem(video::IVideoDriver *driver, driver->draw2DImage(texture, rect, core::rect<s32>(core::position2d<s32>(0,0), core::dimension2di(texture->getOriginalSize())), - clip, colors, false); + clip, colors, true); } else { @@ -241,22 +241,31 @@ void GUIInventoryMenu::drawList(const ListDrawSpec &s) if(m_selected_item != NULL && m_selected_item->listname == s.listname && m_selected_item->i == i) { + /*s32 border = imgsize.X/12; + driver->draw2DRectangle(video::SColor(255,192,192,192), + core::rect<s32>(rect.UpperLeftCorner - v2s32(1,1)*border, + rect.LowerRightCorner + v2s32(1,1)*border), + NULL); + driver->draw2DRectangle(video::SColor(255,0,0,0), + core::rect<s32>(rect.UpperLeftCorner - v2s32(1,1)*((border+1)/2), + rect.LowerRightCorner + v2s32(1,1)*((border+1)/2)), + NULL);*/ + s32 border = 2; driver->draw2DRectangle(video::SColor(255,255,0,0), - core::rect<s32>(rect.UpperLeftCorner - v2s32(2,2), - rect.LowerRightCorner + v2s32(2,2)), + core::rect<s32>(rect.UpperLeftCorner - v2s32(1,1)*border, + rect.LowerRightCorner + v2s32(1,1)*border), &AbsoluteClippingRect); } + video::SColor bgcolor(255,128,128,128); + driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect); + if(item) { drawInventoryItem(driver, font, item, rect, &AbsoluteClippingRect); } - else - { - video::SColor bgcolor(255,128,128,128); - driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect); - } + } } |