_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

interface.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 1998-2006 by Lutz Sammer and Jimmy Salmon
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 //
29 
30 #ifndef __INTERFACE_H__
31 #define __INTERFACE_H__
32 
34 
35 /*----------------------------------------------------------------------------
36 -- Declarations
37 ----------------------------------------------------------------------------*/
38 #ifndef __ICONS_H__
39 #include "icons.h"
40 #endif
41 
42 #include "unitsound.h"
43 #include "vec2i.h"
44 #include <vector>
45 
46 /*----------------------------------------------------------------------------
47 -- Declarations
48 ----------------------------------------------------------------------------*/
49 
50 class CUIButton;
51 class CUnit;
52 struct EventCallback;
53 
54 /*----------------------------------------------------------------------------
55 -- Definitons
56 ----------------------------------------------------------------------------*/
57 
59 enum ButtonCmd {
80 };
81 
82 class ButtonAction;
83 typedef bool (*ButtonCheckFunc)(const CUnit &, const ButtonAction &);
84 
87 {
88 public:
90  Allowed(NULL), Key(0) {}
91 
92  int Pos;
93  int Level;
94  bool AlwaysShow;
96  int Value;
97  std::string ValueStr;
98 
100  std::string AllowStr;
101  std::string UnitMask;
103  int Key;
104  std::string Hint;
105  std::string Description;
107  std::string ButtonCursor;
108  std::string Popup;
109 };
110 
121 };
122 
128 };
129 
134 };
135 
140 };
141 
143 #define ModifierShift 1
144 #define ModifierControl 2
145 #define ModifierAlt 4
146 #define ModifierSuper 8
147 #define ModifierDoublePress 16
148 
149 #define MouseDoubleShift 8
150 #define MouseDragShift 16
151 #define MouseHoldShift 24
152 
153 #define NoButton 0
155 #define LeftButton 2
156 #define MiddleButton 4
157 #define RightButton 8
158 
159 #define UpButton 16
160 #define DownButton 32
161 
162 #define LeftAndMiddleButton (LeftButton | MiddleButton)
163 #define LeftAndRightButton (LeftButton | RightButton)
164 #define MiddleAndRightButton (MiddleButton | RightButton)
165 
166 enum _cursor_on_ {
180 };
181 
183 #define ScrollNone 0
184 #define ScrollUp 1
185 #define ScrollDown 2
186 #define ScrollLeft 4
187 #define ScrollRight 8
188 #define ScrollLeftUp 5
189 #define ScrollLeftDown 6
190 #define ScrollRightUp 9
191 #define ScrollRightDown 10
192 
193 /*----------------------------------------------------------------------------
194 -- Variables
195 ----------------------------------------------------------------------------*/
196 extern std::vector<ButtonAction *> UnitButtonTable;
197 
199 extern bool GameRunning;
201 extern bool GamePaused;
203 extern bool GameObserve;
205 extern bool GameEstablishing;
207 extern char SkipGameCycle;
209 extern bool GodMode;
211 extern char BigMapMode;
213 extern bool IsSDLWindowVisible;
214 
216 extern int MouseButtons;
218 extern int KeyModifiers;
220 extern enum _iface_state_ InterfaceState;
222 extern int KeyScrollState;
224 extern int MouseScrollState;
226 extern enum _key_state_ KeyState;
228 extern CUnit *UnitUnderCursor;
230 extern int ButtonAreaUnderCursor;
232 extern int ButtonUnderCursor;
234 extern int OldButtonUnderCursor;
236 extern bool GameMenuButtonClicked;
238 extern bool GameDiplomacyButtonClicked;
240 extern bool LeaveStops;
242 extern enum _cursor_on_ CursorOn;
243 
245 extern int CurrentButtonLevel;
248 
250 extern int DoubleClickDelay;
252 extern int HoldClickDelay;
253 
254 /*----------------------------------------------------------------------------
255 -- Functions
256 ----------------------------------------------------------------------------*/
257 
258 extern CUnit *GetUnitUnderCursor();
259 
260 //
261 // in botpanel.cpp
262 //
264 extern void InitButtons();
266 extern void CleanButtons();
268 extern int AddButton(int pos, int level, const std::string &IconIdent,
269  ButtonCmd action, const std::string &value, const ButtonCheckFunc func,
270  const std::string &arg, const int key, const std::string &hint, const std::string &descr,
271  const std::string &sound, const std::string &cursor, const std::string &umask,
272  const std::string &popup, bool alwaysShow);
273 // Check if the button is allowed for the unit.
274 extern bool IsButtonAllowed(const CUnit &unit, const ButtonAction &buttonaction);
275 
276 //
277 // in mouse.cpp
278 //
280 extern void HandleButtonDown(unsigned button);
282 extern void HandleButtonUp(unsigned button);
284 extern void HandleCursorMove(int *x, int *y);
286 extern void HandleMouseMove(const PixelPos &pos);
288 extern void HandleMouseExit();
289 
291 extern int HandleKeyModifiersDown(unsigned keycode, unsigned keychar);
293 extern int HandleKeyModifiersUp(unsigned keycode, unsigned keychar);
294 
296 extern void HandleKeyDown(unsigned keycode, unsigned keychar);
298 extern void HandleKeyUp(unsigned keycode, unsigned keychar);
300 extern void HandleKeyRepeat(unsigned keycode, unsigned keychar);
301 
302 //
303 // in interface.c (for link between video and mouse.c)
304 //
306 extern void InputMouseButtonPress(const EventCallback &callbacks, unsigned ticks, unsigned button);
308 extern void InputMouseButtonRelease(const EventCallback &callbacks, unsigned ticks, unsigned button);
310 extern void InputMouseMove(const EventCallback &callbacks, unsigned ticks, int x, int y);
312 extern void InputMouseExit(const EventCallback &callbacks, unsigned ticks);
314 extern void InputMouseTimeout(const EventCallback &callbacks, unsigned ticks);
315 
317 extern void InputKeyButtonPress(const EventCallback &callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar);
319 extern void InputKeyButtonRelease(const EventCallback &callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar);
321 extern void InputKeyTimeout(const EventCallback &callbacks, unsigned ticks);
322 
324 extern int GetDoubleClickDelay();
326 extern void SetDoubleClickDelay(int delay);
328 extern int GetHoldClickDelay();
330 extern void SetHoldClickDelay(int delay);
331 
333 extern void UiTogglePause();
335 extern void UiToggleBigMap();
337 extern void UiToggleTerrain();
339 extern void UiFindIdleWorker();
341 extern void UiTrackUnit();
342 
344 extern int HandleCheats(const std::string &input);
345 
347 bool HandleCommandKey(int key);
348 
349 //
350 // Chaos pur.
351 //
353 extern void CancelBuildingMode();
354 
356 extern void DrawMenuButtonArea();
358 extern void DrawUserDefinedButtons();
360 extern void UpdateMessages();
362 extern void DrawMessages();
364 extern void DrawResources();
366 extern void SetMessage(const char *fmt, ...) PRINTF_VAARG_ATTRIBUTE(1, 2);
368 extern void SetMessageEvent(const Vec2i &pos, const char *fmt, ...) PRINTF_VAARG_ATTRIBUTE(2, 3);
370 extern void CenterOnMessage();
372 extern void CleanMessages();
374 extern void ToggleShowMessages();
375 
377 extern void DrawTimer();
379 extern void UpdateTimer();
381 extern void UpdateStatusLineForButton(const ButtonAction &button);
383 extern void DrawPieMenu();
385 extern void DrawPopup(const ButtonAction &button, const CUIButton &uibutton, int x = 0, int y = 0);
386 
388 extern bool HandleMouseScrollArea(const PixelPos &mousePos);
389 
390 //
391 // in button_checks.cpp
392 //
394 extern bool ButtonCheckTrue(const CUnit &unit, const ButtonAction &button);
396 extern bool ButtonCheckFalse(const CUnit &unit, const ButtonAction &button);
398 extern bool ButtonCheckUpgrade(const CUnit &unit, const ButtonAction &button);
400 extern bool ButtonCheckUnitVariable(const CUnit &unit, const ButtonAction &button);
402 extern bool ButtonCheckUnitsOr(const CUnit &unit, const ButtonAction &button);
404 extern bool ButtonCheckUnitsAnd(const CUnit &unit, const ButtonAction &button);
406 extern bool ButtonCheckUnitsNot(const CUnit &unit, const ButtonAction &button);
408 extern bool ButtonCheckNetwork(const CUnit &unit, const ButtonAction &button);
410 extern bool ButtonCheckNoNetwork(const CUnit &unit, const ButtonAction &button);
412 extern bool ButtonCheckNoWork(const CUnit &unit, const ButtonAction &button);
414 extern bool ButtonCheckNoResearch(const CUnit &unit, const ButtonAction &button);
416 extern bool ButtonCheckAttack(const CUnit &unit, const ButtonAction &button);
418 extern bool ButtonCheckUpgradeTo(const CUnit &unit, const ButtonAction &button);
420 extern bool ButtonCheckResearch(const CUnit &unit, const ButtonAction &button);
422 extern bool ButtonCheckSingleResearch(const CUnit &unit, const ButtonAction &button);
423 
424 //
425 // in ccl_ui.c
426 //
428 extern void SelectionChanged();
430 extern void SelectedUnitChanged();
431 
432 //
433 // in game.cpp
434 //
436 extern void SetGamePaused(bool paused);
438 extern bool GetGamePaused();
440 extern void SetGameSpeed(int speed);
442 extern int GetGameSpeed();
443 
445 
446 #endif // !__INTERFACE_H__
bool ButtonCheckSingleResearch(const CUnit &unit, const ButtonAction &button)
Check if all requirements for a single research are meet.
Definition: button_checks.cpp:344
over map area
Definition: interface.h:172
Icon reference (used in config tables)
Definition: icons.h:139
bool LeaveStops
Mouse leaves windows stops scroll.
Definition: mouse.cpp:83
int Pos
Definition: interface.h:92
bool ButtonCheckNoWork(const CUnit &unit, const ButtonAction &button)
Check if unit isn't working (train,upgrade,research)
Definition: button_checks.cpp:257
void InitButtons()
Generate all buttons.
Definition: botpanel.cpp:89
int MouseButtons
pressed mouse buttons (normal,double,dragged,long)
Definition: mouse.cpp:73
std::string ValueStr
extra value for command
Definition: interface.h:97
void HandleKeyDown(unsigned keycode, unsigned keychar)
Called if a key is pressed.
Definition: interface.cpp:1078
std::string Hint
alternative on keyboard
Definition: interface.h:104
void void SetMessageEvent(const Vec2i &pos, const char *fmt,...) PRINTF_VAARG_ATTRIBUTE(2
Set message to display with event point.
int MouseScrollState
current scroll state of mouse
Definition: mainloop.cpp:64
cancel training
Definition: interface.h:79
_menu_button_under_
Menu button under cursor.
Definition: interface.h:124
order upgrade
Definition: interface.h:76
bool ButtonCheckFalse(const CUnit &unit, const ButtonAction &button)
Check is always false.
Definition: button_checks.cpp:75
Definition: video.h:210
Definition: interface.h:168
bool ButtonCheckResearch(const CUnit &unit, const ButtonAction &button)
Check if all requirements for a research are meet.
Definition: button_checks.cpp:317
cancel
Definition: interface.h:77
in scroll up area
Definition: interface.h:173
int Value
command on button press
Definition: interface.h:96
buttons on screen themselves
Definition: ui.h:124
bool ButtonCheckAttack(const CUnit &unit, const ButtonAction &button)
Check if all requirements for an attack to are meet.
Definition: button_checks.cpp:304
void HandleButtonUp(unsigned button)
Called if any mouse button is released up.
Definition: interface.cpp:1248
void UpdateStatusLineForButton(const ButtonAction &button)
Update the status line with hints from the button.
Definition: botpanel.cpp:823
in scroll right+up area
Definition: interface.h:179
bool ButtonCheckUnitVariable(const CUnit &unit, const ButtonAction &button)
Check if unit's variables pass the condition check.
Definition: button_checks.cpp:101
in scroll left area
Definition: interface.h:175
ButtonAction()
Definition: interface.h:89
Definition: interface.h:138
Upgrading button.
Definition: interface.h:116
not known
Definition: interface.h:169
void HandleKeyUp(unsigned keycode, unsigned keychar)
Called when a key is released.
Definition: interface.cpp:1109
order attack
Definition: interface.h:62
bool ButtonCheckTrue(const CUnit &unit, const ButtonAction &button)
Check is always true.
Definition: button_checks.cpp:61
bool GameRunning
Flag telling if the game is running.
Definition: interface.cpp:81
bool ButtonCheckUnitsOr(const CUnit &unit, const ButtonAction &button)
Check if allowed units exists.
Definition: button_checks.cpp:167
int HandleCheats(const std::string &input)
Handle cheats.
Definition: interface.cpp:747
void InputKeyTimeout(const EventCallback &callbacks, unsigned ticks)
Called to look for key timeouts.
Definition: interface.cpp:1468
std::vector< ButtonAction * > UnitButtonTable
All buttons for units.
Definition: botpanel.cpp:78
Definition: interface.h:125
void HandleMouseMove(const PixelPos &pos)
Called if the mouse is moved.
Definition: interface.cpp:1223
void SetGamePaused(bool paused)
Set the game paused or unpaused.
Definition: game.cpp:634
enum _cursor_on_ CursorOn
current CursorOn field
Definition: mouse.cpp:85
ButtonCheckFunc Allowed
keep original value string
Definition: interface.h:99
in scroll left+down area
Definition: interface.h:178
void InputMouseTimeout(const EventCallback &callbacks, unsigned ticks)
Called to look for mouse timeouts.
Definition: interface.cpp:1399
char BigMapMode
Whether the map is the only thing displayed or not.
Definition: interface.cpp:86
order cast spell
Definition: interface.h:68
void UiTogglePause()
Toggle pause mode.
Definition: interface.cpp:275
Button panel button.
Definition: interface.h:119
bool ButtonCheckUnitsAnd(const CUnit &unit, const ButtonAction &button)
Check if allowed units exists.
Definition: button_checks.cpp:190
order stop
Definition: interface.h:70
void DrawUserDefinedButtons()
Draw user defined buttons.
Definition: mainscr.cpp:117
CUnit * UnitUnderCursor
shared pointer to unit under the cursor
Definition: mouse.cpp:77
void CancelBuildingMode()
Cancel the building input mode.
Definition: mouse.cpp:100
Definition: interface.h:113
The big unit structure.
Definition: unit.h:119
int GetHoldClickDelay()
Get hold click delay.
Definition: interface.cpp:1497
bool ButtonCheckNoResearch(const CUnit &unit, const ButtonAction &button)
Check if unit isn't researching or upgrading.
Definition: button_checks.cpp:273
choose other button set
Definition: interface.h:71
void UiToggleTerrain()
Toggle terrain display on/off.
Definition: interface.cpp:415
#define PRINTF_VAARG_ATTRIBUTE(a, b)
Definition: stratagus.h:91
CUnit * GetUnitUnderCursor()
Definition: mouse.cpp:92
void InputMouseButtonRelease(const EventCallback &callbacks, unsigned ticks, unsigned button)
Called if any mouse button is released up.
Definition: interface.cpp:1315
Selected button.
Definition: interface.h:114
order build
Definition: interface.h:65
void DrawPieMenu()
Draw the Pie Menu.
Definition: mouse.cpp:2139
Menu button.
Definition: interface.h:120
ButtonCmd Action
button is always shown but drawn grayscale if not available
Definition: interface.h:95
void UpdateMessages()
Update messages.
Definition: mainscr.cpp:919
bool ButtonCheckNetwork(const CUnit &unit, const ButtonAction &button)
Check if have network play.
Definition: button_checks.cpp:228
cancel upgrade
Definition: interface.h:78
void SetHoldClickDelay(int delay)
Set hold click delay.
Definition: interface.cpp:1507
Definition: unitsound.h:54
void DrawMenuButtonArea()
Draw menu button area.
Definition: mainscr.cpp:108
int GetGameSpeed()
Get the game speed.
Definition: game.cpp:667
bool HandleCommandKey(int key)
Call the lua function HandleCommandKey.
Definition: interface.cpp:488
void DrawResources()
Draw the player resource in resource line.
Definition: mainscr.cpp:570
order stand ground
Definition: interface.h:73
bool GodMode
Invincibility cheat.
Definition: interface.cpp:88
ButtonCmd
Button Commands that need target selection.
Definition: interface.h:59
void HandleMouseExit()
Called if the mouse exits the game window (only for some videomodes)
Definition: mouse.cpp:840
void SetMessage(const char *fmt,...) PRINTF_VAARG_ATTRIBUTE(1
Set message to display.
Action of button.
Definition: interface.h:86
int AddButton(int pos, int level, const std::string &IconIdent, ButtonCmd action, const std::string &value, const ButtonCheckFunc func, const std::string &arg, const int key, const std::string &hint, const std::string &descr, const std::string &sound, const std::string &cursor, const std::string &umask, const std::string &popup, bool alwaysShow)
Make a new button.
Definition: botpanel.cpp:105
order unload unit
Definition: interface.h:69
bool ButtonCheckUpgrade(const CUnit &unit, const ButtonAction &button)
Check if allowed upgrade is ready.
Definition: button_checks.cpp:88
int GetDoubleClickDelay()
Get double click delay.
Definition: interface.cpp:1479
void UpdateTimer()
Update the timer.
Definition: mainscr.cpp:1196
Definition: interface.h:132
bool GameDiplomacyButtonClicked
diplomacy button was clicked down
Definition: mouse.cpp:82
void SelectedUnitChanged()
Called whenever the selected unit was updated.
Definition: script_ui.cpp:1102
order harvest
Definition: interface.h:64
button area see: ButtonUnderCursor
Definition: interface.h:171
_button_area_
Button area under cursor.
Definition: interface.h:112
bool GamePaused
Flag telling if the game is paused.
Definition: interface.cpp:82
void HandleCursorMove(int *x, int *y)
Keep coordinates in window and update cursor position.
Definition: interface.cpp:1209
int Level
button position in the grid
Definition: interface.h:93
void InputMouseExit(const EventCallback &callbacks, unsigned ticks)
Called if the mouse exits the game window (when supported by videomode)
Definition: interface.cpp:1386
order repair
Definition: interface.h:63
int CurrentButtonLevel
vladi: used for unit buttons sub-menus etc
Definition: botpanel.cpp:76
in scroll down area
Definition: interface.h:174
void UiToggleBigMap()
Toggle big map.
Definition: interface.cpp:292
void DrawMessages()
Draw messages as overlay over of the map.
Definition: mainscr.cpp:935
IconConfig Icon
for which units is it available
Definition: interface.h:102
_cursor_on_
Where is our cursor ?
Definition: interface.h:167
std::string AllowStr
Check if this button is allowed.
Definition: interface.h:100
Training button.
Definition: interface.h:115
bool ButtonCheckUnitsNot(const CUnit &unit, const ButtonAction &button)
Check if units don't exist.
Definition: button_checks.cpp:213
bool IsButtonAllowed(const CUnit &unit, const ButtonAction &buttonaction)
Definition: botpanel.cpp:861
keys -> commands
Definition: interface.h:139
bool GameObserve
Flag telling if the game is in observe mode.
Definition: interface.cpp:83
void SelectionChanged()
Called whenever the units selection is altered.
Definition: script_ui.cpp:1084
Normal Game state.
Definition: interface.h:133
void InputMouseButtonPress(const EventCallback &callbacks, unsigned ticks, unsigned button)
Called if any mouse button is pressed down.
Definition: interface.cpp:1286
bool ButtonCheckUpgradeTo(const CUnit &unit, const ButtonAction &button)
Check if all requirements for an upgrade to are meet.
Definition: button_checks.cpp:288
Menu button.
Definition: interface.h:126
enum _iface_state_ InterfaceState
current interface state
Definition: interface.cpp:87
void HandleButtonDown(unsigned button)
Called if any mouse button is pressed down.
Definition: interface.cpp:1235
void ToggleShowMessages()
show/hide messages
Definition: mainscr.cpp:1020
void CleanButtons()
Free memory for buttons.
Definition: botpanel.cpp:191
bool GetGamePaused()
Get the game paused or unpaused.
Definition: game.cpp:644
int HandleKeyModifiersDown(unsigned keycode, unsigned keychar)
Update KeyModifiers if a key is pressed.
Definition: interface.cpp:969
SoundConfig CommentSound
description shown on status bar (optional)
Definition: interface.h:106
int OldButtonUnderCursor
oldbutton number under the cursor
Definition: mouse.cpp:80
void DrawTimer()
Draw the timer.
Definition: mainscr.cpp:1183
order move
Definition: interface.h:61
Definition: interface.h:60
in scroll right area
Definition: interface.h:176
int KeyModifiers
current active modifiers
Definition: mouse.cpp:75
void void void CenterOnMessage()
Center view-point on last event message.
Definition: mainscr.cpp:1006
bool(* ButtonCheckFunc)(const CUnit &, const ButtonAction &)
Definition: interface.h:83
int ButtonAreaUnderCursor
button area under the cursor
Definition: mouse.cpp:78
bool AlwaysShow
requires button level
Definition: interface.h:94
void CleanMessages()
Cleanup all messages.
Definition: mainscr.cpp:927
Network menu button.
Definition: interface.h:127
std::string UnitMask
argument for allowed
Definition: interface.h:101
std::string Popup
Custom cursor for button action (for example, to set spell target)
Definition: interface.h:108
int DoubleClickDelay
Time to detect double clicks.
Definition: interface.cpp:1261
order attack ground
Definition: interface.h:67
int ButtonUnderCursor
button number under the cursor
Definition: mouse.cpp:79
minimap area
Definition: interface.h:170
void SetGameSpeed(int speed)
Set the game speed.
Definition: game.cpp:654
enum _key_state_ KeyState
current key state
Definition: interface.cpp:89
Transporting button.
Definition: interface.h:118
void SetDoubleClickDelay(int delay)
Set double click delay.
Definition: interface.cpp:1489
Definition: vec2i.h:36
order return goods
Definition: interface.h:74
std::string Description
tip texts
Definition: interface.h:105
void InputKeyButtonRelease(const EventCallback &callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar)
Called if any key button is released up.
Definition: interface.cpp:1452
void InputKeyButtonPress(const EventCallback &callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar)
Called if any key button is pressed down.
Definition: interface.cpp:1430
order patrol
Definition: interface.h:66
bool HandleMouseScrollArea(const PixelPos &mousePos)
Handle the mouse in scroll area.
Definition: interface.cpp:1157
bool IsSDLWindowVisible
Flag telling if the SDL window is visible.
Definition: sdl.cpp:135
bool GameEstablishing
Flag telling if the game is in establishing mode.
Definition: interface.cpp:84
void UiFindIdleWorker()
Find the next idle worker.
Definition: interface.cpp:428
ButtonAction * LastDrawnButtonPopup
Last drawn popup : used to speed up drawing.
Definition: botpanel.cpp:74
void DrawPopup(const ButtonAction &button, const CUIButton &uibutton, int x=0, int y=0)
Draw the button popup.
Definition: botpanel.cpp:544
void InputMouseMove(const EventCallback &callbacks, unsigned ticks, int x, int y)
Called if the mouse is moved.
Definition: interface.cpp:1350
_key_state_
current key state
Definition: interface.h:137
int HandleKeyModifiersUp(unsigned keycode, unsigned keychar)
Update KeyModifiers if a key is released.
Definition: interface.cpp:1015
order reseach
Definition: interface.h:75
Researching button.
Definition: interface.h:117
int HoldClickDelay
Time to detect hold clicks.
Definition: interface.cpp:1262
_iface_state_
current interface state
Definition: interface.h:131
std::string ButtonCursor
Sound comment used when you press the button.
Definition: interface.h:107
int KeyScrollState
current scroll state of keyboard
Definition: mainloop.cpp:61
char SkipGameCycle
Flag telling not to advance to the next game cycle.
Definition: interface.cpp:85
bool ButtonCheckNoNetwork(const CUnit &unit, const ButtonAction &button)
Check if don't have network play.
Definition: button_checks.cpp:243
bool GameMenuButtonClicked
menu button was clicked down
Definition: mouse.cpp:81
in scroll left+up area
Definition: interface.h:177
order train
Definition: interface.h:72
int Key
icon to display
Definition: interface.h:103
void HandleKeyRepeat(unsigned keycode, unsigned keychar)
Called when a key is repeated.
Definition: interface.cpp:1143
void UiTrackUnit()
Track unit, the viewport follows the unit.
Definition: interface.cpp:471
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.