aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiItemImage.cpp
diff options
context:
space:
mode:
authorHugues Ross <hugues.ross@gmail.com>2019-12-09 15:06:51 -0500
committerrubenwardy <rw@rubenwardy.com>2019-12-09 20:06:51 +0000
commit9284313d17ba906de449c6d39ef3ddacb6c73791 (patch)
treedd1ce7e801fbd5ed9e8a7446560d3343ffb2f15a /src/gui/guiItemImage.cpp
parenta462181e5fe631b816cb67a4e2cb8a870ed71840 (diff)
downloadminetest-9284313d17ba906de449c6d39ef3ddacb6c73791.tar.gz
minetest-9284313d17ba906de449c6d39ef3ddacb6c73791.tar.bz2
minetest-9284313d17ba906de449c6d39ef3ddacb6c73791.zip
Refactor to centralize GUIButton styling/rendering code (#9090)
Diffstat (limited to 'src/gui/guiItemImage.cpp')
-rw-r--r--src/gui/guiItemImage.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/gui/guiItemImage.cpp b/src/gui/guiItemImage.cpp
index 799a60c66..f93d5476c 100644
--- a/src/gui/guiItemImage.cpp
+++ b/src/gui/guiItemImage.cpp
@@ -43,18 +43,6 @@ void GUIItemImage::draw()
item.deSerialize(m_item_name, idef);
// Viewport rectangle on screen
core::rect<s32> rect = core::rect<s32>(AbsoluteRect);
- if (Parent->getType() == gui::EGUIET_BUTTON &&
- ((irr::gui::IGUIButton *)Parent)->isPressed()) {
-#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
- rect += core::dimension2d<s32>(0.05 * (float)rect.getWidth(),
- 0.05 * (float)rect.getHeight());
-#else
- gui::IGUISkin *skin = Environment->getSkin();
- rect += core::dimension2d<s32>(
- skin->getSize(irr::gui::EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X),
- skin->getSize(irr::gui::EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y));
-#endif
- }
drawItemStack(Environment->getVideoDriver(), m_font, item, rect,
&AbsoluteClippingRect, m_client, IT_ROT_NONE);
video::SColor color(255, 255, 255, 255);