OpenXcom  1.0
Open-source clone of the original X-Com
ActionMenuState.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 #include "BattlescapeGame.h"
22 
23 namespace OpenXcom
24 {
25 
26 class ActionMenuItem;
27 
32 class ActionMenuState : public State
33 {
34 private:
35  BattleAction *_action;
36  ActionMenuItem *_actionMenu[6];
38  void addItem(BattleActionType ba, const std::string &name, int *id);
39 public:
41  ActionMenuState(BattleAction *action, int x, int y);
45  void handle(Action *action);
47  void btnActionMenuItemClick(Action *action);
49  void resize(int &dX, int &dY);
50 };
51 
52 }
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
Definition: BattlescapeGame.h:43
A game state that receives user input and reacts accordingly.
Definition: State.h:44
void handle(Action *action)
Handler for right-clicking anything.
Definition: ActionMenuState.cpp:172
A class that represents a single box in the action popup menu on the battlescape. ...
Definition: ActionMenuItem.h:37
Window that allows the player to select a battlescape action.
Definition: ActionMenuState.h:32
ActionMenuState(BattleAction *action, int x, int y)
Creates the Action Menu state.
Definition: ActionMenuState.cpp:49
~ActionMenuState()
Cleans up the Action Menu state.
Definition: ActionMenuState.cpp:141
void btnActionMenuItemClick(Action *action)
Handler for clicking a action menu item.
Definition: ActionMenuState.cpp:192
void resize(int &dX, int &dY)
Update the resolution settings, we just resized the window.
Definition: ActionMenuState.cpp:343
Definition: BaseInfoState.cpp:40