1
0
forked from 0ad/0ad

Fix "hides overloaded virtual function" warnings in Clang

This was SVN commit r9862.
This commit is contained in:
Ykkrosh 2011-07-17 17:30:07 +00:00
parent be3eb579d4
commit a31ce6a3ce
9 changed files with 9 additions and 15 deletions

View File

@ -116,5 +116,5 @@ void CButton::Draw()
cell_id);
CColor color = ChooseColor();
IGUITextOwner::Draw(0, color, m_TextPos, bz+0.1f);
DrawText(0, color, m_TextPos, bz+0.1f);
}

View File

@ -175,5 +175,5 @@ void CCheckBox::Draw()
if (square_side > line_height)
text_pos.y += square_side/2.f - line_height/2.f;
IGUITextOwner::Draw(0, color, text_pos, bz+0.1f, m_CachedActualSize);
DrawText(0, color, text_pos, bz+0.1f, m_CachedActualSize);
}

View File

@ -337,7 +337,7 @@ void CDropDown::Draw()
m_CachedActualSize.right-button_width, m_CachedActualSize.bottom);
CPos pos(m_CachedActualSize.left, m_CachedActualSize.top);
IGUITextOwner::Draw(selected, color, pos, bz+0.1f, cliparea);
DrawText(selected, color, pos, bz+0.1f, cliparea);
}
bool *scrollbar=NULL, old;

View File

@ -401,8 +401,7 @@ void CList::DrawList(const int &selected,
cliparea.left = GetScrollBar(0).GetOuterRect().right;
}
IGUITextOwner::Draw(i, color, rect.TopLeft() - CPos(0.f, scroll - m_ItemsYPositions[i]),
bz+0.1f, cliparea);
DrawText(i, color, rect.TopLeft() - CPos(0.f, scroll - m_ItemsYPositions[i]), bz+0.1f, cliparea);
}
}
}

View File

@ -244,11 +244,10 @@ void CText::Draw()
CColor color;
GUI<CColor>::GetSetting(this, "textcolor", color);
// Draw text
if (scrollbar)
IGUITextOwner::Draw(0, color, m_CachedActualSize.TopLeft() - CPos(0.f, scroll), bz+0.1f, cliparea);
DrawText(0, color, m_CachedActualSize.TopLeft() - CPos(0.f, scroll), bz+0.1f, cliparea);
else
IGUITextOwner::Draw(0, color, m_TextPos, bz+0.1f, cliparea);
DrawText(0, color, m_TextPos, bz+0.1f, cliparea);
}
}

View File

@ -160,7 +160,6 @@ void CTooltip::Draw()
CColor color;
GUI<CColor>::GetSetting(this, "textcolor", color);
// Draw text
IGUITextOwner::Draw(0, color, m_CachedActualSize.TopLeft(), z+0.1f);
DrawText(0, color, m_CachedActualSize.TopLeft(), z+0.1f);
}
}

View File

@ -583,7 +583,6 @@ class CGUIDummyObject : public IGUIObject
public:
virtual void HandleMessage(const SGUIMessage& UNUSED(Message)) {}
virtual void Draw() {}
// Empty can never be hovered. It is only a category.
virtual bool MouseOver() { return false; }

View File

@ -78,8 +78,7 @@ void IGUITextOwner::UpdateCachedSize()
m_GeneratedTextsValid = false;
}
void IGUITextOwner::Draw(const int &index, const CColor &color, const CPos &pos,
const float &z, const CRect &clipping)
void IGUITextOwner::DrawText(int index, const CColor& color, const CPos& pos, float z, const CRect& clipping)
{
if (!m_GeneratedTextsValid)
{

View File

@ -88,8 +88,7 @@ public:
* @param clipping Clipping rectangle, don't even add a parameter
* to get no clipping.
*/
virtual void Draw(const int &index, const CColor &color, const CPos &pos,
const float &z, const CRect &clipping = CRect());
virtual void DrawText(int index, const CColor& color, const CPos& pos, float z, const CRect& clipping = CRect());
/**
* Test if mouse position is over an icon