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

Public Member Functions | Public Attributes | List of all members
CCursor Class Reference

Private type which specifies the cursor-type. More...

#include <cursor.h>

Public Member Functions

 CCursor ()
 
cursor.cpp - The cursors.
 ~CCursor ()
 
SDL_Cursor * GetSDLCursor ()
 Cursor sprite image. More...
 
void Reset ()
 

Public Attributes

std::string Ident
 
std::string Race
 Identifier to reference it. More...
 
PixelPos HotPos
 Race name. More...
 
unsigned int SpriteFrame
 Hot point. More...
 
int FrameRate
 Current displayed cursor frame. More...
 
CGraphicG
 Rate of changing the frames. More...
 

Detailed Description

Private type which specifies the cursor-type.

#include "cursor.h"

This structure contains all information about a cursor. The cursor changes depending of the current user input state. A cursor can have transparent areas and color cycle animated.

The cursor-type structure members:

CCursor::Ident

Unique identifier of the cursor, used to reference it in config files and during startup. Don't use this in game, use instead the pointer to this structure.

CCursor::Race

Owning Race of this cursor ("human", "orc", "alliance", "mythical", ...). If NULL, this cursor could be used by any race.

CCursor::HotPos

Hot spot of the cursor in pixels. Relative to the sprite origin (0,0). The hot spot of a cursor is the point to which Stratagus refers in tracking the cursor's position.

CCursor::SpriteFrame

Current displayed cursor frame. From 0 to CCursor::G::NumFrames.

CCursor::FrameRate

Rate of changing the frames. The "rate" tells the engine how many milliseconds to hold each frame of the animation.

Note
This is the first time that for timing ms are used! I would change it to display frames.

CCursor::G

Contains the sprite of the cursor, loaded from CCursor::File. This can be a multicolor image with alpha or transparency.

Constructor & Destructor Documentation

◆ CCursor()

CCursor::CCursor ( )
inline

◆ ~CCursor()

CCursor::~CCursor ( )

Member Function Documentation

◆ GetSDLCursor()

SDL_Cursor * CCursor::GetSDLCursor ( )

Cursor sprite image.

◆ Reset()

void CCursor::Reset ( )

Member Data Documentation

◆ FrameRate

int CCursor::FrameRate

Current displayed cursor frame.

◆ G

CGraphic* CCursor::G

Rate of changing the frames.

◆ HotPos

PixelPos CCursor::HotPos

Race name.

◆ Ident

std::string CCursor::Ident

◆ Race

std::string CCursor::Race

Identifier to reference it.

◆ SpriteFrame

unsigned int CCursor::SpriteFrame

Hot point.


The documentation for this class was generated from the following files:
(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.