Exemple #1
0
void SingleHiScoreTable::Draw()
{
  TextWriter* t = Engine::Instance()->GetTextWriter();
  float i = 4.0f;
  for (HiScores::reverse_iterator it = m_hiScores.rbegin(); it != m_hiScores.rend(); ++it)
  {
    std::string s = ToString(it->first);
    int sp = 9 - s.length();
    if (sp > 0)
    {
      s = std::string(sp, ' ') + s;
    }
    t->Print(5, i, s.c_str());
    t->Print(14, i, it->second.c_str());
    i += 1.0f;
  }
}