Untitled Game engine no.5  1.0
Public Member Functions | Public Attributes | List of all members
Engine::UIText Struct Reference

#include <UI.hpp>

Inheritance diagram for Engine::UIText:
Inheritance graph
[legend]
Collaboration diagram for Engine::UIText:
Collaboration graph
[legend]

Public Member Functions

 UIText (const Ref< Engine::Font > &font, const std::string &text, Allignment origin=CENTER)
 
void setText (const std::string &newString)
 
- Public Member Functions inherited from Engine::UIElement
 UIElement (const Ref< Texture > &tex)
 
void setImage (const Ref< Texture > &tex)
 
void setImage (const Ref< TextureLookup > &lookup)
 
void setSize (float width, float height)
 
virtual void update ()
 
void queueVisualUpdate ()
 
virtual void updateVisual ()
 
- Public Member Functions inherited from Engine::MeshRenderer
void SetMesh (const Ref< Mesh > &renderMesh)
 
void SetMap (const Ref< Texture > &tex)
 

Public Attributes

Ref< Fontfont
 
std::string text
 
- Public Attributes inherited from Engine::UIElement
Ref< VertexCollider2Dcollider = nullptr
 
Allignment origin = CENTER
 collider reference (generated when setting a picture)
 
- Public Attributes inherited from Engine::MeshRenderer
Ref< ColorMapcolorMap = nullptr
 
Ref< TextureMapmap = nullptr
 
Ref< Texturetexture = nullptr
 
std::vector< Ref< Texture > > vertexTextures = std::vector<Ref<Texture>>()
 
Ref< Meshmesh = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from Engine::UIElement
static void Update (const Scene &scene)
 

Detailed Description

Wrapper for a UIElement with text. Stores font/ string data.

Constructor & Destructor Documentation

◆ UIText()

Engine::UIText::UIText ( const Ref< Engine::Font > &  font,
const std::string &  text,
Allignment  origin = CENTER 
)
inline

Construct a text box from a font reference and a text string.

The alignment passed in will affect the text being rendered. Setting the Image of this UIElement will clear the text data.

Parameters
font
text
origin

The documentation for this struct was generated from the following file: