mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-07 18:55:18 +01:00
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
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user