____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

interface.cpp File Reference

The interface. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stratagus.h"
#include "video.h"
#include "sound.h"
#include "sound_server.h"
#include "unittype.h"
#include "player.h"
#include "unit.h"
#include "interface.h"
#include "cursor.h"
#include "ui.h"
#include "menus.h"
#include "script.h"
#include "map.h"
#include "minimap.h"
#include "network.h"
#include "font.h"
#include "results.h"
#include "iolib.h"
#include "replay.h"
#include "ai.h"
#include "widgets.h"
#include "particle.h"

Go to the source code of this file.

Defines

#define SCROLL_UP   15
 < Scrolling area (<= 15 y)
#define SCROLL_DOWN   (Video.Height - 16)
 Scrolling area (<= 15 y).
#define SCROLL_LEFT   15
 Scrolling area (>= VideoWidth - 16 x).
#define SCROLL_RIGHT   (Video.Width - 16)

Enumerations

enum  { InitialMouseState, ClickedMouseState }

Functions

static void ShowInput (void)
static void UiBeginInput (void)
static void UiUnselectAll (void)
static void UiCenterOnGroup (unsigned group)
static void UiSelectGroup (unsigned group)
static void UiAddGroupToSelection (unsigned group)
static void UiDefineGroup (unsigned group)
static void UiAddToGroup (unsigned group)
static void UiToggleSound (void)
static void UiToggleMusic (void)
void UiTogglePause (void)
 Handle cheats.
static void UiToggleBigMap (void)
static void UiIncreaseGameSpeed (void)
static void UiDecreaseGameSpeed (void)
static void UiCenterOnSelected (void)
static void UiSaveMapPosition (unsigned position)
static void UiRecallMapPosition (unsigned position)
static void UiToggleTerrain (void)
static void UiFindIdleWorker (void)
static void UiToggleGrabMouse (void)
static void UiTrackUnit (void)
bool HandleCommandKey (int key)
static bool CommandKey (int key)
int HandleCheats (const std::string &input)
 Call the lua function HandleCommandKey.
static int InputKey (int key)
static void Screenshot (void)
int HandleKeyModifiersDown (unsigned key, unsigned keychar)
 Update KeyModifiers if a key is released.
int HandleKeyModifiersUp (unsigned key, unsigned keychar)
 Called if a key is pressed.
static bool IsKeyPad (unsigned key, unsigned *kp)
void HandleKeyDown (unsigned key, unsigned keychar)
 Called when a key is released.
void HandleKeyUp (unsigned key, unsigned keychar)
 Called when a key is repeated.
void HandleKeyRepeat (unsigned key, unsigned keychar)
int HandleMouseScrollArea (int x, int y)
void HandleCursorMove (int *x, int *y)
 Called if the mouse is moved.
void HandleMouseMove (int x, int y)
 Called if the mouse exits the game window (only for some videomodes).
void HandleButtonDown (unsigned button)
 < Called if any mouse button is pressed down
void HandleButtonUp (unsigned button)
 Keep coordinates in window and update cursor position.
void InputMouseButtonPress (const EventCallback *callbacks, unsigned ticks, unsigned button)
void InputMouseButtonRelease (const EventCallback *callbacks, unsigned ticks, unsigned button)
void InputMouseMove (const EventCallback *callbacks, unsigned ticks, int x, int y)
void InputMouseExit (const EventCallback *callbacks, unsigned ticks)
void InputMouseTimeout (const EventCallback *callbacks, unsigned ticks)
void InputKeyButtonPress (const EventCallback *callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar)
void InputKeyButtonRelease (const EventCallback *callbacks, unsigned ticks, unsigned ikey, unsigned ikeychar)
void InputKeyTimeout (const EventCallback *callbacks, unsigned ticks)
int GetDoubleClickDelay (void)
 Set double click delay.
void SetDoubleClickDelay (int delay)
 Get hold click delay.
int GetHoldClickDelay (void)
 Set hold click delay.
void SetHoldClickDelay (int delay)
 Toggle pause mode.

Variables

static int SavedMapPositionX [3]
 Saved map position X.
static int SavedMapPositionY [3]
 Saved map position Y.
static char Input [80]
 line input for messages/long commands
static int InputIndex
 current index into input
static char InputStatusLine [99]
 Last input status line.
std::string DefaultGroupKeys = "0123456789`"
 Default group keys.
std::string UiGroupKeys = DefaultGroupKeys
 Up to 11 keys, last unselect. Default for qwerty.
