1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

guiFormspecMenu: Allow fraction values for container[] (#7497)

Switch spacing and pos_offset to v2f32 for percision, add helper function
This commit is contained in:
SmallJoker 2018-08-04 18:55:54 +02:00 committed by GitHub
parent 3e6da81791
commit 3b9d49b3c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 74 additions and 91 deletions

View file

@ -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;