mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
This commit is contained in:
parent
7c261118e0
commit
051181fa6e
28 changed files with 74 additions and 56 deletions
|
@ -84,7 +84,7 @@ GUITable::GUITable(gui::IGUIEnvironment *env,
|
|||
#endif
|
||||
core::rect<s32> relative_rect = m_scrollbar->getRelativePosition();
|
||||
s32 width = (relative_rect.getWidth() / (2.0 / 3.0)) * density *
|
||||
g_settings->getFloat("gui_scaling");
|
||||
g_settings->getFloat("gui_scaling", 0.5f, 20.0f);
|
||||
m_scrollbar->setRelativePosition(core::rect<s32>(
|
||||
relative_rect.LowerRightCorner.X-width,relative_rect.UpperLeftCorner.Y,
|
||||
relative_rect.LowerRightCorner.X,relative_rect.LowerRightCorner.Y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue