MouseInfo Class Reference
[Engine Module]

#include <mouseinfo.h>

List of all members.

Protected Types

enum  CursorType {
  CURSOR_ARROW, CURSOR_SELECT, CURSOR_ADD_REMOVE, CURSOR_CAN_MOVE,
  CURSOR_CAN_ATTACK, CURSOR_CAN_MINE, CURSOR_CAN_REPAIR, CURSOR_CAN_BUILD,
  CURSOR_CANT_MOVE, CURSOR_CANT_ATTACK, CURSOR_CANT_MINE, CURSOR_CANT_REPAIR,
  CURSOR_CANT_BUILD, CURSOR_POINT, CURSOR_HIDE, CURSOR_EJECT,
  CURSOR_COUNT
}

Protected Member Functions

 MouseInfo ()
void AddCursor (CursorType type, const string &model_file)
void SetCursor (CursorType type)
void UpdatePickUnit (const Map *map)
void UpdateCursor (const Map *map, const PlayerMap *player_map, const Selection *selection)
void RenderSelectionRectangle (const Map *map)
void OnLeftKeyDown (const Map *map)
void OnLeftKeyUp (const Map *map, Selection *selection)
void OnRightKeyDown (Selection *selection)
void Reset ()
bool IsRectActive () const

Static Protected Member Functions

static const string & GetCursorName (CursorType type)

Private Attributes

CursorType cursor_type
Unitpick_unit
 Unit currently under mouse cursor.
MapPosition3D map_position
bool rect_active
bool rect_select
vector2 rect_corner
byte_t cursor_id [CURSOR_COUNT]
 Array of cursor identifiers that belong to each cursor type.

Static Private Attributes

static const string cursor_name [CURSOR_COUNT]
 Array of cursor names that belong to each cursor type.

Friends

class Game


Member Enumeration Documentation

enum MouseInfo::CursorType [protected]

Enumerator:
CURSOR_ARROW 
CURSOR_SELECT 
CURSOR_ADD_REMOVE 
CURSOR_CAN_MOVE 
CURSOR_CAN_ATTACK 
CURSOR_CAN_MINE 
CURSOR_CAN_REPAIR 
CURSOR_CAN_BUILD 
CURSOR_CANT_MOVE 
CURSOR_CANT_ATTACK 
CURSOR_CANT_MINE 
CURSOR_CANT_REPAIR 
CURSOR_CANT_BUILD 
CURSOR_POINT 
CURSOR_HIDE 
CURSOR_EJECT 
CURSOR_COUNT 


Constructor & Destructor Documentation

MouseInfo::MouseInfo (  )  [protected]


Member Function Documentation

void MouseInfo::AddCursor ( CursorType  type,
const string &  model_file 
) [protected]

void MouseInfo::SetCursor ( CursorType  type  )  [protected]

void MouseInfo::UpdatePickUnit ( const Map map  )  [protected]

void MouseInfo::UpdateCursor ( const Map map,
const PlayerMap player_map,
const Selection selection 
) [protected]

void MouseInfo::RenderSelectionRectangle ( const Map map  )  [protected]

void MouseInfo::OnLeftKeyDown ( const Map map  )  [protected]

void MouseInfo::OnLeftKeyUp ( const Map map,
Selection selection 
) [protected]

void MouseInfo::OnRightKeyDown ( Selection selection  )  [protected]

Todo:
Start building.

void MouseInfo::Reset (  )  [protected]

bool MouseInfo::IsRectActive (  )  const [inline, protected]

const string & MouseInfo::GetCursorName ( CursorType  type  )  [inline, static, protected]


Friends And Related Function Documentation

friend class Game [friend]


Member Data Documentation

CursorType MouseInfo::cursor_type [private]

Unit* MouseInfo::pick_unit [private]

Unit currently under mouse cursor.

MapPosition3D MouseInfo::map_position [private]

bool MouseInfo::rect_active [private]

bool MouseInfo::rect_select [private]

vector2 MouseInfo::rect_corner [private]

byte_t MouseInfo::cursor_id[CURSOR_COUNT] [private]

Array of cursor identifiers that belong to each cursor type.

const string MouseInfo::cursor_name [static, private]

Initial value:

 
{
        "arrow",
        "select",
        "add-remove",
        "can-move",
        "can-attack",
        "can-mine",
        "can-repair",
        "can-build",
        "cant-move",
        "cant-attack",
        "cant-mine",
        "cant-repair",
        "cant-build",
        "point",
        "hide",
        "eject"
}
Array of cursor names that belong to each cursor type.


The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:33 2007 for Dark Oberon by  doxygen 1.5.3