diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-08-04 18:55:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-04 18:55:54 +0200 |
commit | 3b9d49b3c7607cf5f01c7b169f84e312eb0fd99d (patch) | |
tree | 4e5c13d2944504a9a69ee49905f5d390cc6cec22 /src/gui/guiFormSpecMenu.h | |
parent | 3e6da817910a4f93353ef2e0b50fb9eb8bd88606 (diff) | |
download | hax-minetest-server-3b9d49b3c7607cf5f01c7b169f84e312eb0fd99d.tar.gz hax-minetest-server-3b9d49b3c7607cf5f01c7b169f84e312eb0fd99d.zip |
guiFormspecMenu: Allow fraction values for container[] (#7497)
Switch spacing and pos_offset to v2f32 for percision, add helper function
Diffstat (limited to '')
-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 013ba65cb..501b4db1b 100644 --- a/src/gui/guiFormSpecMenu.h +++ b/src/gui/guiFormSpecMenu.h @@ -372,13 +372,15 @@ protected: { return padding + offset + AbsoluteRect.UpperLeftCorner; } + v2s32 getElementBasePos(bool absolute, + const std::vector<std::string> *v_pos); v2s32 padding; - v2s32 spacing; + v2f32 spacing; v2s32 imgsize; v2s32 offset; - v2s32 pos_offset; - std::stack<v2s32> container_stack; + v2f32 pos_offset; + std::stack<v2f32> container_stack; InventoryManager *m_invmgr; ISimpleTextureSource *m_tsrc; |