#include <cmpHUD.h>

Public Member Functions | |
| CCmpHUD (CGameEntity *pGE) | |
| Create with default values. | |
Virtual methods | |
| virtual int | set (const EDIT_DATA &editData) |
| Set a value. | |
| virtual int | get (EDIT_DATA &editData) const |
| Get a value. | |
| virtual int | act (const ACTION_DATA &actData) |
| Preform an action. | |
| virtual void | update () |
| Update this Cmp for a single frame. | |
Color methods | |
| void | color (const VECTOR &color) |
| Set the color of this HUD. | |
| const VECTOR & | color () const |
| |
| void | red (const int red) |
| Set red value. | |
| int | red () const |
| Get red value. | |
| void | blue (const int blue) |
| Set blue value. | |
| int | blue () const |
| Get blue value. | |
| void | green (const int green) |
| Set green value. | |
| int | green () const |
| Get green value. | |
Draw methods | |
| void | draw (const char *cstr, int x=0, int y=0) |
| Display a string at the position given. | |
| void | draw (const unit f, int x=0, int y=0) |
| Display a number at the position given. | |
| void | draw (const CVector3D &v, int x=0, int y=0) |
| Display a vector at the position given. | |
| void | draw_bool (const bool b, int x=0, int y=0) |
| Display a bool at the position given. | |
| bool | draw (ENTITY *pEnt, const char *cstr, int x=0, int y=0) |
| Display a string, offset from the ENTITY position. | |
| bool | draw (ENTITY *pEnt, const unit f, int x=0, int y=0) |
| Display a number, offset from the ENTITY position. | |
| bool | draw (ENTITY *pEnt, const CVector3D &v, int x=0, int y=0) |
| Display a vector, offset from the ENTITY position. | |
| bool | draw_bool (ENTITY *pEnt, const bool b, int x=0, int y=0) |
| Display a bool (true or false), offset from the ENTITY position. | |
The HUD displays text, numbers, and images directly to the screen.
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
| int CCmpHUD::set | ( | const EDIT_DATA & | editData | ) | [virtual] |
| int CCmpHUD::get | ( | EDIT_DATA & | editData | ) | const [virtual] |
Get a value.
If we have data of this type, use editData to get its value.
| editData | Data type we are looking for, and memory to store value (see EDIT_DATA struct). |
Implements CCmp.
| int CCmpHUD::act | ( | const ACTION_DATA & | actData | ) | [virtual] |
Preform an action.
Handle the action passed in (ignore if we do not handle the action type).
| actData | The data used to preform the action (see ACTION_DATA struct). |
Implements CCmp.
| void CCmpHUD::color | ( | const VECTOR & | color | ) | [inline] |
Set the color of this HUD.
| color | Acknex VECTOR containing the BGR values |
| void CCmpHUD::draw | ( | const char * | cstr, | |
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a string at the position given.
| cstr | String to be drawn. | |
| x | Screen X position. | |
| y | Screen Y position |
| void CCmpHUD::draw | ( | const unit | f, | |
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a number at the position given.
| f | Unit value to be drawn. | |
| x | Screen X position. | |
| y | Screen Y position |
| void CCmpHUD::draw | ( | const CVector3D & | v, | |
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a vector at the position given.
| v | Vector to be drawn. | |
| x | Screen X position. | |
| y | Screen Y position |
| void CCmpHUD::draw_bool | ( | const bool | b, | |
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a bool at the position given.
| b | Boolean to be drawn. | |
| x | Screen X position. | |
| y | Screen Y position |
| bool CCmpHUD::draw | ( | ENTITY * | pEnt, | |
| const char * | cstr, | |||
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a string, offset from the ENTITY position.
| pEnt | Pointer to the entity whos screen position we will use. | |
| cstr | String to be drawn | |
| x | X offset | |
| y | Y offset |
| bool CCmpHUD::draw | ( | ENTITY * | pEnt, | |
| const unit | f, | |||
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a number, offset from the ENTITY position.
| pEnt | Pointer to the entity whos screen position we will use. | |
| f | Value to be drawn | |
| x | X offset | |
| y | Y offset |
| bool CCmpHUD::draw | ( | ENTITY * | pEnt, | |
| const CVector3D & | v, | |||
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a vector, offset from the ENTITY position.
| pEnt | Pointer to the entity whos screen position we will use. | |
| v | CVector3D to be drawn | |
| x | X offset | |
| y | Y offset |
| bool CCmpHUD::draw_bool | ( | ENTITY * | pEnt, | |
| const bool | b, | |||
| int | x = 0, |
|||
| int | y = 0 | |||
| ) |
Display a bool (true or false), offset from the ENTITY position.
| pEnt | Pointer to the entity whos screen position we will use. | |
| b | True or False | |
| x | X offset | |
| y | Y offset |
1.5.4