bool GameRunning
 Current running state.
bool GamePaused
 Current pause state.
bool GameObserve
 Observe mode.
char SkipGameCycle
 Skip the next game cycle.
char BigMapMode
 Show only the map.
enum _iface_state_ InterfaceState
 Current interface state.
bool GodMode
 Invincibility cheat.
enum _key_state_ KeyState
 current key state
int DoubleClickDelay = 300
 Time to detect double clicks.
int HoldClickDelay = 1000
 Time to detect hold clicks.
static enum { ... }  MouseState
 Current state of mouse.
static int MouseX
 Last mouse X position.
static int MouseY
 Last mouse Y position.
static unsigned LastMouseButton
 last mouse button handled
static unsigned StartMouseTicks
 Ticks of first click.
static unsigned LastMouseTicks
 Ticks of last mouse event.
static int HoldKeyDelay = 250
 Time to detect hold key.
static int HoldKeyAdditionalDelay = 50
 Time to detect additional hold key.
static unsigned LastIKey
 last key handled
static unsigned LastIKeyChar
 last keychar handled
static unsigned LastKeyTicks
 Ticks of last key.
static unsigned DoubleKey
 last key pressed


Detailed Description

The interface.

Definition in file interface.cpp.


Define Documentation

#define SCROLL_DOWN   (Video.Height - 16)

Scrolling area (<= 15 y).

Definition at line 70 of file interface.cpp.

Referenced by HandleMouseScrollArea().

#define SCROLL_LEFT   15

Scrolling area (>= VideoWidth - 16 x).

Definition at line 72 of file interface.cpp.

Referenced by HandleMouseScrollArea().

#define SCROLL_RIGHT   (Video.Width - 16)

Definition at line 74 of file interface.cpp.

Referenced by HandleMouseScrollArea().

#define SCROLL_UP   15

< Scrolling area (<= 15 y)

Scrolling area (>= VideoHeight - 16 y)

Definition at line 68 of file interface.cpp.

Referenced by HandleMouseScrollArea().


Enumeration Type Documentation

anonymous enum

Enumerator:
InitialMouseState  start state
ClickedMouseState  button is clicked

Definition at line 1209 of file interface.cpp.


Function Documentation

static bool CommandKey ( int  key  )  [static]

int GetDoubleClickDelay ( void   ) 

Set double click delay.

Get double click delay

Definition at line 1418 of file interface.cpp.

Referenced by tolua_stratagus_GetDoubleClickDelay00().

int GetHoldClickDelay ( void   ) 

Set hold click delay.

Get hold click delay

Definition at line 1436 of file interface.cpp.

Referenced by tolua_stratagus_GetHoldClickDelay00().

void HandleButtonDown ( unsigned  button  ) 

< Called if any mouse button is pressed down

Called if mouse button pressed down.

Parameters:
button Mouse button number (0 left, 1 middle, 2 right)

Definition at line 1184 of file interface.cpp.

References UIHandleButtonDown().

Referenced by InitGameCallbacks().

void HandleButtonUp ( unsigned  button  ) 

Keep coordinates in window and update cursor position.

Called if mouse button released.

Todo:
FIXME: the mouse handling should be complete rewritten
Todo:
FIXME: this is needed for double click, long click,...
Parameters:
button Mouse button number (0 left, 1 middle, 2 right)

Definition at line 1197 of file interface.cpp.

References UIHandleButtonUp().

Referenced by InitGameCallbacks().

int HandleCheats ( const std::string &  input  ) 

Call the lua function HandleCommandKey.

Handle cheats

Returns:
1 if a cheat was handled, 0 otherwise

Definition at line 693 of file interface.cpp.

References CPlayer::Ai, CPlayer::AiEnabled, AiInit(), DebugPrint, Lua, LuaCall(), LuaToBoolean(), PlayerComputer, PlayerPerson, SetMessage(), ThisPlayer, and CPlayer::Type.

Referenced by DoNextReplay(), and InputKey().

bool HandleCommandKey ( int  key  ) 

Call the lua function HandleCommandKey

Definition at line 472 of file interface.cpp.

References DebugPrint, KeyModifiers, Lua, LuaCall(), LuaError, LuaToBoolean(), ModifierAlt, ModifierControl, ModifierShift, and SdlKey2Str().

Referenced by CommandKey(), EditorCallbackKeyDown(), and PatchEditorCallbackKeyDown().

