summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.h
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2016-08-07 14:32:31 +0100
committerrubenwardy <rubenwardy@gmail.com>2016-08-29 01:15:31 +0100
commit78ff5c193683fc643fbec85dc398da91d91a9e44 (patch)
treef0b8a0544d1eb4f0cee0ebe8fd738a820e1c5eb7 /src/guiFormSpecMenu.h
parentfbe4a9267ff75dc8f27ea1f6bcd59bc6727f347a (diff)
downloadminetest-78ff5c193683fc643fbec85dc398da91d91a9e44.tar.gz
minetest-78ff5c193683fc643fbec85dc398da91d91a9e44.tar.bz2
minetest-78ff5c193683fc643fbec85dc398da91d91a9e44.zip
Fix background formspec elements from interfering with each other
Fixes #4397
Diffstat (limited to 'src/guiFormSpecMenu.h')
-rw-r--r--src/guiFormSpecMenu.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h
index d06aa6cf5..dbcbf126a 100644
--- a/src/guiFormSpecMenu.h
+++ b/src/guiFormSpecMenu.h
@@ -143,9 +143,10 @@ class GUIFormSpecMenu : public GUIModalMenu
struct ImageDrawSpec
{
ImageDrawSpec():
- parent_button(NULL)
- {
- }
+ parent_button(NULL),
+ clip(false)
+ {}
+
ImageDrawSpec(const std::string &a_name,
const std::string &a_item_name,
gui::IGUIButton *a_parent_button,
@@ -155,9 +156,10 @@ class GUIFormSpecMenu : public GUIModalMenu
parent_button(a_parent_button),
pos(a_pos),
geom(a_geom),
- scale(true)
- {
- }
+ scale(true),
+ clip(false)
+ {}
+
ImageDrawSpec(const std::string &a_name,
const std::string &a_item_name,
const v2s32 &a_pos, const v2s32 &a_geom):
@@ -166,32 +168,36 @@ class GUIFormSpecMenu : public GUIModalMenu
parent_button(NULL),
pos(a_pos),
geom(a_geom),
- scale(true)
- {
- }
+ scale(true),
+ clip(false)
+ {}
+
ImageDrawSpec(const std::string &a_name,
- const v2s32 &a_pos, const v2s32 &a_geom):
+ const v2s32 &a_pos, const v2s32 &a_geom, bool clip=false):
name(a_name),
parent_button(NULL),
pos(a_pos),
geom(a_geom),
- scale(true)
- {
- }
+ scale(true),
+ clip(clip)
+ {}
+
ImageDrawSpec(const std::string &a_name,
const v2s32 &a_pos):
name(a_name),
parent_button(NULL),
pos(a_pos),
- scale(false)
- {
- }
+ scale(false),
+ clip(false)
+ {}
+
std::string name;
std::string item_name;
gui::IGUIButton *parent_button;
v2s32 pos;
v2s32 geom;
bool scale;
+ bool clip;
};
struct FieldSpec
@@ -428,7 +434,6 @@ protected:
bool m_bgfullscreen;
bool m_slotborder;
- bool m_clipbackground;
video::SColor m_bgcolor;
video::SColor m_slotbg_n;
video::SColor m_slotbg_h;