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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
CDecoVar Class Referenceabstract

#include <unittype.h>

Inheritance diagram for CDecoVar:
CDecoVarBar CDecoVarSpriteBar CDecoVarStaticSprite CDecoVarText

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

Public Attributes

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

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 ( )
inlinevirtual

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 CDecoVarStaticSprite, CDecoVarSpriteBar, CDecoVarText, and CDecoVarBar.

Member Data Documentation

bool CDecoVar::HideAllied

if true, don't show for neutral unit.

bool CDecoVar::HideHalf

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

bool CDecoVar::HideNeutral

if true, show only for selected units.

unsigned int CDecoVar::Index
bool CDecoVar::IsCenteredInX

Percent offset (TileHeight) in Y coord.

bool CDecoVar::IsCenteredInY

if true, use center of deco instead of left border

int CDecoVar::OffsetX

Index of the variable.

See also
DefineVariables
int CDecoVar::OffsetXPercent

Offset in Y coord.

int CDecoVar::OffsetY

Offset in X coord.

int CDecoVar::OffsetYPercent

Percent offset (TileWidth) in X coord.

bool CDecoVar::ShowIfNotEnable

if true, use center of deco instead of upper border

bool CDecoVar::ShowOnlySelected

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

bool CDecoVar::ShowOpponent

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

bool CDecoVar::ShowWhenMax

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

bool CDecoVar::ShowWhenNull

if false, Show only if var is enable


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.