void HandleCursorMove ( int *  x,
int *  y 
)

Called if the mouse is moved.

Keep coordinates in window and update cursor position

Parameters:
x screen pixel X position.
y screen pixel Y position.

Definition at line 1147 of file interface.cpp.

References CursorX, CursorY, CVideo::Height, Video, and CVideo::Width.

Referenced by EditorCallbackMouse(), HandleMouseMove(), MenuHandleMouseMove(), and PatchEditorCallbackMouse().

void HandleKeyDown ( unsigned  key,
unsigned  keychar 
)

Called when a key is released.

Handle key down.

Parameters:
key Key scancode.
keychar Character code.

Definition at line 1016 of file interface.cpp.

References CUserInterface::ButtonPanel, CommandKey(), CButtonPanel::DoKey(), GameObserve, GamePaused, HandleKeyModifiersDown(), InputKey(), IsKeyPad(), KeyModifiers, KeyState, KeyStateInput, ModifierAlt, ModifierControl, ModifierSuper, and UI.

Referenced by InitGameCallbacks().

int HandleKeyModifiersDown ( unsigned  key,
unsigned  keychar 
)

Update KeyModifiers if a key is released.

Update KeyModifiers if a key is pressed.

Parameters:
key Key scancode.
keychar Character code.
Returns:
1 if modifier found, 0 otherwise

Definition at line 907 of file interface.cpp.

References _, GameRunning, IfaceStateNormal, InterfaceState, KeyModifiers, ModifierAlt, ModifierControl, ModifierShift, ModifierSuper, Screenshot(), SelectedUnitChanged(), and SetMessage().

Referenced by EditorCallbackKeyDown(), HandleKeyDown(), MenuHandleKeyDown(), MenuHandleKeyRepeat(), and PatchEditorCallbackKeyDown().

int HandleKeyModifiersUp ( unsigned  key,
unsigned  keychar 
)

Called if a key is pressed.

Update KeyModifiers if a key is released.

Parameters:
key Key scancode.
keychar Character code.
Returns:
1 if modifier found, 0 otherwise

Definition at line 953 of file interface.cpp.

References IfaceStateNormal, InterfaceState, KeyModifiers, ModifierAlt, ModifierControl, ModifierShift, ModifierSuper, and SelectedUnitChanged().

Referenced by EditorCallbackKeyUp(), HandleKeyUp(), MenuHandleKeyUp(), and PatchEditorCallbackKeyUp().

void HandleKeyRepeat ( unsigned  key,
unsigned  keychar 
)

Handle key up.

Parameters:
key Key scancode.
keychar Character code.

Definition at line 1082 of file interface.cpp.

References InputKey(), KeyState, and KeyStateInput.

Referenced by InitGameCallbacks().

void HandleKeyUp ( unsigned  key,
unsigned  keychar 
)

Called when a key is repeated.

Handle key up.

Parameters:
key Key scancode.
keychar Character code.

Definition at line 1048 of file interface.cpp.

References HandleKeyModifiersUp(), KeyScrollState, ScrollDown, ScrollLeft, ScrollRight, and ScrollUp.

Referenced by InitGameCallbacks().

void HandleMouseMove ( int  x,
int  y 
)

Called if the mouse exits the game window (only for some videomodes).

Handle movement of the cursor.

Parameters:
x screen pixel X position.
y screen pixel Y position.

Definition at line 1173 of file interface.cpp.

References HandleCursorMove(), and UIHandleMouseMove().

Referenced by DoScrollArea(), and InitGameCallbacks().

int HandleMouseScrollArea ( int  x,
int  y 
)

static int InputKey ( int  key  )  [static]

void InputKeyButtonPress ( const EventCallback callbacks,
unsigned  ticks,
unsigned  ikey,
unsigned  ikeychar 
)

Handle keyboard key press.

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system
ikey Key scancode.
ikeychar Character code.

Definition at line 1368 of file interface.cpp.

References KeyModifiers, _event_callback_::KeyPressed, and ModifierDoublePress.

void InputKeyButtonRelease ( const EventCallback callbacks,
unsigned  ticks,
unsigned  ikey,
unsigned  ikeychar 
)

Handle keyboard key release.

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system
ikey Key scancode.
ikeychar Character code.

Definition at line 1391 of file interface.cpp.

References _event_callback_::KeyReleased.

void InputKeyTimeout ( const EventCallback callbacks,
unsigned  ticks 
)

Called each frame to handle keyboard timeouts.

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system

