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

CDecoVar Class Reference

#include <unittype.h>

Inheritance diagram for CDecoVar:

CDecoVarBar CDecoVarSpriteBar CDecoVarStaticSprite CDecoVarText

List of all members.


Public Member Functions

 CDecoVar ()
virtual ~CDecoVar ()
virtual void Draw (int x, int y, const CUnitType *Type, const CVariable &var) const =0
 function to draw the decorations.

Public Attributes

unsigned int Index
int OffsetX
 Index of the variable.
int OffsetY
 Offset in X coord.
int OffsetXPercent
 Offset in Y coord.
int OffsetYPercent
 Percent offset (TileWidth) in X coord.
bool IsCenteredInX
 Percent offset (TileHeight) in Y coord.
bool IsCenteredInY
 if true, use center of deco instead of left border
bool ShowIfNotEnable
 if true, use center of deco instead of upper border
bool ShowWhenNull
 if false, Show only if var is enable
bool HideHalf
 if false, don't show if var is null (F.E poison)
bool ShowWhenMax
 if true, don't show when 0 < var < max.
bool ShowOnlySelected
 if false, don't show if var is to max. (Like mana)
bool HideNeutral
 if true, show only for selected units.
bool HideAllied
 if true, don't show for neutral unit.
bool ShowOpponent
 if true, don't show for allied unit. (but show own units)

Detailed Description

Decoration for user defined variable.

It is used to show variables graphicly.

Todo:
add more stuff in this struct.

Constructor & Destructor Documentation

CDecoVar::CDecoVar (  )  [inline]

virtual CDecoVar::~CDecoVar (  )  [inline, virtual]


Member Function Documentation

virtual void CDecoVar::Draw ( int  x,
int  y,
const CUnitType Type,
const CVariable var 
) const [pure virtual]

function to draw the decorations.

Implemented in CDecoVarBar, CDecoVarText, CDecoVarSpriteBar, and CDecoVarStaticSprite.


Member Data Documentation

unsigned int CDecoVar::Index

Index of the variable.

See also:
DefineVariables

Offset in X coord.

Offset in Y coord.

Percent offset (TileWidth) in X coord.

Percent offset (TileHeight) in Y coord.

if true, use center of deco instead of left border

if true, use center of deco instead of upper border

if false, Show only if var is enable

if false, don't show if var is null (F.E poison)

if true, don't show when 0 < var < max.

if false, don't show if var is to max. (Like mana)

if true, show only for selected units.

if true, don't show for neutral unit.

if true, don't show for allied unit. (but show own units)


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