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::GraphsState Class Reference

Graphs screen for displaying graphs of various monthly game data like activity and funding. More...

#include <GraphsState.h>

Inheritance diagram for OpenXcom::GraphsState:
OpenXcom::State

Public Member Functions

 GraphsState (Game *game)
 Creates the Graphs state. More...
 
 ~GraphsState ()
 Cleans up the Graphs state.
 
void btnGeoscapeClick (Action *action)
 Handler for clicking the Geoscape icon. More...
 
void btnUfoRegionClick (Action *action)
 Handler for clicking the ufo region icon. More...
 
void btnUfoCountryClick (Action *action)
 Handler for clicking the ufo country icon. More...
 
void btnXcomRegionClick (Action *action)
 Handler for clicking the xcom region icon. More...
 
void btnXcomCountryClick (Action *action)
 Handler for clicking the xcom country icon. More...
 
void btnIncomeClick (Action *action)
 Handler for clicking the income icon. More...
 
void btnFinanceClick (Action *action)
 Handler for clicking the finance icon. More...
 
void btnRegionListClick (Action *action)
 Handler for clicking on a region button. More...
 
void btnCountryListClick (Action *action)
 Handler for clicking on a country button. More...
 
void btnFinanceListClick (Action *action)
 Handler for clicking on a finances button. More...
 
void shiftButtons (Action *action)
 Mouse wheel handler for shifting up/down the buttons. More...
 
void resetScreen ()
 Reset all the elements on screen. More...
 
void updateScale (double lowerLimit, double upperLimit)
 Update the scale. More...
 
void drawLines ()
 Decide which lines to draw. More...
 
void drawRegionLines ()
 Draw Region Lines. More...
 
void drawCountryLines ()
 Draw Country Lines. More...
 
void drawFinanceLines ()
 Draw Finances Lines. 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 init ()
 Initializes the state. 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

Graphs screen for displaying graphs of various monthly game data like activity and funding.

Constructor & Destructor Documentation

OpenXcom::GraphsState::GraphsState ( Game game)

Creates the Graphs state.

Initializes all the elements in the Graphs screen.

Parameters
gamePointer to the core game.

Member Function Documentation

void OpenXcom::GraphsState::btnCountryListClick ( Action action)

Handler for clicking on a country button.

Handles a click on a country button.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnFinanceClick ( Action action)

Handler for clicking the finance icon.

Switches to the Finances screen.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnFinanceListClick ( Action action)

Handler for clicking on a finances button.

handles a click on a finances button.

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

Handler for clicking the Geoscape icon.

Returns to the previous screen.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnIncomeClick ( Action action)

Handler for clicking the income icon.

Switches to the Income screen.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnRegionListClick ( Action action)

Handler for clicking on a region button.

Handles a click on a region button.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnUfoCountryClick ( Action action)

Handler for clicking the ufo country icon.

Switches to the UFO Country activity screen.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnUfoRegionClick ( Action action)

Handler for clicking the ufo region icon.

Switches to the UFO Region Activity screen.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnXcomCountryClick ( Action action)

Handler for clicking the xcom country icon.

Switches to the XCom Country activity screen.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::btnXcomRegionClick ( Action action)

Handler for clicking the xcom region icon.

Switches to the XCom Region activity screen.

Parameters
actionPointer to an action.
void OpenXcom::GraphsState::drawCountryLines ( )

Draw Country Lines.

Sets up the screens and draws the lines for country buttons to toggle on and off.

void OpenXcom::GraphsState::drawFinanceLines ( )

Draw Finances Lines.

Sets up the screens and draws the lines for the finance buttons to toggle on and off.

void OpenXcom::GraphsState::drawLines ( )

Decide which lines to draw.

instead of having all our line drawing in one giant ridiculous routine, just use the one we need.

void OpenXcom::GraphsState::drawRegionLines ( )

Draw Region Lines.

Sets up the screens and draws the lines for region buttons to toggle on and off.

void OpenXcom::GraphsState::resetScreen ( )

Reset all the elements on screen.

remove all elements from view

void OpenXcom::GraphsState::shiftButtons ( Action action)

Mouse wheel handler for shifting up/down the buttons.

'Shift' the buttons to display only GRAPH_MAX_BUTTONS - reset their state from toggles

void OpenXcom::GraphsState::updateScale ( double  lowerLimit,
double  upperLimit 
)

Update the scale.

updates the text on the vertical scale

Parameters
lowerLimitminimum value
upperLimitmaximum value

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