Definition at line 1407 of file interface.cpp.

References _event_callback_::KeyRepeated.

void InputMouseButtonPress ( const EventCallback callbacks,
unsigned  ticks,
unsigned  button 
)

Called if any mouse button is pressed down

Handles event conversion to double click, dragging, hold.

FIXME: dragging is not supported.

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system
button Mouse button pressed.

Definition at line 1231 of file interface.cpp.

References _event_callback_::ButtonPressed, ClickedMouseState, InitialMouseState, MouseButtons, MouseDoubleShift, and MouseState.

void InputMouseButtonRelease ( const EventCallback callbacks,
unsigned  ticks,
unsigned  button 
)

Called if any mouse button is released up

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system
button Mouse button released.

Definition at line 1264 of file interface.cpp.

References _event_callback_::ButtonReleased, ClickedMouseState, InitialMouseState, MouseButtons, MouseDoubleShift, MouseDragShift, MouseHoldShift, and MouseState.

void InputMouseExit ( const EventCallback callbacks,
unsigned  ticks 
)

Called if the mouse exits the game window (when supported by videomode)

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system

Definition at line 1323 of file interface.cpp.

References _event_callback_::MouseExit.

void InputMouseMove ( const EventCallback callbacks,
unsigned  ticks,
int  x,
int  y 
)

Called if the mouse is moved

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system
x X movement
y Y movement

Definition at line 1303 of file interface.cpp.

References InitialMouseState, _event_callback_::MouseMoved, and MouseState.

void InputMouseTimeout ( const EventCallback callbacks,
unsigned  ticks 
)

Called each frame to handle mouse timeouts.

Parameters:
callbacks Callback structure for events.
ticks Denotes time-stamp of video-system

Definition at line 1336 of file interface.cpp.

References _event_callback_::ButtonPressed, InitialMouseState, MouseButtons, MouseHoldShift, and MouseState.

static bool IsKeyPad ( unsigned  key,
unsigned *  kp 
) [static]

Check if a key is from the keypad and convert to ascii

Definition at line 985 of file interface.cpp.

Referenced by HandleKeyDown().

static void Screenshot ( void   )  [static]

Save a screenshot.

Definition at line 882 of file interface.cpp.

References CL_OPEN_READ, CFile::close(), CFile::open(), SaveScreenshotPNG(), and sprintf_s().

Referenced by HandleKeyModifiersDown().

void SetDoubleClickDelay ( int  delay  ) 

Get hold click delay.

Set double click delay

Parameters:
delay Double click delay

Definition at line 1428 of file interface.cpp.

Referenced by tolua_stratagus_SetDoubleClickDelay00().

void SetHoldClickDelay ( int  delay  ) 

Toggle pause mode.

Set hold click delay

Parameters:
delay Hold click delay

Definition at line 1446 of file interface.cpp.

Referenced by tolua_stratagus_SetHoldClickDelay00().

static void ShowInput ( void   )  [static]

static void UiAddGroupToSelection ( unsigned  group  )  [static]

Add group to current selection.

Parameters:
group Group number to add.

Definition at line 191 of file interface.cpp.

References GetNumberUnitsOfGroup(), GetUnitsOfGroup(), NumUnits, Selected, SelectionChanged(), and SelectUnit().

Referenced by CommandKey().

static void UiAddToGroup ( unsigned  group  )  [static]

Add to group. The current selected units are added to the group.

Parameters:
group Group number to be expanded.

Definition at line 236 of file interface.cpp.

References AddToGroup(), NumSelected, and Selected.

Referenced by CommandKey().

static void UiBeginInput ( void   )  [static]

Begin input.

Definition at line 122 of file interface.cpp.

References ClearCosts(), Input, InputIndex, KeyState, KeyStateInput, and ShowInput().

Referenced by CommandKey().

static void UiCenterOnGroup ( unsigned  group  )  [static]

Center on group.

Parameters:
group Group number to center on.
Todo:
Improve this function, try to show all selected units or the most possible units.

Definition at line 153 of file interface.cpp.

References CViewport::Center(), GetNumberUnitsOfGroup(), GetUnitsOfGroup(), CUserInterface::SelectedViewport, TileSizeX, TileSizeY, UI, CUnit::X, CUnit::Y, and y.

Referenced by CommandKey().

static void UiCenterOnSelected ( void   )  [static]

Center on the selected units.

Todo:
Improve this function, try to show all selected units or the most possible units.

