Draws scrollbar above list to have a correct order for Z sorting after a6cb77a204.

Reported By: nwtour
Tested By: nwtour
Differential Revision: https://code.wildfiregames.com/D3881
This was SVN commit r25303.
This commit is contained in:
vladislavbelov
2021-04-23 06:56:01 +00:00
parent 6f1644aac3
commit f3bc024e79
2 changed files with 6 additions and 7 deletions
+3 -3
View File
@@ -476,11 +476,11 @@ void CDropDown::Draw()
DrawText(m_Selected, m_Enabled ? m_TextColorSelected : m_TextColorDisabled, pos, bz + 0.1f, cliparea);
}
// Disable scrollbar during drawing without sending a setting-changed message
bool old = m_ScrollBar;
if (m_Open)
{
// Disable scrollbar during drawing without sending a setting-changed message
const bool old = m_ScrollBar;
// TODO: drawScrollbar as an argument of DrawList?
if (m_HideScrollBar)
m_ScrollBar = false;
+3 -4
View File
@@ -330,10 +330,6 @@ void CList::DrawList(const int& selected, const CGUISpriteInstance& sprite, cons
{
float bz = GetBufferedZ();
// First call draw on ScrollBarOwner
if (m_ScrollBar)
IGUIScrollBarOwner::Draw();
{
CRect rect = GetListRect();
@@ -396,6 +392,9 @@ void CList::DrawList(const int& selected, const CGUISpriteInstance& sprite, cons
DrawText(i, textcolor, rect.TopLeft() - CVector2D(0.f, scroll - m_ItemsYPositions[i]), bz + 0.1f, cliparea);
}
}
if (m_ScrollBar)
IGUIScrollBarOwner::Draw();
}
void CList::AddItem(const CGUIString& str, const CGUIString& data)