diff options
author | v-rob <31123645+v-rob@users.noreply.github.com> | 2019-06-27 05:40:49 -0700 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-06-27 13:40:49 +0100 |
commit | 5e7004e7af71fa7f2f980414c9951a93c0a0e994 (patch) | |
tree | 70718eff44ae3310dfc5f9fc4a85b5526af13a2b /src/gui/guiFormSpecMenu.h | |
parent | 91d244c5229695933bf8510b01e06f922f062359 (diff) | |
download | minetest-5e7004e7af71fa7f2f980414c9951a93c0a0e994.tar.gz minetest-5e7004e7af71fa7f2f980414c9951a93c0a0e994.tar.bz2 minetest-5e7004e7af71fa7f2f980414c9951a93c0a0e994.zip |
Add compatible, consistent coordinate system to FormSpecs. (#8524)
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r-- | src/gui/guiFormSpecMenu.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h index b1ca9a48a..9c1ecb635 100644 --- a/src/gui/guiFormSpecMenu.h +++ b/src/gui/guiFormSpecMenu.h @@ -99,12 +99,14 @@ class GUIFormSpecMenu : public GUIModalMenu ListDrawSpec(const InventoryLocation &a_inventoryloc, const std::string &a_listname, - v2s32 a_pos, v2s32 a_geom, s32 a_start_item_i): + v2s32 a_pos, v2s32 a_geom, s32 a_start_item_i, + bool a_real_coordinates): inventoryloc(a_inventoryloc), listname(a_listname), pos(a_pos), geom(a_geom), - start_item_i(a_start_item_i) + start_item_i(a_start_item_i), + real_coordinates(a_real_coordinates) { } @@ -113,6 +115,7 @@ class GUIFormSpecMenu : public GUIModalMenu v2s32 pos; v2s32 geom; s32 start_item_i; + bool real_coordinates; }; struct ListRingSpec @@ -394,6 +397,9 @@ protected: std::string getNameByID(s32 id); v2s32 getElementBasePos(bool absolute, const std::vector<std::string> *v_pos); + v2s32 getRealCoordinateBasePos(bool absolute, + const std::vector<std::string> &v_pos); + v2s32 getRealCoordinateGeometry(const std::vector<std::string> &v_geom); v2s32 padding; v2f32 spacing; @@ -463,6 +469,7 @@ private: typedef struct { bool explicit_size; + bool real_coordinates; v2f invsize; v2s32 size; v2f32 offset; |