mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00: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:
parent
5a562a597c
commit
f7bcf7fa46
15 changed files with 222 additions and 204 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue