PlayerDialog Class Reference

#include <PlayerDialog.h>

Inheritance diagram for PlayerDialog:

GLWWindow GLWButtonI GLWDropDownI GLWPanel GLWidget MetaClass

List of all members.

Public Member Functions

virtual void display ()
virtual void draw ()
virtual void keyDown (char *buffer, unsigned int keyState, KeyboardHistory::HistoryElement *history, int hisCount, bool &skipRest)
virtual void buttonDown (unsigned int id)
virtual void select (unsigned int id, const int pos, GLWSelectorEntry value)

Static Public Member Functions

static PlayerDialoginstance ()

Protected Member Functions

 PlayerDialog ()
virtual ~PlayerDialog ()
void nextPlayer ()
int getCurrentTeam ()
unsigned int getNextPlayer (unsigned int current)

Protected Attributes

GLWDropDownTexttypeDropDown_
GLWDropDownTextteamDropDown_
GLWDropDownColorcolorDropDown_
GLWLabelcolorLabel_
GLWLabelteamLabel_
GLWTankViewerviewer_
GLWTextBoxplayerName_
GLWImageListimageList_
ToolTip avatarTip1_
ToolTip avatarTip2_
ToolTip humanToolTip_
GLTexture colorTexture_
unsigned int allocatedTeam_
unsigned int okId_
unsigned int cancelId_
unsigned int currentPlayerId_

Static Protected Attributes

static PlayerDialoginstance_ = 0


Detailed Description

Definition at line 33 of file PlayerDialog.h.


Constructor & Destructor Documentation

PlayerDialog::PlayerDialog (  )  [protected]

Definition at line 56 of file PlayerDialog.cpp.

References GLWImageList::addDirectory(), GLWPanel::addWidget(), avatarTip1_, avatarTip2_, GLWButton::ButtonFlagCancel, GLWButton::ButtonFlagCenterX, GLWButton::ButtonFlagOk, cancelId_, colorDropDown_, colorLabel_, colorTexture_, GLTexture::create(), S3D::getDataFile(), GLWidget::getId(), S3D::getSettingsFile(), GLWPanel::GLWPanel(), humanToolTip_, imageList_, ScorchedClient::instance(), ClientParams::instance(), LANG_RESOURCE, ImageFactory::loadImageHandle(), GLWWindow::needCentered_, okId_, playerName_, GLWTextBox::setAllowUnicode(), GLWImageList::setCurrentShortPath(), GLWDropDown::setHandler(), GLWTextBox::setMaxTextLen(), GLWidget::setName(), ToolTip::setText(), GLWidget::setToolTip(), teamDropDown_, teamLabel_, ToolTip::ToolTipHelp, and typeDropDown_.

PlayerDialog::~PlayerDialog (  )  [protected, virtual]

Definition at line 169 of file PlayerDialog.cpp.


Member Function Documentation

PlayerDialog * PlayerDialog::instance (  )  [static]

Definition at line 47 of file PlayerDialog.cpp.

References instance_.

Referenced by ClientWindowSetup::addCommonComponents(), RulesDialog::hide(), ClientInitializeHandler::initialize(), and ClientWindowSetup::setupGameWindows().

void PlayerDialog::display (  )  [virtual]

Reimplemented from GLWPanel.

Definition at line 219 of file PlayerDialog.cpp.

References GLWDropDown::addEntry(), GLWDropDownText::addText(), GLWPanel::addWidget(), TankAI::availableForPlayers(), GLWDropDown::clear(), colorDropDown_, colorLabel_, colorTexture_, currentPlayerId_, GLWPanel::display(), TankAIStore::getAis(), GLWSelectorEntry::getColor(), TankAI::getName(), ScorchedContext::getOptionsGame(), TankColorGenerator::getTeamColor(), TankColorGenerator::getTeamName(), GLWPanel::GLWPanel(), humanToolTip_, ClientParams::instance(), ScorchedClient::instance(), LANG_RESOURCE, TankAIStore::loadAIs(), nextPlayer(), GLWidget::setName(), GLWidget::setVisible(), teamDropDown_, teamLabel_, typeDropDown_, and viewer_.

