$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

CCursor Class Reference

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

#include <cursor.h>

List of all members.


Public Member Functions

 CCursor ()

Public Attributes

std::string Ident
std::string Race
 Identifier to reference it.
int HotX
 Race name.
int HotY
 Hot point x.
int SpriteFrame
 Hot point y.
int FrameRate
 Current displayed cursor frame.
CGraphicG
 Rate of changing the frames.

Detailed Description

Private type which specifies the cursor-type.

#include "cursor.h"

This structure contains all informations 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::HotX CCursor::HotY

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 (  )  [inline]


Member Data Documentation

std::string CCursor::Ident

std::string CCursor::Race

Identifier to reference it.

Race name.

Hot point x.

Hot point y.

Current displayed cursor frame.

Rate of changing the frames.


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