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

src/include/cursor.h File Reference

#include <vector>

Go to the source code of this file.


Classes

class  CCursor
 Private type which specifies the cursor-type. More...
class  CursorConfig
 Cursor config reference. More...

cursor.h - The cursors header file.

enum  CursorStates { CursorStatePoint, CursorStateSelect, CursorStateRectangle, CursorStatePieMenu }
 Cursor state. More...
std::vector< CCursor * > AllCursors
CursorStates CursorState
 cursor-types description
int CursorAction
 current cursor state (point,...)
int CursorValue
 action for selection
CUnitTypeCursorBuilding
 value for action (spell type f.e.)
std::string CustomCursor
 building cursor
CCursorGameCursor
 custom cursor for button
int CursorX
 cursor-type
int CursorY
 cursor position on screen X
int CursorStartX
 cursor position on screen Y
int CursorStartY
 rectangle started on screen X
int CursorStartScrMapX
 rectangle started on screen Y
int CursorStartScrMapY
 the same in screen map coordinate system
void LoadCursors (const std::string &racename)
 the same in screen map coordinate system
CCursorCursorByIdent (const std::string &ident)
 Cursor by identifier.
void DrawCursor ()
 Draw any cursor.
void HideCursor ()
 Hide the cursor.
void CursorAnimate (unsigned ticks)
 Animate the cursor.
void InitVideoCursors ()
 Initialize the cursor module.
void CleanCursors ()
 Cleanup the cursor module.

Enumeration Type Documentation

Cursor state.

Enumerator:
CursorStatePoint 
CursorStateSelect  Normal cursor.
CursorStateRectangle  Select position.
CursorStatePieMenu  Rectangle selecting.

Displaying Pie Menu


Function Documentation

void CleanCursors (  ) 

Cleanup the cursor module.

Cleanup cursor module

void CursorAnimate ( unsigned  ticks  ) 

Animate the cursor.

Animate the cursor.

Parameters:
ticks Current tick

CCursor* CursorByIdent ( const std::string &  ident  ) 

Cursor by identifier.

Find the cursor of this identifier.

Parameters:
ident Identifier for the cursor (from config files).
Returns:
Returns the matching cursor.
Note:
If we have more cursors, we should add hash to find them faster.

void DrawCursor (  ) 

Draw any cursor.

Draw the cursor.

void HideCursor (  ) 

Hide the cursor.

Hide the cursor

void InitVideoCursors (  ) 

Initialize the cursor module.

Setup the cursor part.

void LoadCursors ( const std::string &  race  ) 

the same in screen map coordinate system

Load all cursors

Load all cursor sprites.

Parameters:
race Cursor graphics of this race to load.


Variable Documentation

std::vector<CCursor*> AllCursors

Define cursor-types.

Todo:
FIXME: Should this be move to ui part?

current cursor state (point,...)

value for action (spell type f.e.)

rectangle started on screen Y

X position of starting point of selection rectangle, in screen pixels.

the same in screen map coordinate system

cursor position on screen Y

rectangle started on screen X

cursor-types description

action for selection

int CursorX

cursor-type

int CursorY

cursor position on screen X

std::string CustomCursor

building cursor

custom cursor for button

(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.