void PlayerDialog::draw (  )  [virtual]

Reimplemented from GLWWindow.

Definition at line 173 of file PlayerDialog.cpp.

References allocatedTeam_, GLWWindow::draw(), OptionsTransient::getLeastUsedTeam(), ScorchedContext::getOptionsTransient(), ScorchedClient::instance(), GLWDropDown::setCurrentPosition(), GLWTankViewer::setTeam(), teamDropDown_, and viewer_.

void PlayerDialog::keyDown ( char *  buffer,
unsigned int  keyState,
KeyboardHistory::HistoryElement history,
int  hisCount,
bool &  skipRest 
) [virtual]

Reimplemented from GLWWindow.

Definition at line 211 of file PlayerDialog.cpp.

References ClientParams::instance(), and GLWWindow::keyDown().

void PlayerDialog::buttonDown ( unsigned int  id  )  [virtual]

Implements GLWButtonI.

Definition at line 394 of file PlayerDialog.cpp.

References cancelId_, colorDropDown_, currentPlayerId_, ClientParams::getConnectedToServer(), GLWDropDownColor::getCurrentColor(), GLWDropDownText::getCurrentDataText(), TankContainer::getCurrentDestinationId(), GLWImageList::getCurrentLongPath(), GLWImageList::getCurrentShortPath(), getCurrentTeam(), GLWidget::getId(), GLWTextBox::getLangString(), GLWTankViewer::getModelName(), TankModel::getName(), OptionsDisplay::getOnlineColorEntry(), OptionsDisplay::getOnlineTankModelEntry(), OptionsDisplay::getOnlineUserIconEntry(), OptionsDisplay::getOnlineUserNameEntry(), ScorchedContext::getOptionsGame(), ScorchedContext::getTankContainer(), ScorchedContext::getTankModels(), GLWTextBox::getText(), TankModel::getTypeName(), GLWWindowManager::hideWindow(), imageList_, GLWWindowManager::instance(), ScorchedClient::instance(), OptionsDisplay::instance(), ClientParams::instance(), LANG_RESOURCE_2, Logger::log(), nextPlayer(), okId_, playerName_, ComsMessageSender::sendToServer(), OptionEntryVector::setValue(), OptionEntryString::setValue(), typeDropDown_, and viewer_.

void PlayerDialog::select ( unsigned int  id,
const int  pos,
GLWSelectorEntry  value 
) [virtual]

Implements GLWDropDownI.

Definition at line 191 of file PlayerDialog.cpp.

References getCurrentTeam(), GLWSelectorEntry::getDataText(), GLWidget::getId(), imageList_, GLWImageList::setCurrentShortPath(), GLWTankViewer::setTeam(), teamDropDown_, typeDropDown_, and viewer_.

void PlayerDialog::nextPlayer (  )  [protected]

Definition at line 287 of file PlayerDialog.cpp.

References GLWDropDownColor::addColor(), allocatedTeam_, avatarTip1_, avatarTip2_, GLWDropDown::clear(), colorDropDown_, currentPlayerId_, TankColorGenerator::getAvailableColors(), Tank::getColor(), GLWDropDownColor::getCurrentColor(), GLWidget::getId(), getNextPlayer(), OptionsDisplay::getOnlineColor(), OptionsDisplay::getOnlineUserIcon(), TankContainer::getPlayingTanks(), TankState::getSpectator(), Tank::getState(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), Target::getTargetName(), GLWWindowManager::hideWindow(), imageList_, TankColorGenerator::instance(), OptionsDisplay::instance(), ClientParams::instance(), ScorchedClient::instance(), GLWWindowManager::instance(), LANG_STRING, playerName_, GLWTankViewer::selectModelByName(), GLWDropDownColor::setCurrentColor(), GLWImageList::setCurrentShortPath(), GLWImageList::setEnabled(), GLWTextBox::setText(), GLWidget::setToolTip(), and viewer_.

