diff options
author | Hugues Ross <hugues.ross@gmail.com> | 2020-04-11 16:39:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 21:39:30 +0100 |
commit | f780bae05cc2fdd23a6d7326c770783da8d94ea3 (patch) | |
tree | 31d7e764d86e9f5731c3d3a4e35c598cdc7f777c /src/gui/guiFormSpecMenu.h | |
parent | ba3587e7769113fed9a076ae2e4d2153686fb163 (diff) | |
download | minetest-f780bae05cc2fdd23a6d7326c770783da8d94ea3.tar.gz minetest-f780bae05cc2fdd23a6d7326c770783da8d94ea3.tar.bz2 minetest-f780bae05cc2fdd23a6d7326c770783da8d94ea3.zip |
Formspecs: Add state-selection to style elements (#9378)
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r-- | src/gui/guiFormSpecMenu.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h index 17bfef205..b3bf67110 100644 --- a/src/gui/guiFormSpecMenu.h +++ b/src/gui/guiFormSpecMenu.h @@ -274,11 +274,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; |