SettingsFrame Class Reference

List of all members.

Public Member Functions

 SettingsFrame (bool server, OptionsGame &context)
virtual bool TransferDataToWindow ()
virtual bool TransferDataFromWindow ()

Protected Member Functions

void setupPlayers ()
void onMaxPlayerChange (wxCommandEvent &event)
void onSelectAll (wxCommandEvent &event)
void onDeselectAll (wxCommandEvent &event)

Protected Attributes

OptionsGamecontext_
wxNotebook * book_
wxPanel * mainPanel_
wxPanel * ecoPanel_
wxPanel * envPanel_
wxPanel * landPanel_
wxPanel * playersPanel_
wxPanel * motdPanel_
std::list
< OptionEntrySetter
setters_

Private Member Functions

void createMainPanel (bool server)
void createEcoPanel ()
void createEnvPanel ()
void createMotdPanel ()
void createLandPanel ()
void createPlayersPanel ()

Private Attributes

LandscapeDefinitionsBase landscapeDefinitions
TankAINames tankAIStore
wxTextCtrl * IDC_MOTD_CTRL
wxButton * IDC_SELECTALL_CTRL
wxButton * IDC_DESELECTALL_CTRL
wxCheckBox * IDC_CYCLEMAPS_CTRL
wxCheckBox ** landscapes
wxComboBox * IDC_SERVER_MIN_PLAYERS_CTRL
wxComboBox * IDC_SERVER_MAX_PLAYERS_CTRL
wxComboBox * IDC_SERVER_REMOVEBOT_PLAYERS_CTRL
wxComboBox ** IDC_COMBO_PTYPE_CTRL
wxTextCtrl * IDC_EDIT3_CTRL
wxCheckBox * IDC_SERVER_RESIDUAL_CTRL


Detailed Description

Definition at line 36 of file SettingsDialog.cpp.


Constructor & Destructor Documentation

SettingsFrame::SettingsFrame ( bool  server,
OptionsGame context 
)

Definition at line 430 of file SettingsDialog.cpp.

References book_, TankAINames::clearAIs(), convertString(), createEcoPanel(), createEnvPanel(), createLandPanel(), createMainPanel(), createMotdPanel(), createPlayersPanel(), DIALOG_ASSERT, S3D::getDataFile(), landscapeDefinitions, TankAINames::loadAIs(), LandscapeDefinitionsBase::readLandscapeDefinitions(), and tankAIStore.


Member Function Documentation

bool SettingsFrame::TransferDataToWindow (  )  [virtual]

Definition at line 525 of file SettingsDialog.cpp.

References context_, TankAINames::getAis(), LandscapeDefinitionsBase::getAllLandscapes(), OptionsGame::getBotNamePrefix(), OptionsGame::getCycleMaps(), OptionsGame::getCycleMapsEntry(), OptionEntry::getDescription(), OptionsGame::getMOTD(), OptionsGame::getNoMaxPlayers(), OptionsGame::getNoMinPlayers(), OptionsGame::getPlayerType(), OptionsGame::getRemoveBotsAtPlayers(), OptionsGame::getResidualPlayers(), OptionEntryString::getValue(), IDC_COMBO_PTYPE_CTRL, IDC_CYCLEMAPS_CTRL, IDC_EDIT3_CTRL, IDC_MOTD_CTRL, IDC_SERVER_MAX_PLAYERS_CTRL, IDC_SERVER_MIN_PLAYERS_CTRL, IDC_SERVER_REMOVEBOT_PLAYERS_CTRL, IDC_SERVER_RESIDUAL_CTRL, int(), landscapeDefinitions, LandscapeDefinitionsBase::landscapeEnabled(), landscapes, playersPanel_, setters_, setupPlayers(), snprintf, tankAIStore, and OptionEntrySetterUtil::updateControls().

bool SettingsFrame::TransferDataFromWindow (  )  [virtual]

Definition at line 620 of file SettingsDialog.cpp.