Referenced by buttonDown(), and display().

int PlayerDialog::getCurrentTeam (  )  [protected]

Definition at line 388 of file PlayerDialog.cpp.

References GLWDropDown::getCurrentPosition(), ScorchedClient::instance(), and teamDropDown_.

Referenced by buttonDown(), and select().

unsigned int PlayerDialog::getNextPlayer ( unsigned int  current  )  [protected]

Definition at line 363 of file PlayerDialog.cpp.

References TankContainer::getCurrentDestinationId(), Tank::getDestinationId(), Target::getPlayerId(), TankContainer::getPlayingTanks(), TankState::getState(), Tank::getState(), ScorchedContext::getTankContainer(), ScorchedClient::instance(), TankState::sNormal, and TargetID::SPEC_TANK_ID.

Referenced by nextPlayer().


Member Data Documentation

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

Definition at line 58 of file PlayerDialog.h.

Referenced by instance().

GLWDropDownText* PlayerDialog::typeDropDown_ [protected]

Definition at line 59 of file PlayerDialog.h.

Referenced by buttonDown(), display(), PlayerDialog(), and select().

GLWDropDownText* PlayerDialog::teamDropDown_ [protected]

Definition at line 60 of file PlayerDialog.h.

Referenced by display(), draw(), getCurrentTeam(), PlayerDialog(), and select().

GLWDropDownColor* PlayerDialog::colorDropDown_ [protected]

Definition at line 61 of file PlayerDialog.h.

Referenced by buttonDown(), display(), nextPlayer(), and PlayerDialog().

GLWLabel* PlayerDialog::colorLabel_ [protected]

Definition at line 62 of file PlayerDialog.h.

Referenced by display(), and PlayerDialog().

GLWLabel* PlayerDialog::teamLabel_ [protected]

Definition at line 63 of file PlayerDialog.h.

Referenced by display(), and PlayerDialog().

GLWTankViewer* PlayerDialog::viewer_ [protected]

Definition at line 64 of file PlayerDialog.h.

Referenced by buttonDown(), display(), draw(), nextPlayer(), and select().

GLWTextBox* PlayerDialog::playerName_ [protected]

Definition at line 65 of file PlayerDialog.h.

Referenced by buttonDown(), nextPlayer(), and PlayerDialog().

GLWImageList* PlayerDialog::imageList_ [protected]

Definition at line 66 of file PlayerDialog.h.

Referenced by buttonDown(), nextPlayer(), PlayerDialog(), and select().

ToolTip PlayerDialog::avatarTip1_ [protected]

Definition at line 67 of file PlayerDialog.h.

Referenced by nextPlayer(), and PlayerDialog().

ToolTip PlayerDialog::avatarTip2_ [protected]

Definition at line 67 of file PlayerDialog.h.

Referenced by nextPlayer(), and PlayerDialog().

ToolTip PlayerDialog::humanToolTip_ [protected]

Definition at line 68 of file PlayerDialog.h.

Referenced by display(), and PlayerDialog().

GLTexture PlayerDialog::colorTexture_ [protected]

Definition at line 69 of file PlayerDialog.h.

Referenced by display(), and PlayerDialog().

unsigned int PlayerDialog::allocatedTeam_ [protected]

Definition at line 70 of file PlayerDialog.h.

Referenced by draw(), and nextPlayer().

unsigned int PlayerDialog::okId_ [protected]

Definition at line 71 of file PlayerDialog.h.

Referenced by buttonDown(), and PlayerDialog().

unsigned int PlayerDialog::cancelId_ [protected]

Definition at line 71 of file PlayerDialog.h.

Referenced by buttonDown(), and PlayerDialog().

unsigned int PlayerDialog::currentPlayerId_ [protected]

Definition at line 72 of file PlayerDialog.h.

Referenced by buttonDown(), display(), and nextPlayer().


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