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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2015 by Lutz Sammer, Jimmy Salmon and Andrettin
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 {
81 };
82 
83 class ButtonAction;
84 typedef bool (*ButtonCheckFunc)(const CUnit &, const ButtonAction &);
85 
88 {
89 public:
90  ButtonAction() : Pos(0), Level(0), AlwaysShow(false), Action(ButtonMove), Value(0), Payload(NULL),
91  Allowed(NULL), Key(0) {}
92 
93  int Pos;
94  int Level;
95  bool AlwaysShow;
97  int Value;
98  void* Payload;
99  std::string ValueStr;
100 
102  std::string AllowStr;
103  std::string UnitMask;
105  int Key;
106  std::string Hint;
107  std::string Description;
109  std::string ButtonCursor;
110  std::string Popup;
111 };
112 
123 };
124 
130 };
131 
136 };
137 
142 };
143 
145 #define ModifierShift 1
146 #define ModifierControl 2
147 #define ModifierAlt 4
148 #define ModifierSuper 8
149 #define ModifierDoublePress 16
150 
151 #define MouseDoubleShift 8
152 #define MouseDragShift 16
153 #define MouseHoldShift 24
154 
155 #define NoButton 0
157 #define LeftButton 2
158 #define MiddleButton 4
159 #define RightButton 8
160 
161 #define UpButton 16
162 #define DownButton 32
163 
164 #define LeftAndMiddleButton (LeftButton | MiddleButton)
165 #define LeftAndRightButton (LeftButton | RightButton)
166 #define MiddleAndRightButton (MiddleButton | RightButton)
167 
168 enum _cursor_on_ {
182 };
183 
185 #define ScrollNone 0
186 #define ScrollUp 1
187 #define ScrollDown 2
188 #define ScrollLeft 4
189 #define ScrollRight 8
190 #define ScrollLeftUp 5
191 #define ScrollLeftDown 6
192 #define ScrollRightUp 9
193 #define ScrollRightDown 10
194 
195 /*----------------------------------------------------------------------------
196 -- Variables
197 ----------------------------------------------------------------------------*/
198 extern std::vector<ButtonAction *> UnitButtonTable;
199 
201 extern bool GameRunning;
203 extern bool GamePaused;
205 extern bool GameObserve;
207 extern bool GameEstablishing;
209 extern char SkipGameCycle;
211 extern bool GodMode;
213 extern char BigMapMode;
215 extern bool IsSDLWindowVisible;
216 
218 extern int MouseButtons;
220 extern int KeyModifiers;
222 extern enum _iface_state_ InterfaceState;
224 extern int KeyScrollState;
226 extern int MouseScrollState;
228 extern enum _key_state_ KeyState;
230 extern CUnit *UnitUnderCursor;
232 extern int ButtonAreaUnderCursor;
234 extern int ButtonUnderCursor;
236 extern int OldButtonUnderCursor;
238 extern bool GameMenuButtonClicked;
240 extern bool GameDiplomacyButtonClicked;
242 extern bool LeaveStops;
244 extern enum _cursor_on_ CursorOn;
245 
247 extern int CurrentButtonLevel;
250 
252 extern int DoubleClickDelay;
254 extern int HoldClickDelay;
255 
256 /*----------------------------------------------------------------------------
257 -- Functions
258 ----------------------------------------------------------------------------*/
259 
260 extern CUnit *GetUnitUnderCursor();
261 
262 //
263 // in botpanel.cpp
264 //
266 extern void InitButtons();
268 extern void CleanButtons();
270 extern int AddButton(int pos, int level, const std::string &IconIdent,
271  ButtonCmd action, const std::string &value, void* payload, const ButtonCheckFunc func,
272  const std::string &arg, const int key, const std::string &hint, const std::string &descr,
273  const std::string &sound, const std::string &cursor, const std::string &umask,
274  const std::string &popup, bool alwaysShow);
275 // Check if the button is allowed for the unit.
276 extern bool IsButtonAllowed(const CUnit &unit, const ButtonAction &buttonaction);
277 
278 //
279 // in mouse.cpp
280 //
282 extern void HandleButtonDown(unsigned button);
284 extern void HandleButtonUp(unsigned button);
286 extern void HandleCursorMove(int *x, int *y);
288 extern void HandleMouseMove(const PixelPos &pos);
290 extern void HandleMouseExit();
291 
293 extern int HandleKeyModifiersDown(unsigned keycode, unsigned keychar);
295 extern int HandleKeyModifiersUp(unsigned keycode, unsigned keychar);
296 
298 extern void HandleKeyDown(unsigned keycode, unsigned keychar);
300 extern void HandleKeyUp(unsigned keycode, unsigned keychar);
302 extern void HandleKeyRepeat(unsigned keycode, unsigned keychar);
303 
304 //
305 // in interface.c (for link between video and mouse.c)
306 //
308 extern void InputMouseButtonPress(const EventCallback &callbacks, unsigned ticks, unsigned button);
310 extern void InputMouseButtonRelease(const EventCallback &callbacks, unsigned ticks, unsigned button);
312 extern void InputMouseMove(const EventCallback &callbacks, unsigned ticks, int x, int y);
314 extern void InputMouseExit(const EventCallback &callbacks, unsigned ticks);
316 extern void InputMouseTimeout(const EventCallback &callbacks, unsigned ticks);
317 
319 extern void InputKeyButtonPress(const EventCallback &callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar);
321 extern void InputKeyButtonRelease(const EventCallback &callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar);
323 extern void InputKeyTimeout(const EventCallback &callbacks, unsigned ticks);
324 
326 extern int GetDoubleClickDelay();
328 extern void SetDoubleClickDelay(int delay);
330 extern int GetHoldClickDelay();
332 extern void SetHoldClickDelay(int delay);
333 
335 extern void UiTogglePause();
337 extern void UiToggleBigMap();
339 extern void UiToggleTerrain();
341 extern void UiFindIdleWorker();
343 extern void UiTrackUnit();
344 
346 extern int HandleCheats(const std::string &input);
347 
349 bool HandleCommandKey(int key);
350 
351 //
352 // Chaos pur.
353 //
355 extern void CancelBuildingMode();
356 
358 extern void DrawMenuButtonArea();
360 extern void DrawUserDefinedButtons();
362 extern void UpdateMessages();
364 extern void DrawMessages();
366 extern void DrawResources();
368 extern void SetMessage(const char *fmt, ...) PRINTF_VAARG_ATTRIBUTE(1, 2);
370 extern void SetMessageEvent(const Vec2i &pos, const char *fmt, ...) PRINTF_VAARG_ATTRIBUTE(2, 3);
372 extern void CenterOnMessage();
374 extern void CleanMessages();
376 extern void ToggleShowMessages();
377 
379 extern void DrawTimer();
381 extern void UpdateTimer();
383 extern void UpdateStatusLineForButton(const ButtonAction &button);
385 extern void DrawPieMenu();
387 extern void DrawPopup(const ButtonAction &button, const CUIButton &uibutton, int x = 0, int y = 0);
388 
390 extern bool HandleMouseScrollArea(const PixelPos &mousePos);
391 
392 //
393 // in button_checks.cpp
394 //
396 extern bool ButtonCheckTrue(const CUnit &unit, const ButtonAction &button);
398 extern bool ButtonCheckFalse(const CUnit &unit, const ButtonAction &button);
400 extern bool ButtonCheckUpgrade(const CUnit &unit, const ButtonAction &button);
402 extern bool ButtonCheckIndividualUpgrade(const CUnit &unit, const ButtonAction &button);
404 extern bool ButtonCheckUnitVariable(const CUnit &unit, const ButtonAction &button);
406 extern bool ButtonCheckUnitsOr(const CUnit &unit, const ButtonAction &button);
408 extern bool ButtonCheckUnitsAnd(const CUnit &unit, const ButtonAction &button);
410 extern bool ButtonCheckUnitsNot(const CUnit &unit, const ButtonAction &button);
412 extern bool ButtonCheckNetwork(const CUnit &unit, const ButtonAction &button);
414 extern bool ButtonCheckNoNetwork(const CUnit &unit, const ButtonAction &button);
416 extern bool ButtonCheckNoWork(const CUnit &unit, const ButtonAction &button);
418 extern bool ButtonCheckNoResearch(const CUnit &unit, const ButtonAction &button);
420 extern bool ButtonCheckAttack(const CUnit &unit, const ButtonAction &button);
422 extern bool ButtonCheckUpgradeTo(const CUnit &unit, const ButtonAction &button);
424 extern bool ButtonCheckResearch(const CUnit &unit, const ButtonAction &button);
426 extern bool ButtonCheckSingleResearch(const CUnit &unit, const ButtonAction &button);
427 
428 //
429 // in ccl_ui.c
430 //
432 extern void SelectionChanged();
434 extern void SelectedUnitChanged();
435 
436 //
437 // in game.cpp
438 //
440 extern void SetGamePaused(bool paused);
442 extern bool GetGamePaused();
444 extern void SetGameSpeed(int speed);
446 extern int GetGameSpeed();
447 
449 
450 #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:358
over map area
Definition: interface.h:174
Icon reference (used in config tables)
Definition: icons.h:139
cancel building
Definition: interface.h:80
bool LeaveStops
Mouse leaves windows stops scroll.
Definition: mouse.cpp:83
int Pos
Definition: interface.h:93
bool ButtonCheckNoWork(const CUnit &unit, const ButtonAction &button)
Check if unit isn't working (train,upgrade,research)
Definition: button_checks.cpp:271
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
Definition: interface.h:99
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:106
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:65
cancel training
Definition: interface.h:79
_menu_button_under_
Menu button under cursor.
Definition: interface.h:126
order upgrade
Definition: interface.h:76
bool ButtonCheckFalse(const CUnit &unit, const ButtonAction &button)
Check is always false.
Definition: button_checks.cpp:76
Definition: video.h:223
Definition: interface.h:170
bool ButtonCheckResearch(const CUnit &unit, const ButtonAction &button)
Check if all requirements for a research are meet.
Definition: button_checks.cpp:331
cancel
Definition: interface.h:77
in scroll up area
Definition: interface.h:175
int Value
command on button press
Definition: interface.h:97
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:318
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:824
in scroll right+up area
Definition: interface.h:181
bool ButtonCheckUnitVariable(const CUnit &unit, const ButtonAction &button)
Check if unit's variables pass the condition check.
Definition: button_checks.cpp:115
in scroll left area
Definition: interface.h:177
ButtonAction()
Definition: interface.h:90
Definition: interface.h:140
Upgrading button.
Definition: interface.h:118
not known
Definition: interface.h:171
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:62
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:181
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:127
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:696
enum _cursor_on_ CursorOn
current CursorOn field
Definition: mouse.cpp:85
ButtonCheckFunc Allowed
keep original value string
Definition: interface.h:101
in scroll left+down area
Definition: interface.h:180
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:121
bool ButtonCheckUnitsAnd(const CUnit &unit, const ButtonAction &button)
Check if allowed units exists.
Definition: button_checks.cpp:204
order stop
Definition: interface.h:70
void DrawUserDefinedButtons()
Draw user defined buttons.
Definition: mainscr.cpp:120
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:115
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:287
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:90
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:116
order build
Definition: interface.h:65
void DrawPieMenu()
Draw the Pie Menu.
Definition: mouse.cpp:2139
Menu button.
Definition: interface.h:122
ButtonCmd Action
button is always shown but drawn grayscale if not available
Definition: interface.h:96
void UpdateMessages()
Update messages.
Definition: mainscr.cpp:927
bool ButtonCheckNetwork(const CUnit &unit, const ButtonAction &button)
Check if have network play.
Definition: button_checks.cpp:242
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:111
int GetGameSpeed()
Get the game speed.
Definition: game.cpp:729
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:576
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:87
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:89
int GetDoubleClickDelay()
Get double click delay.
Definition: interface.cpp:1479
void UpdateTimer()
Update the timer.
Definition: mainscr.cpp:1204
Definition: interface.h:134
bool GameDiplomacyButtonClicked
diplomacy button was clicked down
Definition: mouse.cpp:82
void SelectedUnitChanged()
Called whenever the selected unit was updated.
Definition: script_ui.cpp:1126
order harvest
Definition: interface.h:64
button area see: ButtonUnderCursor
Definition: interface.h:173
_button_area_
Button area under cursor.
Definition: interface.h:114
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:94
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:176
void UiToggleBigMap()
Toggle big map.
Definition: interface.cpp:292
void DrawMessages()
Draw messages as overlay over of the map.
Definition: mainscr.cpp:943
IconConfig Icon
for which units is it available
Definition: interface.h:104
_cursor_on_
Where is our cursor ?
Definition: interface.h:169
std::string AllowStr
Check if this button is allowed.
Definition: interface.h:102
Training button.
Definition: interface.h:117
bool ButtonCheckUnitsNot(const CUnit &unit, const ButtonAction &button)
Check if units don't exist.
Definition: button_checks.cpp:227
bool IsButtonAllowed(const CUnit &unit, const ButtonAction &buttonaction)
Definition: botpanel.cpp:862
keys -> commands
Definition: interface.h:141
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:1108
Normal Game state.
Definition: interface.h:135
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:302
Menu button.
Definition: interface.h:128
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:1028
void CleanButtons()
Free memory for buttons.
Definition: botpanel.cpp:192
bool(* ButtonCheckFunc)(const CUnit &, const ButtonAction &)
Definition: interface.h:84
bool GetGamePaused()
Get the game paused or unpaused.
Definition: game.cpp:706
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:108
int OldButtonUnderCursor
oldbutton number under the cursor
Definition: mouse.cpp:80
void DrawTimer()
Draw the timer.
Definition: mainscr.cpp:1191
order move
Definition: interface.h:61
bool ButtonCheckIndividualUpgrade(const CUnit &unit, const ButtonAction &button)
Check if unit has an individual upgrade.
Definition: button_checks.cpp:102
Definition: interface.h:60
in scroll right area
Definition: interface.h:178
void * Payload
extra value for command
Definition: interface.h:98
int KeyModifiers
current active modifiers
Definition: mouse.cpp:75
void void void CenterOnMessage()
Center view-point on last event message.
Definition: mainscr.cpp:1014
int ButtonAreaUnderCursor
button area under the cursor
Definition: mouse.cpp:78
bool AlwaysShow
requires button level
Definition: interface.h:95
void CleanMessages()
Cleanup all messages.
Definition: mainscr.cpp:935
Network menu button.
Definition: interface.h:129
int AddButton(int pos, int level, const std::string &IconIdent, ButtonCmd action, const std::string &value, void *payload, 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
std::string UnitMask
argument for allowed
Definition: interface.h:103
std::string Popup
Custom cursor for button action (for example, to set spell target)
Definition: interface.h:110
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:172
void SetGameSpeed(int speed)
Set the game speed.
Definition: game.cpp:716
enum _key_state_ KeyState
current key state
Definition: interface.cpp:89
Transporting button.
Definition: interface.h:120
void SetDoubleClickDelay(int delay)
Set double click delay.
Definition: interface.cpp:1489
order return goods
Definition: interface.h:74
std::string Description
tip texts
Definition: interface.h:107
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:128
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:545
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:139
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:119
int HoldClickDelay
Time to detect hold clicks.
Definition: interface.cpp:1262
_iface_state_
current interface state
Definition: interface.h:133
std::string ButtonCursor
Sound comment used when you press the button.
Definition: interface.h:109
int KeyScrollState
current scroll state of keyboard
Definition: mainloop.cpp:62
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:257
bool GameMenuButtonClicked
menu button was clicked down
Definition: mouse.cpp:81
in scroll left+up area
Definition: interface.h:179
order train
Definition: interface.h:72
int Key
icon to display
Definition: interface.h:105
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.