TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
TurtleBrainsExpress::Counters::Counter Class Reference
Inheritance diagram for TurtleBrainsExpress::Counters::Counter:
TurtleBrains::Graphics::Text TurtleBrains::Graphics::Graphic TurtleBrains::Core::Noncopyable

Public Member Functions

 Counter (tbCore::uint16 total)
 
const tbCore::uint16GetTotal (void) const
 
void SetTotal (const tbCore::uint16 total)
 
const tbCore::uint16GetCount (void) const
 
void SetCount (const tbCore::uint16 count)
 
void JumpDisplay (void)
 
- Public Member Functions inherited from TurtleBrains::Graphics::Text
 Text (const tbCore::tbString &text=tb_string(""), const float pointSize=kDefaultFontSize, const tbCore::tbString &fontFilepath=kDefaultFontFile)
 
virtual ~Text (void)
 
void SetText (const tbCore::tbString &text, const float pointSize, const tbCore::tbString &fontFilepath)
 
void SetText (const tbCore::tbString &text)
 
virtual PixelSpace GetPixelWidth (void) const override
 
virtual PixelSpace GetPixelHeight (void) const override
 
- Public Member Functions inherited from TurtleBrains::Graphics::Graphic
 Graphic (void)
 
 Graphic (const Graphic &other)
 
virtual ~Graphic (void)
 
bool IsActive (void) const
 
void SetActive (const bool isActive)
 
void Update (const float deltaTime)
 
bool IsVisible (void) const
 
void SetVisible (const bool isVisible)
 
void Render (void) const
 
const tbMath::Vector2GetPosition (void) const
 
void SetPosition (const float x, const float y)
 
void SetPosition (const tbMath::Vector2 &position)
 
void SetOrigin (const AnchorLocation &anchor, const tbMath::Vector2 &offset=tbMath::Vector2::Zero())
 
void SetOrigin (const float originX, const float originY)
 
void SetOrigin (const tbMath::Vector2 &origin)
 
float GetDepth (void) const
 
void SetDepth (const float newDepth)
 
const tbMath::Vector2GetScale (void) const
 
void SetScale (const float scale)
 
void SetScale (const float scaleX, const float scaleY)
 
float GetRotation (void) const
 
void SetRotation (const float rotation)
 
void SetScroll (const float scroll)
 
void SetScroll (const float scrollX, const float scrollY)
 
bool IsRelative (void) const
 
const ColorGetColor (void) const
 
virtual void SetColor (const tbGraphics::Color &newColor)
 
float GetWidth (void) const
 
float GetHeight (void) const
 

Protected Member Functions

virtual void OnUpdate (const float deltaTime) override
 
- Protected Member Functions inherited from TurtleBrains::Graphics::Text
virtual void OnRender (void) const override
 
- Protected Member Functions inherited from TurtleBrains::Graphics::Graphic
virtual void ApplyTransform (void) const
 
virtual void PopTransform (void) const
 

Additional Inherited Members

- Static Public Attributes inherited from TurtleBrains::Graphics::Text
static const float kDefaultFontSize
 
static const tbCore::tbString kDefaultFontFile
 

Member Function Documentation

virtual void TurtleBrainsExpress::Counters::Counter::OnUpdate ( const float  deltaTime)
overrideprotectedvirtual

This should be overridden by a subclass if it needs to perform any updates per frame before displaying / rendering a new frame. This function will be invoked when Update() is called and the object IsActive().

Note
OnUpdate() should not be called directly, even from a subclass. Use Update() which will first check if the Graphic IsActive() before updating with OnUpdate().

Reimplemented from TurtleBrains::Graphics::Graphic.