OpenXcom
1.0
Open-source clone of the original X-Com
|
Basescape screen that shows a base's layout and lets the player manage their bases. More...
#include <BasescapeState.h>
Public Member Functions | |
BasescapeState (Game *game, Base *base, Globe *globe) | |
Creates the Basescape state. More... | |
~BasescapeState () | |
Cleans up the Basescape state. | |
void | init () |
Updates the base stats. More... | |
void | setBase (Base *base) |
Sets a new base to display. More... | |
void | btnNewBaseClick (Action *action) |
Handler for clicking the Build New Base button. More... | |
void | btnBaseInfoClick (Action *action) |
Handler for clicking the Base Information button. More... | |
void | btnSoldiersClick (Action *action) |
Handler for clicking the Soldiers button. More... | |
void | btnCraftsClick (Action *action) |
Handler for clicking the Equip Craft button. More... | |
void | btnFacilitiesClick (Action *action) |
Handler for clicking the Build Facilities button. More... | |
void | btnResearchClick (Action *action) |
Handler for clicking the Research button. More... | |
void | btnManufactureClick (Action *action) |
Handler for clicking the Manufacture button. More... | |
void | btnPurchaseClick (Action *action) |
Handler for clicking the Purchase/Hire button. More... | |
void | btnSellClick (Action *action) |
Handler for clicking the Sell/Sack button. More... | |
void | btnTransferClick (Action *action) |
Handler for clicking the Transfer button. More... | |
void | btnGeoscapeClick (Action *action) |
Handler for clicking the Geoscape button. More... | |
void | viewLeftClick (Action *action) |
Handler for clicking the base view. More... | |
void | viewRightClick (Action *action) |
Handler for right clicking the base view. More... | |
void | viewMouseOver (Action *action) |
Handler for hovering the base view. More... | |
void | viewMouseOut (Action *action) |
Handler for hovering out of the base view. More... | |
void | miniClick (Action *action) |
Handler for clicking the mini base view. More... | |
void | edtBaseChange (Action *action) |
Handler for changing the text on the Name edit. More... | |
void | handleKeyPress (Action *action) |
Handler for pressing a base selection hotkey. More... | |
Public Member Functions inherited from OpenXcom::State | |
State (Game *game) | |
Creates a new state linked to a game. More... | |
virtual | ~State () |
Cleans up the state. More... | |
void | add (Surface *surface) |
Adds a child element to the state. More... | |
bool | isScreen () const |
Gets whether the state is a full-screen. More... | |
void | toggleScreen () |
Toggles whether the state is a full-screen. More... | |
virtual void | handle (Action *action) |
Handles any events. More... | |
virtual void | think () |
Runs state functionality every cycle. More... | |
virtual void | blit () |
Blits the state to the screen. More... | |
void | hideAll () |
Hides all the state surfaces. More... | |
void | showAll () |
Shws all the state surfaces. More... | |
void | resetAll () |
Resets all the state surfaces. More... | |
const LocalizedText & | tr (const std::string &id) const |
Get the localized text. More... | |
LocalizedText | tr (const std::string &id, unsigned n) const |
Get the localized text. More... | |
void | redrawText () |
redraw all the text-type surfaces. | |
void | centerAllSurfaces () |
center all surfaces relative to the screen. More... | |
void | lowerAllSurfaces () |
lower all surfaces by half the screen height. More... | |
void | applyBattlescapeTheme () |
switch the colours to use the battlescape palette. More... | |
void | setModal (InteractiveSurface *surface) |
Sets a modal surface. More... | |
void | setPalette (SDL_Color *colors, int firstcolor=0, int ncolors=256, bool immediately=true) |
Changes a set of colors on the state's 8bpp palette. More... | |
void | setPalette (const std::string &palette, int backpals=-1) |
Changes the state's 8bpp palette with certain resources. More... | |
SDL_Color *const | getPalette () |
Gets the state's 8bpp palette. More... | |
virtual void | resize (int &dX, int &dY) |
Let the state know the window has been resized. More... | |
virtual void | recenter (int dX, int dY) |
Re-orients all the surfaces in the state. More... | |
Basescape screen that shows a base's layout and lets the player manage their bases.
Creates the Basescape state.
Initializes all the elements in the Basescape screen.
game | Pointer to the core game. |
base | Pointer to the base to get info from. |
globe | Pointer to the Geoscape globe. |
void OpenXcom::BasescapeState::btnBaseInfoClick | ( | Action * | action | ) |
void OpenXcom::BasescapeState::btnCraftsClick | ( | Action * | action | ) |
Handler for clicking the Equip Craft button.
Goes to the Crafts screen.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnFacilitiesClick | ( | Action * | action | ) |
Handler for clicking the Build Facilities button.
Opens the Build Facilities window.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnGeoscapeClick | ( | Action * | action | ) |
Handler for clicking the Geoscape button.
Returns to the previous screen.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnManufactureClick | ( | Action * | action | ) |
Handler for clicking the Manufacture button.
Goes to the Manufacture screen.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnNewBaseClick | ( | Action * | action | ) |
void OpenXcom::BasescapeState::btnPurchaseClick | ( | Action * | action | ) |
Handler for clicking the Purchase/Hire button.
Goes to the Purchase screen.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnResearchClick | ( | Action * | action | ) |
Handler for clicking the Research button.
Goes to the Research screen.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnSellClick | ( | Action * | action | ) |
Handler for clicking the Sell/Sack button.
Goes to the Sell screen.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnSoldiersClick | ( | Action * | action | ) |
Handler for clicking the Soldiers button.
Goes to the Soldiers screen.
action | Pointer to an action. |
void OpenXcom::BasescapeState::btnTransferClick | ( | Action * | action | ) |
void OpenXcom::BasescapeState::edtBaseChange | ( | Action * | action | ) |
Handler for changing the text on the Name edit.
Changes the Base name.
action | Pointer to an action. |
void OpenXcom::BasescapeState::handleKeyPress | ( | Action * | action | ) |
Handler for pressing a base selection hotkey.
Selects a new base to display.
action | Pointer to an action. |
|
virtual |
Updates the base stats.
The player can change the selected base or change info on other screens.
Reimplemented from OpenXcom::State.
void OpenXcom::BasescapeState::miniClick | ( | Action * | action | ) |
Handler for clicking the mini base view.
Selects a new base to display.
action | Pointer to an action. |
void OpenXcom::BasescapeState::setBase | ( | Base * | base | ) |
Sets a new base to display.
Changes the base currently displayed on screen.
base | Pointer to new base to display. |
void OpenXcom::BasescapeState::viewLeftClick | ( | Action * | action | ) |
Handler for clicking the base view.
Processes clicking on facilities.
action | Pointer to an action. |
void OpenXcom::BasescapeState::viewMouseOut | ( | Action * | action | ) |
Handler for hovering out of the base view.
Clears the facility name.
action | Pointer to an action. |
void OpenXcom::BasescapeState::viewMouseOver | ( | Action * | action | ) |
Handler for hovering the base view.
Displays the name of the facility the mouse is over.
action | Pointer to an action. |
void OpenXcom::BasescapeState::viewRightClick | ( | Action * | action | ) |
Handler for right clicking the base view.
Processes right clicking on facilities.
action | Pointer to an action. |