GUIButtonImage::GUIButtonImage(gui::IGUIEnvironment *environment,
gui::IGUIElement *parent, s32 id, core::rect<s32> rectangle,
- ISimpleTextureSource *tsrc, bool noclip) :
- GUIButton(environment, parent, id, rectangle, tsrc, noclip)
+ ISimpleTextureSource *tsrc, bool noclip)
+ : GUIButton (environment, parent, id, rectangle, tsrc, noclip)
{
- m_image = Environment->addImage(core::rect<s32>(0, 0, rectangle.getWidth(),
- rectangle.getHeight()),
- this);
+ m_image = Environment->addImage(
+ core::rect<s32>(0,0,rectangle.getWidth(),rectangle.getHeight()), this);
m_image->setScaleImage(isScalingImage());
sendToBack(m_image);
}
}
//! Set element properties from a StyleSpec
-void GUIButtonImage::setFromStyle(const StyleSpec &style)
+void GUIButtonImage::setFromStyle(const StyleSpec& style)
{
GUIButton::setFromStyle(style);
video::IVideoDriver *driver = Environment->getVideoDriver();
if (style.isNotDefault(StyleSpec::FGIMG)) {
- video::ITexture *texture =
- style.getTexture(StyleSpec::FGIMG, getTextureSource());
+ video::ITexture *texture = style.getTexture(StyleSpec::FGIMG,
+ getTextureSource());
setForegroundImage(guiScalingImageButton(driver, texture,
- AbsoluteRect.getWidth(), AbsoluteRect.getHeight()));
+ AbsoluteRect.getWidth(), AbsoluteRect.getHeight()));
setScaleImage(true);
} else {
setForegroundImage(nullptr);
const wchar_t *tooltiptext)
{
GUIButtonImage *button = new GUIButtonImage(environment,
- parent ? parent : environment->getRootGUIElement(), id, rectangle,
- tsrc);
+ parent ? parent : environment->getRootGUIElement(), id, rectangle, tsrc);
if (text)
button->setText(text);