References context_, LandscapeDefinitionsBase::getAllLandscapes(), OptionsGame::getBotNamePrefixEntry(), OptionsGame::getCycleMapsEntry(), OptionsGame::getLandscapesEntry(), OptionsGame::getMOTDEntry(), OptionsGame::getNoMaxPlayersEntry(), OptionsGame::getNoMinPlayersEntry(), OptionsGame::getPlayerType(), OptionsGame::getRemoveBotsAtPlayersEntry(), OptionsGame::getResidualPlayersEntry(), IDC_COMBO_PTYPE_CTRL, IDC_CYCLEMAPS_CTRL, IDC_EDIT3_CTRL, IDC_MOTD_CTRL, IDC_SERVER_MAX_PLAYERS_CTRL, IDC_SERVER_MIN_PLAYERS_CTRL, IDC_SERVER_REMOVEBOT_PLAYERS_CTRL, IDC_SERVER_RESIDUAL_CTRL, int(), landscapeDefinitions, landscapes, playersPanel_, setters_, OptionEntryBool::setValue(), OptionEntryInt::setValue(), OptionEntryString::setValue(), and OptionEntrySetterUtil::updateEntries().

void SettingsFrame::setupPlayers (  )  [protected]

Definition at line 513 of file SettingsDialog.cpp.

References context_, OptionsGame::getNoMaxPlayers(), OptionsGame::getNoMaxPlayersEntry(), IDC_COMBO_PTYPE_CTRL, IDC_SERVER_MAX_PLAYERS_CTRL, and OptionEntryInt::setValue().

Referenced by onMaxPlayerChange(), and TransferDataToWindow().

void SettingsFrame::onMaxPlayerChange ( wxCommandEvent &  event  )  [protected]

Definition at line 508 of file SettingsDialog.cpp.

References setupPlayers().

void SettingsFrame::onSelectAll ( wxCommandEvent &  event  )  [protected]

Definition at line 484 of file SettingsDialog.cpp.

References LandscapeDefinitionsBase::getAllLandscapes(), int(), landscapeDefinitions, and landscapes.

void SettingsFrame::onDeselectAll ( wxCommandEvent &  event  )  [protected]

Definition at line 496 of file SettingsDialog.cpp.

References LandscapeDefinitionsBase::getAllLandscapes(), int(), landscapeDefinitions, and landscapes.

void SettingsFrame::createMainPanel ( bool  server  )  [private]

Definition at line 100 of file SettingsDialog.cpp.

References book_, context_, OptionEntrySetterUtil::createOtherSetter(), OptionsGame::getBuyingTimeEntry(), OptionsGame::getIdleKickTimeEntry(), OptionsGame::getIdleShotKickTimeEntry(), OptionsGame::getKeepAliveTimeoutTimeEntry(), OptionsGame::getModDownloadSpeedEntry(), OptionsGame::getNoMaxRoundTurnsEntry(), OptionsGame::getNoRoundsEntry(), OptionsGame::getServerPasswordEntry(), OptionsGame::getShotTimeEntry(), OptionsGame::getStartTimeEntry(), OptionsGame::getTeamBallanceEntry(), OptionsGame::getTeamsEntry(), OptionsGame::getTurnTypeEntry(), mainPanel_, setters_, and TRUE.

Referenced by SettingsFrame().

void SettingsFrame::createEcoPanel (  )  [private]

Definition at line 156 of file SettingsDialog.cpp.

References book_, context_, OptionEntrySetterUtil::createOtherSetter(), ecoPanel_, OptionsGame::getBuyOnRoundEntry(), OptionsGame::getEconomyEntry(), OptionsGame::getGiveAllWeaponsEntry(), OptionsGame::getInterestEntry(), OptionsGame::getMoneyPerHealthPointEntry(), OptionsGame::getMoneyPerRoundEntry(), OptionsGame::getMoneyWonForLivesEntry(), OptionsGame::getMoneyWonForRoundEntry(), OptionsGame::getMoneyWonPerAssistPointEntry(), OptionsGame::getMoneyWonPerHitPointEntry(), OptionsGame::getMoneyWonPerKillPointEntry(), OptionsGame::getMoneyWonPerMultiKillPointEntry(), OptionsGame::getScorePerAssistEntry(), OptionsGame::getScorePerKillEntry(), OptionsGame::getScorePerMoneyEntry(), OptionsGame::getScoreWonForLivesEntry(), OptionsGame::getScoreWonForRoundEntry(), OptionsGame::getStartMoneyEntry(), setters_, and TRUE.

