1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add formspec theming using prepended strings

This commit is contained in:
Andrew Ward 2018-03-28 16:04:41 +01:00 committed by GitHub
parent 040b878cd5
commit 2323842dd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 150 additions and 18 deletions

View file

@ -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;