OpenXcom  1.0
Open-source clone of the original X-Com
PrimeGrenadeState.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 Game;
26 class Text;
27 class InteractiveSurface;
28 class Frame;
29 class Surface;
30 class BattleItem;
31 struct BattleAction;
32 
37 class PrimeGrenadeState : public State
38 {
39 private:
40  BattleAction *_action;
41  bool _inInventoryView;
42  BattleItem *_grenadeInInventory;
43  Text *_number[24];
44  Text *_title;
45  Frame *_frame;
46  InteractiveSurface *_button[24];
47  Surface *_bg;
48 public:
50  PrimeGrenadeState(BattleAction *action, bool inInventoryView, BattleItem *grenadeInInventory);
54  void handle(Action *action);
56  void btnClick(Action *action);
57 };
58 
59 }
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
Window that allows the player to set the timer of an explosive.
Definition: PrimeGrenadeState.h:37
Definition: BattlescapeGame.h:43
A game state that receives user input and reacts accordingly.
Definition: State.h:44
Surface that the user can interact with.
Definition: InteractiveSurface.h:37
PrimeGrenadeState(BattleAction *action, bool inInventoryView, BattleItem *grenadeInInventory)
Creates the Prime Grenade state.
Definition: PrimeGrenadeState.cpp:43
Text string displayed on screen.
Definition: Text.h:40
Represents a single item in the battlescape.
Definition: BattleItem.h:37
~PrimeGrenadeState()
Cleans up the Prime Grenade state.
Definition: PrimeGrenadeState.cpp:119
void btnClick(Action *action)
Handler for clicking a button.
Definition: PrimeGrenadeState.cpp:143
Element that is blit (rendered) onto the screen.
Definition: Surface.h:38
void handle(Action *action)
Handler for right-clicking anything.
Definition: PrimeGrenadeState.cpp:128
Fancy frame border thing used for windows and other elements.
Definition: Frame.h:28
Definition: BaseInfoState.cpp:40