summaryrefslogtreecommitdiff
path: root/src/gui/guiButton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/guiButton.cpp')
-rw-r--r--src/gui/guiButton.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gui/guiButton.cpp b/src/gui/guiButton.cpp
index ba95b81c3..c38d901c4 100644
--- a/src/gui/guiButton.cpp
+++ b/src/gui/guiButton.cpp
@@ -320,15 +320,9 @@ void GUIButton::draw()
sourceRect, &AbsoluteClippingRect,
image_colors, UseAlphaChannel);
} else {
- core::rect<s32> middle = BgMiddle;
- // `-x` is interpreted as `w - x`
- if (middle.LowerRightCorner.X < 0)
- middle.LowerRightCorner.X += texture->getOriginalSize().Width;
- if (middle.LowerRightCorner.Y < 0)
- middle.LowerRightCorner.Y += texture->getOriginalSize().Height;
draw2DImage9Slice(driver, texture,
ScaleImage ? AbsoluteRect : core::rect<s32>(pos, sourceRect.getSize()),
- middle, &AbsoluteClippingRect, image_colors);
+ sourceRect, BgMiddle, &AbsoluteClippingRect, image_colors);
}
// END PATCH
}