mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
HudLoadBar Class Reference

A bar that can show a current value in a given range. More...

#include <HudLoadBar.h>

Public Member Functions

 HudLoadBar (void)
 
 HudLoadBar (float min, float max, float current)
 
 ~HudLoadBar (void)
 
void draw ()
 
void draw (int x, int y, int width, int height)
 
void setCurrent (float current)
 
void setMax (float max)
 
void setMin (float min)
 
void setSlopePixel (int pixel)
 

Detailed Description

A bar that can show a current value in a given range.

The bar is displayed in 2d on top of the image and supports transparency. The bar is colored from green to red, showing how near the value is to the maximum or minimum. 0 is green, min and max are red, if they are different from 0.

Definition at line 14 of file HudLoadBar.h.

Constructor & Destructor Documentation

HudLoadBar::HudLoadBar ( void  )

Definition at line 12 of file HudLoadBar.cpp.

HudLoadBar::HudLoadBar ( float  min,
float  max,
float  current 
)

Definition at line 20 of file HudLoadBar.cpp.

HudLoadBar::~HudLoadBar ( void  )

Definition at line 34 of file HudLoadBar.cpp.

Member Function Documentation

void HudLoadBar::draw ( void  )

Definition at line 37 of file HudLoadBar.cpp.

void HudLoadBar::draw ( int  x,
int  y,
int  width,
int  height 
)

Definition at line 41 of file HudLoadBar.cpp.

void HudLoadBar::setCurrent ( float  current)

Definition at line 62 of file HudLoadBar.cpp.

void HudLoadBar::setMax ( float  max)

Definition at line 72 of file HudLoadBar.cpp.

void HudLoadBar::setMin ( float  min)

Definition at line 80 of file HudLoadBar.cpp.

void HudLoadBar::setSlopePixel ( int  pixel)

Definition at line 88 of file HudLoadBar.cpp.


The documentation for this class was generated from the following files: