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:
alpha123
2013-08-26 03:06:08 +00:00
parent 2dc0c40ff0
commit f5ab6255d0
14 changed files with 776 additions and 613 deletions
+9
View File
@@ -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