Definition at line 376 of file interface.cpp.

References CViewport::Center(), NumSelected, Selected, CUserInterface::SelectedViewport, TileSizeX, TileSizeY, UI, CUnit::X, CUnit::Y, and y.

Referenced by CommandKey().

static void UiDecreaseGameSpeed ( void   )  [static]

Decrease game speed.

Definition at line 354 of file interface.cpp.

References _, FastForwardCycle, GameCycle, CStatusLine::Set(), SetVideoSync(), CUserInterface::StatusLine, UI, and VideoSyncSpeed.

Referenced by CommandKey().

static void UiDefineGroup ( unsigned  group  )  [static]

Define a group. The current selected units become a new group.

Parameters:
group Group number to create.

Definition at line 226 of file interface.cpp.

References NumSelected, Selected, and SetGroup().

Referenced by CommandKey().

static void UiFindIdleWorker ( void   )  [static]

static void UiIncreaseGameSpeed ( void   )  [static]

Increase game speed.

Definition at line 341 of file interface.cpp.

References _, FastForwardCycle, GameCycle, CStatusLine::Set(), SetVideoSync(), CUserInterface::StatusLine, UI, and VideoSyncSpeed.

Referenced by CommandKey().

static void UiRecallMapPosition ( unsigned  position  )  [static]

Recall map position.

Parameters:
position Map position slot.

Definition at line 409 of file interface.cpp.

References SavedMapPositionX, SavedMapPositionY, CUserInterface::SelectedViewport, CViewport::Set(), TileSizeX, TileSizeY, and UI.

Referenced by CommandKey().

static void UiSaveMapPosition ( unsigned  position  )  [static]

Save current map position.

Parameters:
position Map position slot.

Definition at line 398 of file interface.cpp.

References CViewport::MapX, CViewport::MapY, SavedMapPositionX, SavedMapPositionY, CUserInterface::SelectedViewport, and UI.

Referenced by CommandKey().

static void UiSelectGroup ( unsigned  group  )  [static]

Select group.

Parameters:
group Group number to select.

Definition at line 180 of file interface.cpp.

References SelectGroup(), and SelectionChanged().

Referenced by CommandKey().

static void UiToggleBigMap ( void   )  [static]

Toggle big map mode.

Todo:
FIXME: We should try to keep the same view, if possible

Definition at line 304 of file interface.cpp.

References _, BigMapMode, CMapArea::EndX, CMapArea::EndY, CVideo::Height, CUserInterface::MapArea, CStatusLine::Set(), SetViewportMode(), CUserInterface::StatusLine, UI, Video, CUserInterface::ViewportMode, CVideo::Width, CMapArea::X, and CMapArea::Y.

Referenced by CommandKey().

static void UiToggleGrabMouse ( void   )  [static]

Toggle grab mouse on/off.

Definition at line 450 of file interface.cpp.

References _, _C_, DebugPrint, KeyModifiers, CStatusLine::Set(), CUserInterface::StatusLine, ToggleGrabMouse(), and UI.

Referenced by CommandKey().

static void UiToggleMusic ( void   )  [static]

Toggle music on / off.

Definition at line 269 of file interface.cpp.

References _, GetMusicVolume(), CStatusLine::Set(), SetMusicVolume(), SoundEnabled(), CUserInterface::StatusLine, and UI.

Referenced by CommandKey().

void UiTogglePause ( void   ) 

Handle cheats.

Toggle pause on / off.

Definition at line 287 of file interface.cpp.

References _, GamePaused, IsNetworkGame, CStatusLine::Set(), CUserInterface::StatusLine, and UI.

Referenced by CommandKey(), and SdlDoEvent().

static void UiToggleSound ( void   )  [static]

static void UiToggleTerrain ( void   )  [static]

Toggle terrain display on/off.

Definition at line 418 of file interface.cpp.

References _, CUserInterface::Minimap, CStatusLine::Set(), CUserInterface::StatusLine, UI, and CMinimap::WithTerrain.

Referenced by CommandKey().

static void UiTrackUnit ( void   )  [static]

Track unit, the viewport follows the unit.

Definition at line 460 of file interface.cpp.

References Selected, CUserInterface::SelectedViewport, UI, and CViewport::Unit.

Referenced by CommandKey().

static void UiUnselectAll ( void   )  [static]

Unselect all currently selected units.

Definition at line 138 of file interface.cpp.

References NetworkSendSelection(), SelectionChanged(), and UnSelectAll().

