setDrawBorder(style.getBool(StyleSpec::BORDER, true));\r
setUseAlphaChannel(style.getBool(StyleSpec::ALPHA, true));\r
\r
- const core::position2di buttonCenter(AbsoluteRect.getCenter());\r
- core::position2d<s32> geom(buttonCenter);\r
if (style.isNotDefault(StyleSpec::BGIMG)) {\r
video::ITexture *texture = style.getTexture(StyleSpec::BGIMG,\r
getTextureSource());\r
setImage(guiScalingImageButton(\r
- Environment->getVideoDriver(), texture, geom.X, geom.Y));\r
+ Environment->getVideoDriver(), texture,\r
+ AbsoluteRect.getWidth(), AbsoluteRect.getHeight()));\r
setScaleImage(true);\r
} else {\r
setImage(nullptr);\r
video::IVideoDriver *driver = Environment->getVideoDriver();
- const core::position2di buttonCenter(AbsoluteRect.getCenter());
- core::position2d<s32> geom(buttonCenter);
if (style.isNotDefault(StyleSpec::FGIMG)) {
video::ITexture *texture = style.getTexture(StyleSpec::FGIMG,
getTextureSource());
- setForegroundImage(guiScalingImageButton(driver, texture, geom.X, geom.Y));
+ setForegroundImage(guiScalingImageButton(driver, texture,
+ AbsoluteRect.getWidth(), AbsoluteRect.getHeight()));
setScaleImage(true);
} else {
setForegroundImage(nullptr);