_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          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
CDecoVarBar Class Reference

#include <unittype.h>

Inheritance diagram for CDecoVarBar:
CDecoVar

Public Member Functions

 CDecoVarBar ()
 
unit_draw.cpp - The draw routines for units.
virtual void Draw (int x, int y, const CUnitType &type, const CVariable &var) const
 
- Public Member Functions inherited from CDecoVar
 CDecoVar ()
 
virtual ~CDecoVar ()
 
bool BoolFlagMatches (const CUnitType &type) const
 Check if this decoration defines a condition on boolean flags and if so, if that condition matches. More...
 

Public Attributes

bool IsVertical
 
bool SEToNW
 if true, vertical bar, else horizontal. More...
 
int Height
 (SouthEastToNorthWest), if false value 0 is on the left or up of the bar. More...
 
int Width
 Height of the bar. More...
 
bool ShowFullBackground
 Width of the bar. More...
 
bool Invert
 if true, show background like value equal to max. More...
 
int MinValue
 if true, invert length More...
 
int MaxValue
 show only above percent More...
 
char BorderSize
 show only below percent More...
 
IntColor Color
 Size of the border, 0 for no border. More...
 
IntColor BColor
 Color of bar. More...
 
- Public Attributes inherited from CDecoVar
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...
 
bool BoolFlagInvert
 if true, show for opponent unit. More...
 
int BoolFlag
 if 1, invert the bool flag check More...
 

Constructor & Destructor Documentation

◆ CDecoVarBar()

CDecoVarBar::CDecoVarBar ( )
inline

Member Function Documentation

◆ Draw()

void CDecoVarBar::Draw ( int  x,
int  y,
const CUnitType type,
const CVariable var 
) const
virtual

Draw bar for variables.

Parameters
xX screen pixel position
yY screen pixel position
unitUnit pointer
Todo:
fix color configuration.

Implements CDecoVar.

Member Data Documentation

◆ BColor

IntColor CDecoVarBar::BColor

Color of bar.

◆ BorderSize

char CDecoVarBar::BorderSize

show only below percent

◆ Color

IntColor CDecoVarBar::Color

Size of the border, 0 for no border.

◆ Height

int CDecoVarBar::Height

(SouthEastToNorthWest), if false value 0 is on the left or up of the bar.

◆ Invert

bool CDecoVarBar::Invert

if true, show background like value equal to max.

◆ IsVertical

bool CDecoVarBar::IsVertical

◆ MaxValue

int CDecoVarBar::MaxValue

show only above percent

◆ MinValue

int CDecoVarBar::MinValue

if true, invert length

◆ SEToNW

bool CDecoVarBar::SEToNW

if true, vertical bar, else horizontal.

◆ ShowFullBackground

bool CDecoVarBar::ShowFullBackground

Width of the bar.

◆ Width

int CDecoVarBar::Width

Height of the bar.


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.