Referenced by SettingsFrame().

void SettingsFrame::createEnvPanel (  )  [private]

Definition at line 223 of file SettingsDialog.cpp.

References book_, context_, OptionEntrySetterUtil::createOtherSetter(), envPanel_, OptionsGame::getDelayedDefenseActivationEntry(), OptionsGame::getEndArmsLevelEntry(), OptionsGame::getMaxClimbingDistanceEntry(), OptionsGame::getMinFallingDistanceEntry(), OptionsGame::getMovementRestrictionEntry(), OptionsGame::getPlayerLivesEntry(), OptionsGame::getResignModeEntry(), OptionsGame::getStartArmsLevelEntry(), OptionsGame::getWallTypeEntry(), OptionsGame::getWeapScaleEntry(), OptionsGame::getWindForceEntry(), OptionsGame::getWindTypeEntry(), setters_, and TRUE.

Referenced by SettingsFrame().

void SettingsFrame::createMotdPanel (  )  [private]

Definition at line 272 of file SettingsDialog.cpp.

References book_, IDC_MOTD_CTRL, motdPanel_, and TRUE.

Referenced by SettingsFrame().

void SettingsFrame::createLandPanel (  )  [private]

Definition at line 286 of file SettingsDialog.cpp.

References book_, convertString(), LandscapeDefinitionsEntry::description, S3D::formatStringBuffer(), LandscapeDefinitionsBase::getAllLandscapes(), S3D::getDataFile(), IDC_CYCLEMAPS_CTRL, IDC_DESELECTALL, IDC_DESELECTALL_CTRL, IDC_SELECTALL, IDC_SELECTALL_CTRL, landPanel_, landscapeDefinitions, landscapes, LandscapeDefinitionsEntry::name, LandscapeDefinitionsEntry::picture, and TRUE.

Referenced by SettingsFrame().

void SettingsFrame::createPlayersPanel (  )  [private]

Definition at line 358 of file SettingsDialog.cpp.

References book_, IDC_COMBO_PTYPE_CTRL, IDC_EDIT3_CTRL, IDC_SERVER_MAX_PLAYERS, IDC_SERVER_MAX_PLAYERS_CTRL, IDC_SERVER_MIN_PLAYERS_CTRL, IDC_SERVER_REMOVEBOT_PLAYERS_CTRL, IDC_SERVER_RESIDUAL_CTRL, playersPanel_, and TRUE.

Referenced by SettingsFrame().


Member Data Documentation

OptionsGame& SettingsFrame::context_ [protected]

Definition at line 45 of file SettingsDialog.cpp.

Referenced by createEcoPanel(), createEnvPanel(), createMainPanel(), setupPlayers(), TransferDataFromWindow(), and TransferDataToWindow().

wxNotebook* SettingsFrame::book_ [protected]

Definition at line 46 of file SettingsDialog.cpp.

Referenced by createEcoPanel(), createEnvPanel(), createLandPanel(), createMainPanel(), createMotdPanel(), createPlayersPanel(), and SettingsFrame().

wxPanel* SettingsFrame::mainPanel_ [protected]

Definition at line 47 of file SettingsDialog.cpp.

Referenced by createMainPanel().

wxPanel* SettingsFrame::ecoPanel_ [protected]

Definition at line 48 of file SettingsDialog.cpp.

Referenced by createEcoPanel().

wxPanel* SettingsFrame::envPanel_ [protected]

Definition at line 49 of file SettingsDialog.cpp.

Referenced by createEnvPanel().

