OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::BasescapeState Class Reference

Basescape screen that shows a base's layout and lets the player manage their bases. More...

#include <BasescapeState.h>

Inheritance diagram for OpenXcom::BasescapeState:
OpenXcom::State

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 LocalizedTexttr (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...
 

Detailed Description

Basescape screen that shows a base's layout and lets the player manage their bases.

Constructor & Destructor Documentation

OpenXcom::BasescapeState::BasescapeState ( Game game,
Base base,
Globe globe 
)

Creates the Basescape state.

Initializes all the elements in the Basescape screen.

Parameters
gamePointer to the core game.
basePointer to the base to get info from.
globePointer to the Geoscape globe.

Member Function Documentation

void OpenXcom::BasescapeState::btnBaseInfoClick ( Action action)

Handler for clicking the Base Information button.

Goes to the Base Info screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnCraftsClick ( Action action)

Handler for clicking the Equip Craft button.

Goes to the Crafts screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnFacilitiesClick ( Action action)

Handler for clicking the Build Facilities button.

Opens the Build Facilities window.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnGeoscapeClick ( Action action)

Handler for clicking the Geoscape button.

Returns to the previous screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnManufactureClick ( Action action)

Handler for clicking the Manufacture button.

Goes to the Manufacture screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnNewBaseClick ( Action action)

Handler for clicking the Build New Base button.

Goes to the Build New Base screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnPurchaseClick ( Action action)

Handler for clicking the Purchase/Hire button.

Goes to the Purchase screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnResearchClick ( Action action)

Handler for clicking the Research button.

Goes to the Research screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnSellClick ( Action action)

Handler for clicking the Sell/Sack button.

Goes to the Sell screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnSoldiersClick ( Action action)

Handler for clicking the Soldiers button.

Goes to the Soldiers screen.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::btnTransferClick ( Action action)

Handler for clicking the Transfer button.

Goes to the Select Destination Base window.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::edtBaseChange ( Action action)

Handler for changing the text on the Name edit.

Changes the Base name.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::handleKeyPress ( Action action)

Handler for pressing a base selection hotkey.

Selects a new base to display.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::init ( )
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.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::setBase ( Base base)

Sets a new base to display.

Changes the base currently displayed on screen.

Parameters
basePointer to new base to display.
void OpenXcom::BasescapeState::viewLeftClick ( Action action)

Handler for clicking the base view.

Processes clicking on facilities.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::viewMouseOut ( Action action)

Handler for hovering out of the base view.

Clears the facility name.

Parameters
actionPointer 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.

Parameters
actionPointer to an action.
void OpenXcom::BasescapeState::viewRightClick ( Action action)

Handler for right clicking the base view.

Processes right clicking on facilities.

Parameters
actionPointer to an action.

The documentation for this class was generated from the following files: