Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <basecomputer.h>
Classes | |
class | BuyUpgradeOperation |
class | LoadSaveQuitConfirm |
class | SellUpgradeOperation |
struct | TransactionList |
class | UpgradeOperation |
Public Types | |
enum | DisplayMode { CARGO =0, UPGRADE, SHIP_DEALER, MISSIONS, NEWS, INFO, LOADSAVE, NETWORK, DISPLAY_MODE_COUNT, NULL_DISPLAY =DISPLAY_MODE_COUNT } |
enum | TransactionType { BUY_CARGO, SELL_CARGO, BUY_UPGRADE, SELL_UPGRADE, BUY_SHIP, ACCEPT_MISSION, NULL_TRANSACTION } |
![]() | |
typedef WindowControllerTableEntry < BaseComputer > | WctlTableEntry |
Public Member Functions | |
virtual void | init (void) |
virtual void | run (void) |
virtual void | draw (void) |
BaseComputer (Unit *player, Unit *base, const vector< DisplayMode > &modes) | |
virtual | ~BaseComputer (void) |
void | updateTransactionControls (const Cargo &item, bool skipFirstCategory=false) |
void | updateTransactionControlsForSelection (TransactionList *list) |
void | loadShipDealerControls (void) |
void | secondStageJoinGame (void) |
void | finalizeJoinGame (int launchShip=0) |
void | finalizeNetSaveGame (void) |
![]() | |
virtual bool | processWindowCommand (const EventCommandId &command, Control *control) |
![]() | |
virtual Window * | window (void) |
virtual void | setWindow (Window *w) |
WindowController () | |
virtual | ~WindowController (void) |
Public Attributes | |
UnitContainer | m_player |
UnitContainer | m_base |
Static Public Attributes | |
static int | dirty = 0 |
Protected Attributes | |
vector< DisplayMode > | m_displayModes |
DisplayMode | m_currentDisplay |
TransactionList | m_transList1 |
TransactionList | m_transList2 |
TransactionList * | m_selectedList |
Control * | m_modeGroups [DISPLAY_MODE_COUNT] |
bool | m_playingMuzak |
Friends | |
class | WctlBase< BaseComputer > |
class | LoadSaveQuitConfirm |
class | UpgradeOperation |
class | BuyUpgradeOperation |
class | SellUpgradeOperation |
Additional Inherited Members | |
![]() | |
static const WctlTableEntry | WctlCommandTable [] |
Definition at line 39 of file basecomputer.h.
Enumerator | |
---|---|
CARGO | |
UPGRADE | |
SHIP_DEALER | |
MISSIONS | |
NEWS | |
INFO | |
LOADSAVE | |
NETWORK | |
DISPLAY_MODE_COUNT | |
NULL_DISPLAY |
Definition at line 47 of file basecomputer.h.
Enumerator | |
---|---|
BUY_CARGO | |
SELL_CARGO | |
BUY_UPGRADE | |
SELL_UPGRADE | |
BUY_SHIP | |
ACCEPT_MISSION | |
NULL_TRANSACTION |
Definition at line 80 of file basecomputer.h.
BaseComputer::BaseComputer | ( | Unit * | player, |
Unit * | base, | ||
const vector< DisplayMode > & | modes | ||
) |
Definition at line 443 of file basecomputer.cpp.
References DISPLAY_MODE_COUNT, i, and m_modeGroups.
|
virtual |
Definition at line 458 of file basecomputer.cpp.
References DISPLAY_MODE_COUNT, i, m_base, m_modeGroups, m_player, m_playingMuzak, muzak, UnitContainer::SetUnit(), and Music::Skip().
|
protected |
Definition at line 3190 of file basecomputer.cpp.
References _Universe, ACCEPT_MISSION, Subcmd::AcceptMission, active_missions, Cargo::category, CATEGORY_SEP, Cargo::content, eraseSaveString(), Cargo::GetCategory(), Cargo::GetContent(), Mission::getPlayerMissionNumber(), getSaveString(), getSaveStringLength(), UnitContainer::GetUnit(), i, UnitUtil::isPlayerStarship(), isTransactionOK(), LoadMission(), loadMissionsControls(), m_base, m_player, mission, MISSION_DESC_LABEL, MISSION_NAMES_LABEL, MISSION_SCRIPTS_LABEL, NetClient::missionRequest(), Network, refresh(), selectedItem(), Subcmd::TerminateMission, Mission::terminateMission(), updateTransactionControlsForSelection(), and Universe::whichPlayerStarship().
|
protected |
Definition at line 6120 of file basecomputer.cpp.
References _Universe, NetClient::CleanUp(), Window::findControlById(), UnitContainer::GetUnit(), globalWindowManager(), Universe::isPlayerStarship(), Unit::Kill(), m_player, RespawnNow(), UniverseUtil::setCurrentSaveGame(), showAlert(), UniverseUtil::showSplashMessage(), UniverseUtil::showSplashScreen(), WindowManager::shutDown(), TerminateCurrentBase(), StaticDisplay::text(), and WindowController::window().
|
protected |
Definition at line 6032 of file basecomputer.cpp.
References CockpitKeys::QuitNow().
|
protected |
Definition at line 6046 of file basecomputer.cpp.
References _Universe, VSFileSystem::VSFile::Close(), Window::findControlById(), UnitContainer::GetUnit(), Universe::isPlayerStarship(), loadLoadSaveControls(), m_player, Unit::name, VSFileSystem::Ok, VSFileSystem::VSFile::OpenCreateWrite(), VSFileSystem::SaveFile, UniverseUtil::setCurrentSaveGame(), showAlert(), StaticDisplay::text(), WindowController::window(), and WriteSaveGame().
Referenced by actionSaveGame().
|
protected |
Definition at line 288 of file basecomputer.cpp.
References AUDStopAllSounds(), Window::close(), and WindowController::window().
|
protected |
Definition at line 6218 of file basecomputer.cpp.
References NetActionConfirm::confirmedJoinGame(), NetActionConfirm::init(), NetActionConfirm::JOINGAME, Network, WindowController::run(), and WindowController::window().
|
protected |
Definition at line 6156 of file basecomputer.cpp.
References _Universe, Window::findControlById(), UnitContainer::GetUnit(), BaseComputer::LoadSaveQuitConfirm::init(), Universe::isPlayerStarship(), LoadSaveQuitConfirm, m_player, WindowController::run(), showAlert(), StaticDisplay::text(), and WindowController::window().
Referenced by actionNewGame().
|
protected |
Definition at line 6198 of file basecomputer.cpp.
References NetActionConfirm::DIE, NetActionConfirm::init(), Network, WindowController::run(), and WindowController::window().
|
protected |
Definition at line 6208 of file basecomputer.cpp.
References NetActionConfirm::init(), Network, WindowController::run(), NetActionConfirm::SAVEACCT, and WindowController::window().
|
protected |
Definition at line 6149 of file basecomputer.cpp.
References actionLoadGame(), Window::findControlById(), UniverseUtil::getNewGameSaveName(), StaticDisplay::setText(), and WindowController::window().
|
protected |
Definition at line 6038 of file basecomputer.cpp.
References BaseComputer::LoadSaveQuitConfirm::init(), LoadSaveQuitConfirm, and WindowController::run().
|
protected |
Definition at line 6083 of file basecomputer.cpp.
References _Universe, actionConfirmedSaveGame(), VSFileSystem::VSFile::Close(), Window::findControlById(), UnitContainer::GetUnit(), BaseComputer::LoadSaveQuitConfirm::init(), Universe::isPlayerStarship(), LoadSaveQuitConfirm, m_player, VSFileSystem::Ok, VSFileSystem::VSFile::OpenReadOnly(), WindowController::run(), VSFileSystem::SaveFile, showAlert(), StaticDisplay::text(), and WindowController::window().
|
protected |
Definition at line 6191 of file basecomputer.cpp.
References Window::findControlById(), Control::setHidden(), and WindowController::window().
|
protected |
Definition at line 6184 of file basecomputer.cpp.
References Window::findControlById(), Control::setHidden(), and WindowController::window().
|
protected |
Definition at line 2863 of file basecomputer.cpp.
References buySelectedCargo().
|
protected |
Definition at line 2869 of file basecomputer.cpp.
References buySelectedCargo().
|
protected |
Definition at line 2857 of file basecomputer.cpp.
References buySelectedCargo().
Definition at line 2836 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), Unit::BuyCargo(), Cargo::content, Cockpit::credits, eliminateZeroCargo(), UnitContainer::GetUnit(), m_base, m_player, maxQuantityForPlayer(), Cargo::quantity, refresh(), and selectedItem().
Referenced by buy10Cargo(), buyAllCargo(), and buyCargo().
|
protected |
Definition at line 4616 of file basecomputer.cpp.
References Cargo::GetCategory(), Cargo::GetContent(), UnitContainer::GetUnit(), m_base, m_player, and selectedItem().
|
protected |
Definition at line 3951 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), BASIC_REPAIR_NAME, BasicRepair(), Unit::BuyCargo(), BuyUpgradeOperation, Cargo::category, Cargo::content, Cockpit::credits, UnitContainer::GetUnit(), isWeapon(), m_base, m_player, m_selectedList, m_transList1, BaseComputer::TransactionList::picker, refresh(), Picker::selectCell(), selectedItem(), BaseComputer::BuyUpgradeOperation::start(), and Unit::Upgrade().
|
protected |
Definition at line 1688 of file basecomputer.cpp.
References CARGO, loadCargoControls(), m_currentDisplay, switchToControls(), and updateTransactionControlsForSelection().
|
protected |
Definition at line 4628 of file basecomputer.cpp.
References INFO, m_currentDisplay, recalcTitle(), EventResponder::sendCommand(), switchToControls(), and WindowController::window().
|
protected |
Definition at line 1697 of file basecomputer.cpp.
References loadLoadSaveControls(), LOADSAVE, m_currentDisplay, and switchToControls().
|
protected |
Definition at line 3082 of file basecomputer.cpp.
References loadMissionsControls(), m_currentDisplay, MISSIONS, switchToControls(), and updateTransactionControlsForSelection().
|
protected |
Definition at line 1719 of file basecomputer.cpp.
References loadNetworkControls(), m_currentDisplay, Network, NETWORK, showNetworkStatus(), and switchToControls().
|
protected |
Definition at line 2922 of file basecomputer.cpp.
References loadNewsControls(), m_currentDisplay, NEWS, and switchToControls().
|
protected |
Definition at line 4032 of file basecomputer.cpp.
References loadShipDealerControls(), m_currentDisplay, SHIP_DEALER, switchToControls(), and updateTransactionControlsForSelection().
|
protected |
Definition at line 3363 of file basecomputer.cpp.
References UnitContainer::GetUnit(), loadUpgradeControls(), m_base, m_currentDisplay, m_player, switchToControls(), updateTransactionControlsForSelection(), and UPGRADE.
|
protected |
Definition at line 1943 of file basecomputer.cpp.
References BUY_CARGO, Window::findControlById(), maxQuantityForPlayer(), Cargo::mission, Cargo::price, Cargo::quantity, SELL_CARGO, NewButton::setCommand(), Control::setHidden(), NewButton::setLabel(), StaticDisplay::setText(), and WindowController::window().
Referenced by updateTransactionControlsForSelection().
|
protected |
Definition at line 2028 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), BUY_UPGRADE, c, Cargo::category, Cargo::content, Cockpit::credits, emergency_downgrade_mode, Window::findControlById(), Unit::GetCargo(), Cargo::GetCategory(), UnitContainer::GetUnit(), VegaConfig::getVariable(), i, isWeapon(), m_base, m_player, Unit::numCargo(), XMLSupport::parse_bool(), UnitUtil::PercentOperational(), Unit::PriceCargo(), RepairPrice(), NewButton::setCommand(), Control::setHidden(), NewButton::setLabel(), vs_config, and WindowController::window().
Referenced by updateTransactionControlsForSelection().
|
protected |
Definition at line 507 of file basecomputer.cpp.
References GroupControl::addChild(), Window::addControl(), GFXColor::b, base_keyboard_queue, BOLD_STROKE, CENTER_JUSTIFY, GameMenu::createNetworkControls(), done, Unit::faction, GFXColor::g, NetClient::getCallsign(), getColorForGroup(), getConfigColor(), NetClient::GetCurrentServerAddress(), FactionUtil::GetFaction(), Unit::getFullname(), FactionUtil::GetSparkColor(), NetClient::getUnit(), VegaConfig::getVariable(), GUI_CLEAR(), GUI_OPAQUE_BLACK(), GUI_OPAQUE_MEDIUM_GRAY(), GUI_OPAQUE_WHITE(), m_displayModes, Network, NETWORK, XMLSupport::parse_bool(), q, quit, GFXColor::r, NetClient::serial, NewButton::setBorderColor(), Scroller::setButtonColor(), Scroller::setColor(), Control::setColor(), NewButton::setCommand(), NewButton::setDownColor(), NewButton::setDownTextColor(), NewButton::setEndBorderColor(), StaticDisplay::setFont(), Control::setFont(), Control::setHidden(), NewButton::setHighlightColor(), Picker::setHighlightColor(), Picker::setHighlightTextColor(), Control::setId(), StaticDisplay::setJustification(), NewButton::setLabel(), StaticDisplay::setMultiLine(), Control::setOutlineColor(), Control::setRect(), Scroller::setRect(), StaticDisplay::setRect(), StaticDisplay::setScroller(), Picker::setScroller(), Picker::setSelectionColor(), NewButton::setShadowWidth(), StaticDisplay::setText(), Scroller::setTextColor(), StaticDisplay::setTextColor(), Control::setTextColor(), StaticDisplay::setTextMargins(), Picker::setTextMargins(), StaticImageDisplay::setTexture(), Scroller::setThumbColor(), NewButton::setVariableBorderCycleTime(), UnsaturatedColor(), vs_config, and WindowController::window().
Referenced by createControls().
|
protected |
Definition at line 2520 of file basecomputer.cpp.
References SimplePickerCells::addCell(), beautify(), CATEGORY_SEP, CATEGORY_TAG, CATEGORY_TEXT_COLOR(), SimplePickerCells::cellAt(), SimplePickerCell::children(), SimplePickerCells::count(), SimplePickerCell::createEmptyChildList(), VegaConfig::getVariable(), XMLSupport::parse_bool(), PickerCell::setHideChildren(), and vs_config.
Referenced by loadListPicker().
|
protected |
Definition at line 1596 of file basecomputer.cpp.
References constructControls(), createModeButtons(), DISPLAY_MODE_COUNT, Window::findControlById(), GUI_CLEAR(), i, m_modeGroups, Window::removeControlFromWindow(), Window::setColor(), Window::setFullScreen(), Window::setTexture(), and WindowController::window().
Referenced by init().
|
protected |
Definition at line 1617 of file basecomputer.cpp.
References Window::addControl(), Window::findControlById(), i, m_displayModes, MODE_BUTTON_SPACE, Rect::origin, Control::rect(), NewButton::setCommand(), Control::setHidden(), NewButton::setLabel(), Control::setRect(), Rect::size, Size::width, WindowController::window(), and Point::x.
Referenced by createControls().
|
virtual |
Reimplemented from WindowController.
Definition at line 2823 of file basecomputer.cpp.
References dirty, eliminateZeroCargo(), UnitContainer::GetUnit(), globalWindowManager(), Unit::hull, m_player, refresh(), WindowManager::shutDown(), and TerminateCurrentBase().
void BaseComputer::finalizeJoinGame | ( | int | launchShip = 0 ) |
void BaseComputer::finalizeNetSaveGame | ( | void | ) |
|
protected |
Definition at line 4013 of file basecomputer.cpp.
References _Universe, Cargo::content, Cockpit::credits, emergency_downgrade_mode, UnitContainer::GetUnit(), Universe::isPlayerStarship(), m_base, m_player, UnitUtil::PercentOperational(), refresh(), Unit::RepairUpgradeCargo(), and selectedItem().
|
protected |
Definition at line 471 of file basecomputer.cpp.
References _Universe, Unit::faction, FactionUtil::GetFactionIndex(), FactionUtil::GetFactionName(), Universe::getGalaxyProperty(), FactionUtil::GetSparkColor(), UniverseUtil::getSystemFile(), UnitContainer::GetUnit(), VegaConfig::getVariable(), m_base, XMLSupport::parse_bool(), XMLSupport::parse_float(), and vs_config.
Referenced by constructControls().
|
protected |
Definition at line 1924 of file basecomputer.cpp.
References Window::findControlById(), Control::setHidden(), StaticDisplay::setText(), and WindowController::window().
Referenced by updateTransactionControlsForSelection().
|
protected |
Definition at line 1713 of file basecomputer.cpp.
References showNetworkStatus().
|
virtual |
Implements WindowController.
Definition at line 1732 of file basecomputer.cpp.
References createControls(), and WindowController::setWindow().
Referenced by BaseInterface::Room::Comp::Click().
|
protected |
Definition at line 2429 of file basecomputer.cpp.
References _Universe, ACCEPT_MISSION, active_missions, BUY_CARGO, BUY_SHIP, BUY_UPGRADE, Unit::CanAddCargo(), Cargo::category, color_downgrade_or_noncompatible_flag, color_insufficient_money_flag, color_insufficient_space_flag, Cockpit::credits, Cargo::GetCategory(), UnitContainer::GetUnit(), Universe::isPlayerStarship(), m_base, m_player, UniverseUtil::maxMissions(), Cargo::mission, Cargo::price, Cargo::quantity, SELL_CARGO, SELL_UPGRADE, UpgradeAllowed(), and upgradeNotAddedToCargo().
Referenced by acceptMission(), loadListPicker(), and updateTransactionControlsForSelection().
|
protected |
Definition at line 3276 of file basecomputer.cpp.
References BASIC_REPAIR_DESC, BASIC_REPAIR_NAME, BASIC_REPAIR_TEXT_COLOR(), basicRepairPrice(), BUY_UPGRADE, CargoColor::cargo, SimplePickerCells::cellAt(), Picker::cells(), Cargo::content, SimplePickerCells::count(), DEFAULT_UPGRADE_COLOR(), Cargo::description, equalColors(), Unit::FilterUpgradeList(), Window::findControlById(), UnitContainer::GetUnit(), isClear(), loadListPicker(), loadMasterList(), m_base, m_player, m_transList1, BaseComputer::TransactionList::masterList, Cargo::price, UnitUtil::repair(), Unit::RepairCost(), SimplePickerCell::setTextColor(), SimplePickerCell::text(), SimplePickerCell::textColor(), and WindowController::window().
Referenced by loadUpgradeControls().
|
protected |
Definition at line 2654 of file basecomputer.cpp.
References BUY_CARGO, Window::findControlById(), UnitContainer::GetUnit(), VegaConfig::getVariable(), loadListPicker(), loadMasterList(), m_base, m_player, m_transList1, m_transList2, XMLSupport::parse_bool(), recalcTitle(), resetTransactionLists(), Orders::SelectDockPort(), SELL_CARGO, vs_config, and WindowController::window().
Referenced by changeToCargoMode().
|
protected |
Definition at line 2569 of file basecomputer.cpp.
References SimplePicker::addCell(), SimplePickerCell::addChild(), beautify(), Cargo::category, Picker::cells(), SimplePicker::clear(), color_downgrade_or_noncompatible_flag, color_insufficient_money_flag, color_insufficient_space_flag, color_prohibited_upgrade_flag, Cargo::content, createCategoryCell(), DOWNGRADE_OR_NONCOMPAT_COLOR(), getDisplayCategory(), UnitContainer::GetUnit(), GUI_CLEAR(), i, isTransactionOK(), ITEM_DESTROYED_COLOR(), UniverseUtil::LookupUnitStat(), m_player, BaseComputer::TransactionList::masterList, Cargo::mission, MISSION_COLOR(), NO_MONEY_COLOR(), NO_ROOM_COLOR(), UnitUtil::PercentOperational(), BaseComputer::TransactionList::picker, PROHIBITED_COLOR(), Cargo::quantity, SELL_UPGRADE, tostring(), and BaseComputer::TransactionList::transaction.
Referenced by loadBuyUpgradeControls(), loadCargoControls(), loadMissionsControls(), loadSellUpgradeControls(), and loadShipDealerControls().
|
protected |
Definition at line 3057 of file basecomputer.cpp.
References SimplePicker::addCell(), SimplePicker::clear(), datesort(), Window::findControlById(), UnitContainer::GetUnit(), VSFileSystem::homedir, m_player, nodirs(), recalcTitle(), StaticDisplay::setText(), and WindowController::window().
Referenced by actionConfirmedSaveGame(), and changeToLoadSaveMode().
|
protected |
Definition at line 2714 of file basecomputer.cpp.
References CargoColor::cargo, Cargo::category, Unit::GetCargo(), Cargo::GetCategory(), i, BaseComputer::TransactionList::masterList, Unit::numCargo(), and Cargo::quantity.
Referenced by loadBuyUpgradeControls(), loadCargoControls(), loadSellUpgradeControls(), and loadShipDealerControls().
|
protected |
Definition at line 3174 of file basecomputer.cpp.
References ACCEPT_MISSION, Window::findControlById(), loadListPicker(), loadMissionsMasterList(), m_transList1, recalcTitle(), resetTransactionLists(), and WindowController::window().
Referenced by acceptMission(), and changeToMissionsMode().
|
protected |
Definition at line 3092 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), active_missions, beautify(), c, CargoColor::cargo, Cargo::category, CATEGORY_SEP, CargoColor::color, Cargo::content, DEFAULT_UPGRADE_COLOR(), Cargo::description, Cargo::GetDescription(), Cockpit::GetParent(), getSaveString(), getSaveStringLength(), i, UnitUtil::isPlayerStarship(), j, BaseComputer::TransactionList::masterList, MISSION_DESC_LABEL, MISSION_NAMES_LABEL, MISSION_SCRIPTS_LABEL, Network, Cargo::price, putSaveString(), Cargo::quantity, tostring(), XMLSupport::tostring(), and VSFileSystem::vs_fprintf().
Referenced by loadMissionsControls().
|
protected |
Definition at line 6180 of file basecomputer.cpp.
Referenced by changeToNetworkMode().
|
protected |
Definition at line 2978 of file basecomputer.cpp.
References SimplePicker::addCell(), SimplePicker::clear(), Window::findControlById(), getSaveString(), getSaveStringLength(), UnitContainer::GetUnit(), VegaConfig::getVariable(), i, UnitUtil::isPlayerStarship(), MessageCenter::last(), m_player, gameMessage::message, mission, Mission::msgcenter, Network, NEWS_NAME_LABEL, XMLSupport::parse_bool(), recalcTitle(), StaticDisplay::setText(), vs_config, and WindowController::window().
Referenced by changeToNewsMode().
|
protected |
Definition at line 2957 of file basecomputer.cpp.
References Window::findControlById(), GarnerInfoFromSaveGame(), Picker::selectedCell(), StaticDisplay::setText(), PickerCell::text(), and WindowController::window().
|
protected |
Definition at line 3318 of file basecomputer.cpp.
References ClearDowngradeMap(), DEFAULT_UPGRADE_COLOR(), equalColors(), Unit::FilterDowngradeList(), Window::findControlById(), GetListOfDowngrades(), UnitContainer::GetUnit(), GetUnitMasterPartList(), VegaConfig::getVariable(), i, loadListPicker(), loadMasterList(), m_base, m_player, m_transList2, BaseComputer::TransactionList::masterList, XMLSupport::parse_bool(), SELL_UPGRADE, vs_config, weapfiltervec, and WindowController::window().
Referenced by loadUpgradeControls().
void BaseComputer::loadShipDealerControls | ( | void | ) |
Definition at line 4413 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), BUY_SHIP, CargoColor::cargo, CreateCargoForOwnerStarship(), Window::findControlById(), Cockpit::GetNumUnits(), UnitContainer::GetUnit(), i, loadListPicker(), loadMasterList(), m_base, m_transList1, BaseComputer::TransactionList::masterList, recalcTitle(), resetTransactionLists(), and WindowController::window().
Referenced by changeToShipDealerMode(), and sellShip().
|
protected |
Definition at line 3262 of file basecomputer.cpp.
References loadBuyUpgradeControls(), loadSellUpgradeControls(), recalcTitle(), and resetTransactionLists().
Referenced by changeToUpgradeMode().
Definition at line 2778 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), Cockpit::credits, Unit::getCargoVolume(), Unit::getEmptyCargoVolume(), UnitContainer::GetUnit(), guiMin, int, m_player, Cargo::price, and Cargo::volume.
Referenced by buySelectedCargo(), and configureCargoCommitControls().
|
protected |
Definition at line 2931 of file basecomputer.cpp.
References Window::findControlById(), VegaConfig::getVariable(), Music::GotoSong(), m_playingMuzak, muzak, Picker::selectedCell(), StaticDisplay::setText(), PickerCell::text(), vs_config, and WindowController::window().
|
protected |
Definition at line 2350 of file basecomputer.cpp.
References CATEGORY_TAG, UnitContainer::GetUnit(), m_base, m_transList1, m_transList2, BaseComputer::TransactionList::picker, Picker::selectedCell(), PickerCell::tag(), and updateTransactionControlsForSelection().
|
protected |
Definition at line 1753 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), active_missions, CARGO, Cockpit::credits, Universe::current_stardate, emergency_downgrade_mode, Unit::faction, Window::findControlById(), Unit::getCargoVolume(), Unit::getEmptyCargoVolume(), Unit::getEmptyUpgradeVolume(), FactionUtil::GetFactionName(), StarDate::GetFullTrekDate(), UnitContainer::GetUnit(), Unit::getUpgradeVolume(), VegaConfig::getVariable(), guiMax, Unit::isUnit(), m_base, m_currentDisplay, m_player, MISSIONS, Unit::name, XMLSupport::parse_bool(), PLANETPTR, StaticDisplay::setText(), ModeInfo::title, UPGRADE, vs_config, and WindowController::window().
Referenced by changeToInfoMode(), loadCargoControls(), loadLoadSaveControls(), loadMissionsControls(), loadNewsControls(), loadShipDealerControls(), loadUpgradeControls(), and refresh().
|
protected |
Definition at line 2802 of file basecomputer.cpp.
References eliminateZeroCargo(), UnitContainer::GetUnit(), m_currentDisplay, m_player, m_transList1, m_transList2, BaseComputer::TransactionList::picker, WctlBase< BaseComputer >::processWindowCommand(), recalcTitle(), Picker::restoreOpenCategories(), and Picker::saveOpenCategories().
Referenced by acceptMission(), buySelectedCargo(), buyUpgrade(), draw(), fixUpgrade(), sellSelectedCargo(), and sellUpgrade().
|
protected |
Definition at line 1639 of file basecomputer.cpp.
References m_transList1, and m_transList2.
Referenced by loadCargoControls(), loadMissionsControls(), loadShipDealerControls(), and loadUpgradeControls().
|
virtual |
Reimplemented from WindowController.
Definition at line 1743 of file basecomputer.cpp.
References m_displayModes, WctlBase< BaseComputer >::processWindowCommand(), and WindowController::run().
Referenced by BaseInterface::Room::Comp::Click().
|
protected |
Definition at line 1842 of file basecomputer.cpp.
References CATEGORY_SEP, PickerCells::cellAt(), Picker::cells(), PickerCells::cellWithId(), PickerCell::children(), Cargo::content, PickerCells::count(), getDisplayCategory(), i, PickerCell::id(), Picker::scrollToCell(), Picker::selectCell(), Picker::selectedCell(), PickerCell::setHideChildren(), and Picker::setMustRecalc().
Referenced by updateTransactionControls().
void BaseComputer::secondStageJoinGame | ( | void | ) |
|
protected |
Definition at line 2745 of file basecomputer.cpp.
References m_selectedList, BaseComputer::TransactionList::masterList, BaseComputer::TransactionList::picker, Picker::selectedCell(), and PickerCell::tag().
Referenced by acceptMission(), buySelectedCargo(), buyShip(), buyUpgrade(), BaseComputer::UpgradeOperation::commonInit(), fixUpgrade(), sellSelectedCargo(), sellShip(), and sellUpgrade().
|
protected |
Definition at line 2910 of file basecomputer.cpp.
References sellSelectedCargo().
|
protected |
Definition at line 2916 of file basecomputer.cpp.
References sellSelectedCargo().
|
protected |
Definition at line 2904 of file basecomputer.cpp.
References sellSelectedCargo().
Definition at line 2875 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), UnitImages< BOGUS >::cargo, Cargo::content, Cockpit::credits, eliminateZeroCargo(), UnitContainer::GetUnit(), m_base, m_player, Cargo::mission, Unit::pImage, Cargo::quantity, refresh(), Unit::RemoveCargo(), selectedItem(), and Unit::SellCargo().
Referenced by sell10Cargo(), sellAllCargo(), and sellCargo().
|
protected |
Definition at line 4480 of file basecomputer.cpp.
References _Universe, Cargo::content, UnitContainer::GetUnit(), Universe::isPlayerStarship(), m_base, m_player, selectedItem(), and sellShip().
|
protected |
Definition at line 3988 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), Cargo::category, Cargo::content, Cockpit::credits, UnitContainer::GetUnit(), isWeapon(), m_base, m_player, UnitUtil::RecomputeUnitUpgrades(), refresh(), selectedItem(), Unit::SellCargo(), SellUpgradeOperation, and BaseComputer::SellUpgradeOperation::start().
|
protected |
Definition at line 1705 of file basecomputer.cpp.
References Window::findControlById(), Control::setHidden(), and WindowController::window().
Referenced by changeToNetworkMode(), and hideNetworkStatus().
|
protected |
Definition at line 4676 of file basecomputer.cpp.
References _Universe, Universe::AccessCockpit(), colorsToCommandString(), factionColorTextString(), Window::findControlById(), UniverseUtil::getCurrentPlayer(), FactionUtil::GetFactionIndex(), FactionUtil::GetFactionName(), SaveGame::getMissionData(), FactionUtil::GetNeutralFaction(), FactionUtil::GetNumFactions(), FactionUtil::GetPlanetFaction(), UniverseUtil::getPlayerX(), UnitUtil::getRelationFromFaction(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), guiMax, guiMin, i, int, Cockpit::savegame, StaticDisplay::setText(), size, XMLSupport::tostring(), vs_config, and WindowController::window().
|
protected |
Definition at line 5883 of file basecomputer.cpp.
References current_unit_load_mode, DEFAULT, Window::findControlById(), UnitContainer::GetUnit(), VegaConfig::getVariable(), i, m_player, MakeUnitXMLPretty(), NO_MESH, XMLSupport::parse_bool(), StaticDisplay::setText(), showUnitStats(), vs_config, WindowController::window(), and Unit::WriteUnitString().
|
protected |
Definition at line 1646 of file basecomputer.cpp.
References Window::addControl(), CARGO, Window::findControlById(), INFO, LOADSAVE, m_currentDisplay, m_modeGroups, m_playingMuzak, MISSIONS, muzak, NETWORK, NEWS, NULL_DISPLAY, Window::removeControlFromWindow(), Window::setTexture(), SHIP_DEALER, Music::Skip(), UPGRADE, and WindowController::window().
Referenced by changeToCargoMode(), changeToInfoMode(), changeToLoadSaveMode(), changeToMissionsMode(), changeToNetworkMode(), changeToNewsMode(), changeToShipDealerMode(), and changeToUpgradeMode().
Definition at line 2758 of file basecomputer.cpp.
References m_selectedList, m_transList1, m_transList2, BaseComputer::TransactionList::picker, scrollToItem(), and updateTransactionControlsForSelection().
void BaseComputer::updateTransactionControlsForSelection | ( | TransactionList * | list) |
Definition at line 2105 of file basecomputer.cpp.
References _Universe, ACCEPT_MISSION, Universe::AccessCockpit(), BASIC_REPAIR_NAME, basicRepairPrice(), buildCargoDescription(), buildShipDescription(), buildUpgradeDescription(), BUY_CARGO, BUY_SHIP, BUY_UPGRADE, Cargo::category, configureCargoCommitControls(), configureUpgradeCommitControls(), Cargo::content, Cockpit::credits, Cargo::description, Window::findControlById(), Cargo::GetCategory(), Cargo::GetContent(), Cargo::GetDescription(), UnitContainer::GetUnit(), VegaConfig::getVariable(), hideCommitControls(), isTransactionOK(), m_base, m_player, m_selectedList, m_transList1, m_transList2, Cargo::mass, BaseComputer::TransactionList::masterList, Cargo::mission, XMLSupport::parse_bool(), UnitUtil::PercentOperational(), BaseComputer::TransactionList::picker, UniverseUtil::playSound(), PRETTY_ADDN, Cargo::price, Unit::PriceCargo(), QVector, Unit::RepairCost(), RepairPrice(), Picker::selectCell(), Picker::selectedCell(), SELL_CARGO, SELL_UPGRADE, SellPrice(), NewButton::setCommand(), Control::setHidden(), NewButton::setLabel(), StaticDisplay::setText(), StaticImageDisplay::setTexture(), UniverseUtil::StopAllSounds(), PickerCell::tag(), BaseComputer::TransactionList::transaction, usedValue(), Vector, Cargo::volume, vs_config, and WindowController::window().
Referenced by acceptMission(), changeToCargoMode(), changeToMissionsMode(), changeToShipDealerMode(), changeToUpgradeMode(), pickerChangedSelection(), sellShip(), and updateTransactionControls().
|
friend |
Definition at line 316 of file basecomputer.h.
Referenced by buyUpgrade().
|
friend |
Definition at line 122 of file basecomputer.h.
Referenced by actionLoadGame(), actionQuitGame(), and actionSaveGame().
|
friend |
Definition at line 317 of file basecomputer.h.
Referenced by sellUpgrade().
|
friend |
Definition at line 313 of file basecomputer.h.
|
friend |
Definition at line 41 of file basecomputer.h.
|
static |
Definition at line 44 of file basecomputer.h.
Referenced by base_main_loop(), draw(), and BaseUtil::refreshBaseComputerUI().
UnitContainer BaseComputer::m_base |
Definition at line 301 of file basecomputer.h.
Referenced by acceptMission(), buildCargoDescription(), buySelectedCargo(), buyShip(), buyUpgrade(), changeToUpgradeMode(), configureUpgradeCommitControls(), fixUpgrade(), getColorForGroup(), isTransactionOK(), loadBuyUpgradeControls(), loadCargoControls(), loadSellUpgradeControls(), loadShipDealerControls(), pickerChangedSelection(), recalcTitle(), sellSelectedCargo(), sellShip(), sellUpgrade(), updateTransactionControlsForSelection(), and ~BaseComputer().
|
protected |
Definition at line 303 of file basecomputer.h.
Referenced by changeToCargoMode(), changeToInfoMode(), changeToLoadSaveMode(), changeToMissionsMode(), changeToNetworkMode(), changeToNewsMode(), changeToShipDealerMode(), changeToUpgradeMode(), recalcTitle(), refresh(), and switchToControls().
|
protected |
Definition at line 297 of file basecomputer.h.
Referenced by constructControls(), createModeButtons(), and run().
|
protected |
Definition at line 307 of file basecomputer.h.
Referenced by BaseComputer(), createControls(), switchToControls(), and ~BaseComputer().
UnitContainer BaseComputer::m_player |
Definition at line 300 of file basecomputer.h.
Referenced by acceptMission(), actionConfirmedLoadGame(), actionConfirmedSaveGame(), actionLoadGame(), actionSaveGame(), buildCargoDescription(), buySelectedCargo(), buyShip(), buyShip(), buyUpgrade(), changeToUpgradeMode(), configureUpgradeCommitControls(), draw(), fixUpgrade(), isTransactionOK(), loadBuyUpgradeControls(), loadCargoControls(), loadListPicker(), loadLoadSaveControls(), loadNewsControls(), loadSellUpgradeControls(), maxQuantityForPlayer(), recalcTitle(), refresh(), sellSelectedCargo(), sellShip(), sellUpgrade(), showShipStats(), updateTransactionControlsForSelection(), and ~BaseComputer().
|
protected |
Definition at line 308 of file basecomputer.h.
Referenced by newsPickerChangedSelection(), switchToControls(), and ~BaseComputer().
|
protected |
Definition at line 306 of file basecomputer.h.
Referenced by buyUpgrade(), selectedItem(), updateTransactionControls(), and updateTransactionControlsForSelection().
|
protected |
Definition at line 304 of file basecomputer.h.
Referenced by buyUpgrade(), loadBuyUpgradeControls(), loadCargoControls(), loadMissionsControls(), loadShipDealerControls(), pickerChangedSelection(), refresh(), resetTransactionLists(), updateTransactionControls(), and updateTransactionControlsForSelection().
|
protected |
Definition at line 305 of file basecomputer.h.
Referenced by loadCargoControls(), loadSellUpgradeControls(), pickerChangedSelection(), refresh(), resetTransactionLists(), updateTransactionControls(), and updateTransactionControlsForSelection().