OpenXcom
1.0
Open-source clone of the original X-Com
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
src
Battlescape
ActionMenuItem.h
1
/*
2
* Copyright 2010-2014 OpenXcom Developers.
3
*
4
* This file is part of OpenXcom.
5
*
6
* OpenXcom is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* OpenXcom is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#ifndef OPENXCOM_ACTIONMENUITEM_H
20
#define OPENXCOM_ACTIONMENUITEM_H
21
22
#include "../Engine/InteractiveSurface.h"
23
#include "BattlescapeGame.h"
24
25
namespace
OpenXcom
26
{
27
28
class
Game;
29
class
Font;
30
class
Language;
31
class
Text;
32
class
Frame;
33
39
class
ActionMenuItem
:
public
InteractiveSurface
40
{
41
private
:
42
bool
_highlighted;
43
BattleActionType _action;
44
int
_tu;
45
Frame
*_frame;
46
Text
*_txtDescription, *_txtAcc, *_txtTU;
47
public
:
49
ActionMenuItem
(
int
id
,
Game
*game,
int
x,
int
y);
51
~ActionMenuItem
();
53
void
setAction
(BattleActionType action, std::wstring description, std::wstring accuracy, std::wstring timeunits,
int
tu);
55
BattleActionType
getAction
()
const
;
57
int
getTUs
()
const
;
59
void
setPalette
(SDL_Color *colors,
int
firstcolor,
int
ncolors);
61
void
draw
();
63
void
mouseIn
(
Action
*action,
State
*state);
65
void
mouseOut
(
Action
*action,
State
*state);
66
67
};
68
69
}
70
71
#endif
OpenXcom::Action
Container for all the information associated with a given user action, like mouse clicks...
Definition:
Action.h:34
OpenXcom::ActionMenuItem::draw
void draw()
Redraws it.
Definition:
ActionMenuItem.cpp:132
OpenXcom::ActionMenuItem::getTUs
int getTUs() const
Gets the assigned action TUs.
Definition:
ActionMenuItem.cpp:109
OpenXcom::State
A game state that receives user input and reacts accordingly.
Definition:
State.h:44
OpenXcom::ActionMenuItem::getAction
BattleActionType getAction() const
Gets the assigned action.
Definition:
ActionMenuItem.cpp:100
OpenXcom::InteractiveSurface
Surface that the user can interact with.
Definition:
InteractiveSurface.h:39
OpenXcom::Text
Text string displayed on screen.
Definition:
Text.h:41
OpenXcom::ActionMenuItem
A class that represents a single box in the action popup menu on the battlescape. ...
Definition:
ActionMenuItem.h:39
OpenXcom::ActionMenuItem::ActionMenuItem
ActionMenuItem(int id, Game *game, int x, int y)
Creates a new ActionMenuItem.
Definition:
ActionMenuItem.cpp:36
OpenXcom::ActionMenuItem::setAction
void setAction(BattleActionType action, std::wstring description, std::wstring accuracy, std::wstring timeunits, int tu)
Assigns an action to it.
Definition:
ActionMenuItem.cpp:86
OpenXcom::ActionMenuItem::mouseIn
void mouseIn(Action *action, State *state)
Processes a mouse hover in event.
Definition:
ActionMenuItem.cpp:145
OpenXcom::ActionMenuItem::~ActionMenuItem
~ActionMenuItem()
Cleans up the ActionMenuItem.
Definition:
ActionMenuItem.cpp:70
OpenXcom::ActionMenuItem::mouseOut
void mouseOut(Action *action, State *state)
Processes a mouse hover out event.
Definition:
ActionMenuItem.cpp:159
OpenXcom::ActionMenuItem::setPalette
void setPalette(SDL_Color *colors, int firstcolor, int ncolors)
Sets the palettes.
Definition:
ActionMenuItem.cpp:120
OpenXcom::Game
The core of the game engine, manages the game's entire contents and structure.
Definition:
Game.h:44
OpenXcom::Frame
Fancy frame border thing used for windows and other elements.
Definition:
Frame.h:30
Generated on Fri Jun 13 2014 20:52:36 for OpenXcom by
1.8.7