aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiButtonImage.h
diff options
context:
space:
mode:
authorVincent Robinson <robinsonvincent89@gmail.com>2022-07-03 05:52:26 -0700
committerGitHub <noreply@github.com>2022-07-03 08:52:26 -0400
commitf7bcf7fa46a634653e50f9e580faf2a53ab50e88 (patch)
treefc951aac79d80b0a1408d97dd51e8505317527e1 /src/gui/guiButtonImage.h
parent5a562a597cb8d1b71c5e0c1247836fe21ebccc56 (diff)
downloadminetest-f7bcf7fa46a634653e50f9e580faf2a53ab50e88.tar.gz
minetest-f7bcf7fa46a634653e50f9e580faf2a53ab50e88.tar.bz2
minetest-f7bcf7fa46a634653e50f9e580faf2a53ab50e88.zip
FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453)
* FormSpec: 9-slice images and animated_images * Add fgimg_middle; clean up code * Address issues, add tests * Fix stupid error; bump formspec version * Re-add image[] elements without a size
Diffstat (limited to 'src/gui/guiButtonImage.h')
-rw-r--r--src/gui/guiButtonImage.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/guiButtonImage.h b/src/gui/guiButtonImage.h
index 59a25b4f0..554934518 100644
--- a/src/gui/guiButtonImage.h
+++ b/src/gui/guiButtonImage.h
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "guiButton.h"
#include "IGUIButton.h"
+#include "guiAnimatedImage.h"
using namespace irr;
@@ -32,12 +33,11 @@ public:
s32 id, core::rect<s32> rectangle, ISimpleTextureSource *tsrc,
bool noclip = false);
- void setForegroundImage(video::ITexture *image = nullptr);
+ void setForegroundImage(video::ITexture *image = nullptr,
+ const core::rect<s32> &middle = core::rect<s32>());
//! Set element properties from a StyleSpec
- virtual void setFromStyle(const StyleSpec& style) override;
-
- virtual void setScaleImage(bool scaleImage=true) override;
+ virtual void setFromStyle(const StyleSpec &style) override;
//! Do not drop returned handle
static GUIButtonImage *addButton(gui::IGUIEnvironment *environment,
@@ -47,5 +47,5 @@ public:
private:
video::ITexture *m_foreground_image = nullptr;
- gui::IGUIImage *m_image;
+ GUIAnimatedImage *m_image;
};