TextMesh
Add this in your code:
#include <engine/graphics/ui/text_mesh.h>
Description
Component for rendering text in 3D space.
Public methods
GetOrderInLayer
Get the order in layer, higher number, higher priority.
int GetOrderInLayer() const
SetOrderInLayer
Set the order in layer.
Parameters:
orderInLayer
: Order in layer, higher number, higher priority
void SetOrderInLayer(int orderInLayer)
GetColor
Get the color of the sprite.
const Color& GetColor() const
SetColor
Set the color of the sprite.
Parameters:
Color
: New sprite color
void SetColor(const Color& color)
GetText
Get text.
const std::string& GetText() const
SetText
Set text.
Parameters:
text
: New text
void SetText(const std::string& text)
GetFont
Get text font.
const std::shared_ptr<Font>& GetFont() const
SetFont
Set text font.
Parameters:
font
: New font
void SetFont(const std::shared_ptr<Font>& font)
GetMaterial
Get the material of the sprite.
const std::shared_ptr<Material>& GetMaterial()
SetMaterial
Set the material of the sprite.
Parameters:
material
: New sprite material
void SetMaterial(const std::shared_ptr<Material>& material)
GetFontSize
Get the font size.
float GetFontSize() const
SetFontSize
Set the font size.
Parameters:
fontSize
: New font size
void SetFontSize(float fontSize)
GetLineSpacing
Get the line spacing.
float GetLineSpacing() const
SetLineSpacing
Set the line spacing.
Parameters:
lineSpacing
: New line spacing
void SetLineSpacing(float lineSpacing)
GetCharacterSpacing
Get the character spacing.
float GetCharacterSpacing() const
SetCharacterSpacing
Set the character spacing.
Parameters:
characterSpacing
: New character spacing
void SetCharacterSpacing(float characterSpacing)
GetVerticalAlignment
Get the vertical alignment.
VerticalAlignment GetVerticalAlignment() const
SetVerticalAlignment
Set the vertical alignment.
Parameters:
verticalAlignment
: New vertical alignment
void SetVerticalAlignment(VerticalAlignment verticalAlignment)
GetHorizontalAlignment
Get the horizontal alignment.
HorizontalAlignment GetHorizontalAlignment() const
SetHorizontalAlignment
Set the horizontal alignment.
Parameters:
horizontalAlignment
: New horizontal alignment
void SetHorizontalAlignment(HorizontalAlignment horizontalAlignment)