Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes

game::Hud Class Reference

Game-related HUD widgets. More...

#include <_src_game_hud.hh>

List of all members.

Classes

struct  TargetIndicator
 Target indicator box (graphical object). More...

Public Member Functions

 DEFINE_GetInstance (Hud) void AttachTarget(shptr< Object > target
void DetachTarget (shptr< Object > target)
void SelectTarget (shptr< Object > target, const bool radarLock)
void DeselectTarget (void)
void RemoveRadarLock (void)

Public Attributes

const string & text

Private Types

typedef std::map< shptr
< Object >, TargetIndicator
TargetIndicatorMap

Private Member Functions

 Hud (void)
 ~Hud ()
void Tick (const Milliseconds millisecElapsed)
void SetTargetIndicator (shptr< Object > object, const RGBA color, const bool drawX)

Private Attributes

CLASS_DESTROY_OBJECT_LISTENER(Hud,
mHud) private shptr< Object
mDummyTarget
 Timer-tick.
shptr< ObjectmSelectedTarget
TargetIndicatorMap mTargetIndicatorMap
 maps an Object to a TargetIndicator box
shptr< TickFunctormTickFunctor
shptr< DestroyObjectListener > mDestroyObjectListener
 listen for the destroying of trail-maker Object

Detailed Description

Game-related HUD widgets.


Member Typedef Documentation


Constructor & Destructor Documentation

game::Hud::Hud ( void   )  [private]

ctor/dtor.

game::Hud::~Hud (  )  [private]

Member Function Documentation

game::Hud::DEFINE_GetInstance ( Hud   ) 
void game::Hud::DeselectTarget ( void   ) 

Deselect all targets.

void game::Hud::DetachTarget ( shptr< Object target  ) 

Detach target. NOP if target isn't contained in this HUD.

void game::Hud::RemoveRadarLock ( void   ) 

Remove radar lock indicator.

void game::Hud::SelectTarget ( shptr< Object target,
const bool  radarLock 
)

Select a target. Represented in HUD as a "target indicator box".

void game::Hud::SetTargetIndicator ( shptr< Object object,
const RGBA  color,
const bool  drawX 
) [private]

Set attributes of TargetIndicator (graphical object).

Parameters:
object Object mapped to target-indicator box.
color 
drawX Draw an X over box.
void game::Hud::Tick ( const Milliseconds  millisecElapsed  )  [private]

Updates the target boxes.


Member Data Documentation

shptr<DestroyObjectListener> game::Hud::mDestroyObjectListener [private]

listen for the destroying of trail-maker Object

CLASS_DESTROY_OBJECT_LISTENER ( Hud, mHud ) private shptr<Object> game::Hud::mDummyTarget [private]

Timer-tick.

to indicate no selected target

maps an Object to a TargetIndicator box

const string& game::Hud::text

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:11