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

Classes
cursor.h File Reference
#include <SDL.h>
#include <vec2i.h>

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...
 
CursorStates CursorState
 
int CursorAction
 current cursor state (point,...) More...
 
int CursorValue
 action for selection More...
 
CUnitTypeCursorBuilding
 value for action (spell type f.e.) More...
 
std::string CustomCursor
 building cursor More...
 
CCursorGameCursor
 custom cursor for button More...
 
PixelPos CursorScreenPos
 cursor-type More...
 
PixelPos CursorStartScreenPos
 cursor position on screen More...
 
PixelPos CursorStartMapPos
 rectangle started on screen More...
 
void LoadCursors (const std::string &racename)
 the same in screen map coordinate system More...
 
CCursorCursorByIdent (const std::string &ident)
 Cursor by identifier. More...
 
void DrawCursor ()
 Draw any cursor. More...
 
void HideCursor ()
 Hide the cursor. More...
 
void CursorAnimate (unsigned ticks)
 Animate the cursor. More...
 
void InitVideoCursors ()
 Initialize the cursor module. More...
 
void CleanCursors ()
 Cleanup the cursor module. More...
 
void CursorCclRegister ()
 

Enumeration Type Documentation

◆ CursorStates

Cursor state.

Enumerator
CursorStatePoint 
CursorStateSelect 

Normal cursor.

CursorStateRectangle 

Select position.

CursorStatePieMenu 

Rectangle selecting.

Displaying Pie Menu

Function Documentation

◆ CleanCursors()

void CleanCursors ( )

Cleanup the cursor module.

Cleanup cursor module

◆ CursorAnimate()

void CursorAnimate ( unsigned  ticks)

Animate the cursor.

Animate the cursor.

Parameters
ticksCurrent tick

◆ CursorByIdent()

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

Cursor by identifier.

Find the cursor of this identifier.

Parameters
identIdentifier 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.

◆ CursorCclRegister()

void CursorCclRegister ( )

◆ DrawCursor()

void DrawCursor ( )

Draw any cursor.

Draw the cursor.

◆ HideCursor()

void HideCursor ( )

Hide the cursor.

Hide the cursor

◆ InitVideoCursors()

void InitVideoCursors ( )

Initialize the cursor module.

Setup the cursor part.

◆ LoadCursors()

void LoadCursors ( const std::string &  race)

the same in screen map coordinate system

Load all cursors

Load all cursor sprites.

Parameters
raceCursor graphics of this race to load.

Variable Documentation

◆ CursorAction

int CursorAction

current cursor state (point,...)

◆ CursorBuilding

CUnitType* CursorBuilding

value for action (spell type f.e.)

value for action (spell type f.e.)

◆ CursorScreenPos

PixelPos CursorScreenPos

cursor-type

cursor-type

◆ CursorStartMapPos

PixelPos CursorStartMapPos

rectangle started on screen

◆ CursorStartScreenPos

PixelPos CursorStartScreenPos

cursor position on screen

◆ CursorState

CursorStates CursorState

◆ CursorValue

int CursorValue

action for selection

◆ CustomCursor

std::string CustomCursor

building cursor

building cursor

◆ GameCursor

CCursor* GameCursor

custom cursor for button

custom cursor for button

(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.