summaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.h
diff options
context:
space:
mode:
authorAndrew Ward <rw@rubenwardy.com>2018-03-28 16:04:41 +0100
committerGitHub <noreply@github.com>2018-03-28 16:04:41 +0100
commit2323842dd3dd336b087ca3cf9756e0680b3a1244 (patch)
tree6b76f139e42872c8457c991925a5a2e6d41b85c9 /src/gui/guiFormSpecMenu.h
parent040b878cd5f77f6b44622b7c00255b4981500dc8 (diff)
downloadminetest-2323842dd3dd336b087ca3cf9756e0680b3a1244.tar.gz
minetest-2323842dd3dd336b087ca3cf9756e0680b3a1244.tar.bz2
minetest-2323842dd3dd336b087ca3cf9756e0680b3a1244.zip
Add formspec theming using prepended strings
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r--src/gui/guiFormSpecMenu.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h
index 736dd8ddb..7a096a1ea 100644
--- a/src/gui/guiFormSpecMenu.h
+++ b/src/gui/guiFormSpecMenu.h
@@ -287,12 +287,14 @@ public:
ISimpleTextureSource *tsrc,
IFormSource* fs_src,
TextDest* txt_dst,
+ std::string formspecPrepend,
bool remap_dbl_click = true);
~GUIFormSpecMenu();
static void create(GUIFormSpecMenu *&cur_formspec, Client *client,
- JoystickController *joystick, IFormSource *fs_src, TextDest *txt_dest);
+ JoystickController *joystick, IFormSource *fs_src, TextDest *txt_dest,
+ const std::string &formspecPrepend);
void setFormSpec(const std::string &formspec_string,
const InventoryLocation &current_inventory_location)
@@ -302,6 +304,11 @@ public:
regenerateGui(m_screensize_old);
}
+ void setFormspecPrepend(const std::string &formspecPrepend)
+ {
+ m_formspec_prepend = formspecPrepend;
+ }
+
// form_src is deleted by this GUIFormSpecMenu
void setFormSource(IFormSource *form_src)
{
@@ -378,6 +385,7 @@ protected:
Client *m_client;
std::string m_formspec_string;
+ std::string m_formspec_prepend;
InventoryLocation m_current_inventory_location;
std::vector<ListDrawSpec> m_inventorylists;