Referenced by CommandKey().


Variable Documentation

char BigMapMode

Show only the map.

pressed mouse buttons (normal,double,dragged,long)

Definition at line 91 of file interface.cpp.

Referenced by HandleMouseOn(), UiToggleBigMap(), and UpdateDisplay().

std::string DefaultGroupKeys = "0123456789`"

Default group keys.

Definition at line 85 of file interface.cpp.

int DoubleClickDelay = 300

Time to detect double clicks.

Time to detect hold clicks.

Definition at line 1206 of file interface.cpp.

unsigned DoubleKey [static]

last key pressed

Definition at line 1358 of file interface.cpp.

Observe mode.

Flag telling not to advance to the next game cycle.

Definition at line 89 of file interface.cpp.

Referenced by CleanReplayLog(), DoSelectionButtons(), HandleKeyDown(), InputKey(), LoadReplay(), ReplayEachCycle(), tolua_get_GameObserve(), tolua_set_GameObserve(), UIHandleButtonDown(), and UISelectStateButtonDown().

bool GamePaused

bool GodMode

Invincibility cheat.

Whether the map is the only thing displayed or not.

Definition at line 93 of file interface.cpp.

Referenced by CclGetGodMode(), CclSetGodMode(), GameMainLoop(), HitUnit(), and SaveCcl().

int HoldClickDelay = 1000

Time to detect hold clicks.

Definition at line 1207 of file interface.cpp.

int HoldKeyAdditionalDelay = 50 [static]

Time to detect additional hold key.

Definition at line 1353 of file interface.cpp.

int HoldKeyDelay = 250 [static]

Time to detect hold key.

Definition at line 1352 of file interface.cpp.

char Input[80] [static]

line input for messages/long commands

Definition at line 82 of file interface.cpp.

Referenced by InputKey(), ShowInput(), and UiBeginInput().

int InputIndex [static]

current index into input

Definition at line 83 of file interface.cpp.

Referenced by InputKey(), and UiBeginInput().

char InputStatusLine[99] [static]

Last input status line.

Definition at line 84 of file interface.cpp.

Referenced by ShowInput().

Current interface state.

current scroll state of keyboard

Definition at line 92 of file interface.cpp.

Referenced by EditorMainLoop(), HandleKeyModifiersDown(), HandleKeyModifiersUp(), MenuLoop(), NetworkParseSetupEvent(), and StartMap().

current key state

pointer to unit under the cursor

Definition at line 94 of file interface.cpp.

Referenced by CStatusLine::Clear(), CButtonPanel::Draw(), DrawPieMenu(), HandleKeyDown(), HandleKeyRepeat(), InputKey(), CStatusLine::Set(), ShowInput(), and UiBeginInput().

unsigned LastIKey [static]

last key handled

Definition at line 1355 of file interface.cpp.

unsigned LastIKeyChar [static]

last keychar handled

Definition at line 1356 of file interface.cpp.

unsigned LastKeyTicks [static]

Ticks of last key.

Definition at line 1357 of file interface.cpp.

unsigned LastMouseButton [static]

last mouse button handled

Definition at line 1216 of file interface.cpp.

unsigned LastMouseTicks [static]

Ticks of last mouse event.

Definition at line 1218 of file interface.cpp.

enum { ... } MouseState [static]

int MouseX [static]

Last mouse X position.

Definition at line 1214 of file interface.cpp.

int MouseY [static]

Last mouse Y position.

Definition at line 1215 of file interface.cpp.

int SavedMapPositionX[3] [static]

Saved map position X.

Definition at line 80 of file interface.cpp.

Referenced by UiRecallMapPosition(), and UiSaveMapPosition().

int SavedMapPositionY[3] [static]

Saved map position Y.

Definition at line 81 of file interface.cpp.

Referenced by UiRecallMapPosition(), and UiSaveMapPosition().

Skip the next game cycle.

Invincibility cheat.

Definition at line 90 of file interface.cpp.

Referenced by GameMainLoop(), and WaitEventsOneFrame().

unsigned StartMouseTicks [static]

Ticks of first click.

Definition at line 1217 of file interface.cpp.

Up to 11 keys, last unselect. Default for qwerty.

Up to 11 keys used for group selection.

Definition at line 86 of file interface.cpp.

Referenced by CclSetGroupKeys(), and CommandKey().


Generated on Sat Feb 21 00:28:16 2009 for Bos Wars by  doxygen 1.5.6