summaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r--src/gui/guiFormSpecMenu.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h
index 17bfef205..28088416d 100644
--- a/src/gui/guiFormSpecMenu.h
+++ b/src/gui/guiFormSpecMenu.h
@@ -39,6 +39,7 @@ class ISimpleTextureSource;
class Client;
class GUIScrollBar;
class TexturePool;
+class GUIScrollContainer;
typedef enum {
f_Button,
@@ -274,11 +275,13 @@ protected:
v2s32 getRealCoordinateBasePos(const std::vector<std::string> &v_pos);
v2s32 getRealCoordinateGeometry(const std::vector<std::string> &v_geom);
- std::unordered_map<std::string, StyleSpec> theme_by_type;
- std::unordered_map<std::string, StyleSpec> theme_by_name;
+ std::unordered_map<std::string, std::vector<StyleSpec>> theme_by_type;
+ std::unordered_map<std::string, std::vector<StyleSpec>> theme_by_name;
std::unordered_set<std::string> property_warned;
- StyleSpec getStyleForElement(const std::string &type,
+ StyleSpec getDefaultStyleForElement(const std::string &type,
+ const std::string &name="", const std::string &parent_type="");
+ std::array<StyleSpec, StyleSpec::NUM_STATES> getStyleForElement(const std::string &type,
const std::string &name="", const std::string &parent_type="");
v2s32 padding;
@@ -308,6 +311,7 @@ protected:
std::vector<std::pair<FieldSpec, GUIScrollBar *>> m_scrollbars;
std::vector<std::pair<FieldSpec, std::vector<std::string>>> m_dropdowns;
std::vector<gui::IGUIElement *> m_clickthrough_elements;
+ std::vector<std::pair<std::string, GUIScrollContainer *>> m_scroll_containers;
GUIInventoryList::ItemSpec *m_selected_item = nullptr;
u16 m_selected_amount = 0;
@@ -341,6 +345,7 @@ private:
u16 m_formspec_version = 1;
std::string m_focused_element = "";
JoystickController *m_joystick;
+ bool m_show_debug = false;
typedef struct {
bool explicit_size;
@@ -356,6 +361,7 @@ private:
std::string focused_fieldname;
GUITable::TableOptions table_options;
GUITable::TableColumns table_columns;
+ gui::IGUIElement *current_parent = nullptr;
GUIInventoryList::Options inventorylist_options;
@@ -388,6 +394,8 @@ private:
void parseSize(parserData* data, const std::string &element);
void parseContainer(parserData* data, const std::string &element);
void parseContainerEnd(parserData* data);
+ void parseScrollContainer(parserData *data, const std::string &element);
+ void parseScrollContainerEnd(parserData *data);
void parseList(parserData* data, const std::string &element);
void parseListRing(parserData* data, const std::string &element);
void parseCheckbox(parserData* data, const std::string &element);