ScoreDialog Class Reference

#include <ScoreDialog.h>

Inheritance diagram for ScoreDialog:

GLWWindow GLWPanel GLWidget MetaClass

List of all members.

Public Member Functions

virtual void display ()
virtual void windowInit (const unsigned state)
virtual void draw ()

Static Public Member Functions

static ScoreDialoginstance ()
static ScoreDialoginstance2 ()

Protected Member Functions

void calculateScores ()
void addLine (Tank *current, float y, char *rank, bool finished)
void addScoreLine (float y, Vector &color, int score)

Protected Attributes

std::list< unsigned int > sortedTanks_
int lastScoreValue_
int lastMoneyValue_
int lastNoPlayers_

Static Protected Attributes

static ScoreDialoginstance_ = 0
static ScoreDialoginstance2_ = 0

Private Member Functions

 ScoreDialog ()
virtual ~ScoreDialog ()


Detailed Description

Definition at line 27 of file ScoreDialog.h.


Constructor & Destructor Documentation

ScoreDialog::ScoreDialog (  )  [private]

Definition at line 83 of file ScoreDialog.cpp.

ScoreDialog::~ScoreDialog (  )  [private, virtual]

Definition at line 91 of file ScoreDialog.cpp.


Member Function Documentation

ScoreDialog * ScoreDialog::instance (  )  [static]

Definition at line 63 of file ScoreDialog.cpp.

References instance_.

Referenced by ClientWindowSetup::addCommonComponents().

ScoreDialog * ScoreDialog::instance2 (  )  [static]

Definition at line 73 of file ScoreDialog.cpp.

References instance2_.

Referenced by ClientWindowSetup::setupGameWindows().

void ScoreDialog::display (  )  [virtual]

Reimplemented from GLWPanel.

Definition at line 96 of file ScoreDialog.cpp.

References calculateScores(), GLWPanel::display(), GLWidget::getId(), GLWWindowManager::hideWindow(), GLWWindowManager::instance(), ScorchedClient::instance(), OptionsDisplay::instance(), and ClientState::StateScore.

void ScoreDialog::windowInit ( const unsigned  state  )  [virtual]

Reimplemented from GLWWindow.

Definition at line 130 of file ScoreDialog.cpp.

References GLWWindow::needCentered_.

void ScoreDialog::draw (  )  [virtual]

Reimplemented from GLWWindow.

Definition at line 135 of file ScoreDialog.cpp.

References addLine(), addScoreLine(), GLWToolTip::addToolTip(), assistsLeft, GLWColors::black, calculateScores(), GLState::DEPTH_OFF, GLFont2d::draw(), GLWWindow::draw(), S3D::formatStringBuffer(), ClientParams::getConnectedToServer(), ClientScoreHandler::getFinalScore(), GLWFont::getGameFont(), GLWFont::getGameShadowFont(), TankScore::getMoney(), ScorchedContext::getOptionsGame(), TankContainer::getPlayingTanks(), TankScore::getScore(), Tank::getScore(), TankState::getSpectator(), Tank::getState(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), Tank::getTeam(), TankColorGenerator::getTeamColor(), GLFont2d::getWidth(), TankSort::getWinningTeam(), GLWidget::h_, GLWToolTip::instance(), GLWFont::instance(), ClientParams::instance(), ClientScoreHandler::instance(), ScorchedClient::instance(), killsLeft, LANG_RESOURCE, LANG_RESOURCE_1, LANG_RESOURCE_VAR, LANG_RESOURCE_VAR_2, LANG_STRING, lastMoneyValue_, lastNoPlayers_, lastScoreValue_, lineSpacer, livesLeft, moneyLeft, nameLeft, GLWWindow::needCentered_, scoreLeft, GLWidget::setH(), snprintf, sortedTanks_, ClientState::StateGetPlayers, ClientState::StateScore, statsLeft, GLState::TEXTURE_OFF, ToolTip::ToolTipHelp, winsLeft, GLWidget::x_, and GLWidget::y_.

void ScoreDialog::calculateScores (  )  [protected]

Definition at line 109 of file ScoreDialog.cpp.

References TankScore::getMoney(), TankContainer::getPlayingTanks(), TankScore::getScore(), Tank::getScore(), TankSort::getSortedTanksIds(), ScorchedContext::getTankContainer(), ScorchedClient::instance(), lastMoneyValue_, lastNoPlayers_, lastScoreValue_, and sortedTanks_.

Referenced by display(), and draw().

void ScoreDialog::addLine ( Tank current,
float  y,
char *  rank,
bool  finished 
) [protected]

Definition at line 431 of file ScoreDialog.cpp.

References GLWToolTip::addToolTip(), assistsLeft, GLState::BLEND_ON, GLTexture::draw(), GLFont2d::draw(), GLFont2d::drawWidth(), S3D::formatStringBuffer(), TankScore::getAssists(), Tank::getAvatar(), Tank::getColor(), TankContainer::getCurrentDestinationId(), Tank::getDestinationId(), GLWFont::getGameFont(), TankScore::getKills(), TankState::getLives(), TankScore::getMoney(), TankAI::getName(), Target::getPlayerId(), TankScore::getRank(), TankState::getReadyState(), Target::getRenderer(), TankScore::getScore(), Tank::getScore(), TankState::getSmallStateLangString(), TankState::getSpectator(), TankState::getState(), Tank::getState(), Tank::getTankAI(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), Target::getTargetName(), TankAvatar::getTexture(), TargetRendererImplTank::getTips(), TankScore::getWins(), GL_QUADS, glBegin(), glColor3f(), glColor4f(), glEnd(), glTexCoord2f(), glVertex2f(), GLWidget::h_, iconLeft, GLWFont::instance(), ScorchedServer::instance(), ClientParams::instance(), ScorchedClient::instance(), GLWToolTip::instance(), killsLeft, LANG_RESOURCE, LANG_STRING, lineSpacer, livesLeft, moneyLeft, nameLeft, rankLeft, readyLeft, scoreLeft, TankState::sNormal, TankState::SNotReady, statsLeft, GLWTankTips::tankTip, GLState::TEXTURE_ON, GLWidget::w_, winsLeft, GLWidget::x_, and GLWidget::y_.

Referenced by draw().

void ScoreDialog::addScoreLine ( float  y,
Vector color,
int  score 
) [protected]

Definition at line 418 of file ScoreDialog.cpp.

References GLFont2d::draw(), S3D::formatStringBuffer(), GLWFont::getGameFont(), GLWidget::h_, GLWFont::instance(), lineSpacer, scoreLeft, GLWidget::x_, and GLWidget::y_.

Referenced by draw().


Member Data Documentation

ScoreDialog * ScoreDialog::instance_ = 0 [static, protected]

Definition at line 39 of file ScoreDialog.h.

Referenced by instance().

ScoreDialog * ScoreDialog::instance2_ = 0 [static, protected]

Definition at line 40 of file ScoreDialog.h.

Referenced by instance2().

std::list<unsigned int> ScoreDialog::sortedTanks_ [protected]

Definition at line 41 of file ScoreDialog.h.

Referenced by calculateScores(), and draw().

int ScoreDialog::lastScoreValue_ [protected]

Definition at line 42 of file ScoreDialog.h.

Referenced by calculateScores(), and draw().

int ScoreDialog::lastMoneyValue_ [protected]

Definition at line 43 of file ScoreDialog.h.

Referenced by calculateScores(), and draw().

int ScoreDialog::lastNoPlayers_ [protected]

Definition at line 44 of file ScoreDialog.h.

Referenced by calculateScores(), and draw().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:06 2009 for Scorched3D by  doxygen 1.5.3