#include <PlayerDialog.h>

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 PlayerDialog * | instance () |
Protected Member Functions | |
| PlayerDialog () | |
| virtual | ~PlayerDialog () |
| void | nextPlayer () |
| int | getCurrentTeam () |
| unsigned int | getNextPlayer (unsigned int current) |
Protected Attributes | |
| GLWDropDownText * | typeDropDown_ |
| GLWDropDownText * | teamDropDown_ |
| GLWDropDownColor * | colorDropDown_ |
| GLWLabel * | colorLabel_ |
| GLWLabel * | teamLabel_ |
| GLWTankViewer * | viewer_ |
| GLWTextBox * | playerName_ |
| GLWImageList * | imageList_ |
| ToolTip | avatarTip1_ |
| ToolTip | avatarTip2_ |
| ToolTip | humanToolTip_ |
| GLTexture | colorTexture_ |
| unsigned int | allocatedTeam_ |
| unsigned int | okId_ |
| unsigned int | cancelId_ |
| unsigned int | currentPlayerId_ |
Static Protected Attributes | |
| static PlayerDialog * | instance_ = 0 |
Definition at line 33 of file PlayerDialog.h.
| 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.
| 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().
PlayerDialog * PlayerDialog::instance_ = 0 [static, protected] |
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] |
GLWLabel* PlayerDialog::teamLabel_ [protected] |
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] |
ToolTip PlayerDialog::avatarTip2_ [protected] |
ToolTip PlayerDialog::humanToolTip_ [protected] |
GLTexture PlayerDialog::colorTexture_ [protected] |
unsigned int PlayerDialog::allocatedTeam_ [protected] |
unsigned int PlayerDialog::okId_ [protected] |
unsigned int PlayerDialog::cancelId_ [protected] |
unsigned int PlayerDialog::currentPlayerId_ [protected] |
Definition at line 72 of file PlayerDialog.h.
Referenced by buttonDown(), display(), and nextPlayer().
1.5.3