aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiButtonImage.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:19:54 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:19:54 +0100
commitad148587dcf5244c2d2011dba339786c765c54c4 (patch)
treebdd914121cd326da2ed26679838878e3edffc841 /src/gui/guiButtonImage.cpp
parent1145b05ea0bda87dc0827821385810eced08f774 (diff)
downloaddragonfireclient-ad148587dcf5244c2d2011dba339786c765c54c4.tar.xz
Make Lint Happy
Diffstat (limited to 'src/gui/guiButtonImage.cpp')
-rw-r--r--src/gui/guiButtonImage.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gui/guiButtonImage.cpp b/src/gui/guiButtonImage.cpp
index b507ffece..2f574c1a8 100644
--- a/src/gui/guiButtonImage.cpp
+++ b/src/gui/guiButtonImage.cpp
@@ -31,11 +31,12 @@ using namespace gui;
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);
}
@@ -56,18 +57,18 @@ void GUIButtonImage::setForegroundImage(video::ITexture *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);
@@ -86,7 +87,8 @@ GUIButtonImage *GUIButtonImage::addButton(IGUIEnvironment *environment,
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);