mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
General scrollbar improvements. Patch by Josh. Fixes #2080.
- Don't show the scrollbar when the contents aren't overflowing the visible area. - Fix bugs in minimum bar sizing. - Add capability to set a maximum bar size. - Correct outdated/incorrect comments. This was SVN commit r13771.
This commit is contained in:
@@ -1775,6 +1775,15 @@ void CGUI::Xeromyces_ReadScrollBarStyle(XMBElement Element, CXeromyces* pFile)
|
||||
scrollbar.m_MinimumBarSize = f;
|
||||
}
|
||||
else
|
||||
if (attr_name == "maximum_bar_size")
|
||||
{
|
||||
float f;
|
||||
if (!GUI<float>::ParseString(attr_value.FromUTF8(), f))
|
||||
LOGERROR(L"GUI: Error parsing '%hs' (\"%hs\")", attr_name.c_str(), attr_value.c_str());
|
||||
else
|
||||
scrollbar.m_MaximumBarSize = f;
|
||||
}
|
||||
else
|
||||
if (attr_name == "sprite_button_top")
|
||||
scrollbar.m_SpriteButtonTop = attr_value;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user