wxPanel* SettingsFrame::landPanel_ [protected]

Definition at line 50 of file SettingsDialog.cpp.

Referenced by createLandPanel().

wxPanel* SettingsFrame::playersPanel_ [protected]

Definition at line 51 of file SettingsDialog.cpp.

Referenced by createPlayersPanel(), TransferDataFromWindow(), and TransferDataToWindow().

wxPanel* SettingsFrame::motdPanel_ [protected]

Definition at line 52 of file SettingsDialog.cpp.

Referenced by createMotdPanel().

std::list<OptionEntrySetter> SettingsFrame::setters_ [protected]

Definition at line 54 of file SettingsDialog.cpp.

Referenced by createEcoPanel(), createEnvPanel(), createMainPanel(), TransferDataFromWindow(), and TransferDataToWindow().

LandscapeDefinitionsBase SettingsFrame::landscapeDefinitions [private]

Definition at line 64 of file SettingsDialog.cpp.

Referenced by createLandPanel(), onDeselectAll(), onSelectAll(), SettingsFrame(), TransferDataFromWindow(), and TransferDataToWindow().

TankAINames SettingsFrame::tankAIStore [private]

Definition at line 65 of file SettingsDialog.cpp.

Referenced by SettingsFrame(), and TransferDataToWindow().

wxTextCtrl* SettingsFrame::IDC_MOTD_CTRL [private]

Definition at line 67 of file SettingsDialog.cpp.

Referenced by createMotdPanel(), TransferDataFromWindow(), and TransferDataToWindow().

wxButton* SettingsFrame::IDC_SELECTALL_CTRL [private]

Definition at line 68 of file SettingsDialog.cpp.

Referenced by createLandPanel().

wxButton* SettingsFrame::IDC_DESELECTALL_CTRL [private]

Definition at line 69 of file SettingsDialog.cpp.

Referenced by createLandPanel().

wxCheckBox* SettingsFrame::IDC_CYCLEMAPS_CTRL [private]

Definition at line 70 of file SettingsDialog.cpp.

Referenced by createLandPanel(), TransferDataFromWindow(), and TransferDataToWindow().

wxCheckBox** SettingsFrame::landscapes [private]

Definition at line 71 of file SettingsDialog.cpp.

Referenced by createLandPanel(), onDeselectAll(), onSelectAll(), TransferDataFromWindow(), and TransferDataToWindow().

wxComboBox* SettingsFrame::IDC_SERVER_MIN_PLAYERS_CTRL [private]

Definition at line 72 of file SettingsDialog.cpp.

Referenced by createPlayersPanel(), TransferDataFromWindow(), and TransferDataToWindow().

wxComboBox* SettingsFrame::IDC_SERVER_MAX_PLAYERS_CTRL [private]

Definition at line 73 of file SettingsDialog.cpp.

Referenced by createPlayersPanel(), setupPlayers(), TransferDataFromWindow(), and TransferDataToWindow().

wxComboBox* SettingsFrame::IDC_SERVER_REMOVEBOT_PLAYERS_CTRL [private]

Definition at line 74 of file SettingsDialog.cpp.

Referenced by createPlayersPanel(), TransferDataFromWindow(), and TransferDataToWindow().

wxComboBox** SettingsFrame::IDC_COMBO_PTYPE_CTRL [private]

Definition at line 75 of file SettingsDialog.cpp.

Referenced by createPlayersPanel(), setupPlayers(), TransferDataFromWindow(), and TransferDataToWindow().

wxTextCtrl* SettingsFrame::IDC_EDIT3_CTRL [private]

Definition at line 76 of file SettingsDialog.cpp.

Referenced by createPlayersPanel(), TransferDataFromWindow(), and TransferDataToWindow().

wxCheckBox* SettingsFrame::IDC_SERVER_RESIDUAL_CTRL [private]

Definition at line 77 of file SettingsDialog.cpp.

Referenced by createPlayersPanel(), TransferDataFromWindow(), and TransferDataToWindow().


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