Accessory sorting due to price.
[scorched3d.git] / src / client / dialogs / ScoreDialog.h
blobef15308e5eedc8b9435f797d29a812bde5bc3ee7
1 ////////////////////////////////////////////////////////////////////////////////
2 // Scorched3D (c) 2000-2009
3 //
4 // This file is part of Scorched3D.
5 //
6 // Scorched3D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // Scorched3D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with Scorched3D; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ////////////////////////////////////////////////////////////////////////////////
21 #if !defined(AFX_ScoreDialog_H__1E583C82_CF52_4F2A_9AF5_7E2AC893EFE9__INCLUDED_)
22 #define AFX_ScoreDialog_H__1E583C82_CF52_4F2A_9AF5_7E2AC893EFE9__INCLUDED_
24 #include <GLW/GLWWindow.h>
26 class Tank;
27 class ScoreDialog : public GLWWindow
29 public:
30 static ScoreDialog *instance();
31 static ScoreDialog *instance2();
33 // Inherited from GLWWindow
34 virtual void display();
35 virtual void windowInit(const unsigned state);
36 virtual void draw();
38 protected:
39 static ScoreDialog *instance_;
40 static ScoreDialog *instance2_;
41 std::list<unsigned int> sortedTanks_;
42 int lastScoreValue_;
43 int lastMoneyValue_;
44 int lastNoPlayers_;
46 void calculateScores();
47 void addLine(Tank *current, float y, char *rank, bool finished);
48 void addScoreLine(float y, Vector &color, int score);
50 private:
51 ScoreDialog();
52 virtual ~ScoreDialog();
56 #endif // !defined(AFX_ScoreDialog_H__1E583C82_CF52_4F2A_9AF5_7E2AC893EFE9__INCLUDED_)