From 3b9d49b3c7607cf5f01c7b169f84e312eb0fd99d Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 4 Aug 2018 18:55:54 +0200 Subject: guiFormspecMenu: Allow fraction values for container[] (#7497) Switch spacing and pos_offset to v2f32 for percision, add helper function --- src/gui/guiFormSpecMenu.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/guiFormSpecMenu.h') 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 *v_pos); v2s32 padding; - v2s32 spacing; + v2f32 spacing; v2s32 imgsize; v2s32 offset; - v2s32 pos_offset; - std::stack container_stack; + v2f32 pos_offset; + std::stack container_stack; InventoryManager *m_invmgr; ISimpleTextureSource *m_tsrc; -- cgit v1.2.3