diff options
author | DS <vorunbekannt75@web.de> | 2020-04-13 10:50:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 10:50:07 +0200 |
commit | 0ac999ded725f8efcd26db284161683e37efeecf (patch) | |
tree | 24dfe208152ffa5f28d912d1de8e65c13c3704d6 /src/gui/guiFormSpecMenu.h | |
parent | 6cf15cf872cc9ce76990d83d380ca3c4b7485eb1 (diff) | |
download | minetest-0ac999ded725f8efcd26db284161683e37efeecf.tar.gz minetest-0ac999ded725f8efcd26db284161683e37efeecf.tar.bz2 minetest-0ac999ded725f8efcd26db284161683e37efeecf.zip |
Add scroll_container formspec element (redo) (#9101)
New formspec elements:
- `scroll_container[<X>,<Y>;<W>,<H>;<scrollbar name>;<orientation>;<scroll factor>]`
- `scroll_container_end[]`
Other elements can be embedded in this element. Scrollbar must be placed manually.
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r-- | src/gui/guiFormSpecMenu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h index dc22e8b54..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, @@ -310,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; @@ -359,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; @@ -391,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); |