OpenXcom  1.0
Open-source clone of the original X-Com
MiniMapState.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include "../Engine/State.h"
21 
22 namespace OpenXcom
23 {
24 
25 class Camera;
26 class BattlescapeButton;
27 class Text;
28 class MiniMapView;
29 class Timer;
30 class SavedBattleGame;
31 
35 class MiniMapState : public State
36 {
37  Surface * _bg;
38  MiniMapView *_miniMapView;
39  BattlescapeButton *_btnLvlUp, *_btnLvlDwn, *_btnOk;
40  Text *_txtLevel;
41  Timer *_timerAnimate;
43  void animate();
44 public:
46  MiniMapState (Camera * camera, SavedBattleGame * battleGame);
48  ~MiniMapState();
50  void btnOkClick (Action * action);
52  void btnLevelUpClick (Action * action);
54  void btnLevelDownClick (Action * action);
56  void handle(Action *action);
58  void think();
59 };
60 }
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
void btnLevelDownClick(Action *action)
Handler for the one level down button.
Definition: MiniMapState.cpp:146
A game state that receives user input and reacts accordingly.
Definition: State.h:44
Timer used to run code in fixed intervals.
Definition: Timer.h:35
Text string displayed on screen.
Definition: Text.h:40
Class handling camera movement, either by mouse or by events on the battlescape.
Definition: Camera.h:33
void handle(Action *action)
Handler for right-clicking anything.
Definition: MiniMapState.cpp:103
The MiniMap is a representation of a Battlescape map that allows you to see more of the map...
Definition: MiniMapState.h:35
void btnOkClick(Action *action)
Handler for the OK button.
Definition: MiniMapState.cpp:123
MiniMapState(Camera *camera, SavedBattleGame *battleGame)
Creates the MiniMapState.
Definition: MiniMapState.cpp:42
void think()
Handles timers.
Definition: MiniMapState.cpp:162
MiniMapView is the class used to display the map in the MiniMapState.
Definition: MiniMapView.h:34
~MiniMapState()
Cleans up the MiniMapState.
Definition: MiniMapState.cpp:94
Element that is blit (rendered) onto the screen.
Definition: Surface.h:38
void btnLevelUpClick(Action *action)
Handler for the one level up button.
Definition: MiniMapState.cpp:137
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:47
Regular image that works like a button.
Definition: BattlescapeButton.h:34
Definition: BaseInfoState.cpp:40