HoverRace  2.0
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
HoverRace::Client::HoverScript::HudPeer Class Reference

Scripting peer for access to the HUD for a player. More...

#include <HudPeer.h>

+ Inheritance diagram for HoverRace::Client::HoverScript::HudPeer:

Public Member Functions

 HudPeer (Script::Core &scripting, Display::Display &display, std::weak_ptr< Display::Hud > hud)
 
virtual ~HudPeer ()
 
std::shared_ptr< Display::ChronometerLAddChronometer (int align, const std::string &title, std::shared_ptr< Util::Clock > clock)
 
std::shared_ptr< Display::CounterLAddCounter_V (int align, const std::string &title, double initValue)
 
std::shared_ptr< Display::CounterLAddCounter_VT (int align, const std::string &title, double initValue, double total)
 
template<class T >
std::shared_ptr< T > LAddDecor (int align)
 
std::shared_ptr< Display::HudTextLAddText (int align, const std::string &text)
 
void LClear ()
 
void LUseRaceDefault ()
 
- Public Member Functions inherited from HoverRace::Script::Peer
 Peer (Core &scripting, const std::string &name)
 
 Peer (const Peer &)=delete
 
virtual ~Peer ()
 
CoreGetScripting () const
 
void LHelp ()
 
void LHelp_M (const std::string &methodName)
 
Peeroperator= (const Peer &)=delete
 

Static Public Member Functions

static void Register (Script::Core &scripting)
 Register this peer in an environment. More...
 
- Static Public Member Functions inherited from HoverRace::Script::Peer
static void Register (Core &scripting)
 

Private Types

using HudAlignment = Display::Hud::HudAlignment
 
using SUPER = Script::Peer
 

Private Member Functions

HudAlignment::type ValidateAlignment (int align)
 Convert an int into an alignment value, raising a Lua error if the the value is out of range. More...
 

Private Attributes

Display::Displaydisplay
 
std::weak_ptr< Display::Hudhud
 

Detailed Description

Scripting peer for access to the HUD for a player.

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Client::HoverScript::HudPeer::HudPeer ( Script::Core scripting,
Display::Display display,
std::weak_ptr< Display::Hud hud 
)
virtual HoverRace::Client::HoverScript::HudPeer::~HudPeer ( )
inlinevirtual

Member Function Documentation

std::shared_ptr< Display::Chronometer > HoverRace::Client::HoverScript::HudPeer::LAddChronometer ( int  align,
const std::string &  title,
std::shared_ptr< Util::Clock clock 
)
std::shared_ptr< Display::Counter > HoverRace::Client::HoverScript::HudPeer::LAddCounter_V ( int  align,
const std::string &  title,
double  initValue 
)
std::shared_ptr< Display::Counter > HoverRace::Client::HoverScript::HudPeer::LAddCounter_VT ( int  align,
const std::string &  title,
double  initValue,
double  total 
)
template<class T >
std::shared_ptr<T> HoverRace::Client::HoverScript::HudPeer::LAddDecor ( int  align)
inline
std::shared_ptr< Display::HudText > HoverRace::Client::HoverScript::HudPeer::LAddText ( int  align,
const std::string &  text 
)
void HoverRace::Client::HoverScript::HudPeer::LClear ( )
void HoverRace::Client::HoverScript::HudPeer::LUseRaceDefault ( )
void HoverRace::Client::HoverScript::HudPeer::Register ( Script::Core scripting)
static

Register this peer in an environment.

Parameters
scriptingThe target environment.
HudAlignment::type HoverRace::Client::HoverScript::HudPeer::ValidateAlignment ( int  align)
inlineprivate

Convert an int into an alignment value, raising a Lua error if the the value is out of range.

Parameters
alignThe alignment value passed from Lua.
Returns
The HUD alignment.

Member Data Documentation

Display::Display& HoverRace::Client::HoverScript::HudPeer::display
private
std::weak_ptr<Display::Hud> HoverRace::Client::HoverScript::HudPeer::hud
private

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