20 std::shared_ptr<Font>
font;
52 std::string
getText() const noexcept;
89 virtual std::
string className() const noexcept override;
93 virtual
void onStart() override;
94 virtual
bool onUpdate(const
double delta) override;
96 void onNotifyNow(std::shared_ptr<Events::Event> event) override;
99 virtual
void log(el::base::type::ostream_t& os) const;
Class for text.
Definition: text.h:18
void handleQueuedEvent(std::shared_ptr< Events::Event > event) override
HandleQueuedEvent allows derived classes to define behaviour for when queuedEvents are received...
Definition: text.cpp:77
Class for shader.
Definition: shader.h:17
void setFont(const std::shared_ptr< Font > font)
Sets the font.
Definition: text.cpp:13
virtual unsigned long long getValueForSorting() const noexceptoverride
Gets the value for sorting.
Definition: text.cpp:51
void setKerning(const float amount) noexcept
Sets the kerning.
Definition: text.cpp:37
Base Class for all components.
Definition: component.h:20
virtual void setText(const std::string &text)
Sets the text string.
Definition: text.cpp:17
virtual void onStart() override
Called when the engine starts and when a new scene is loaded.
Definition: text.cpp:89
std::string getText() const noexcept
Gets the text string.
Definition: text.cpp:21
std::shared_ptr< Font > font
Definition: text.h:20
float getKerning() const noexcept
Gets the kerning.
Definition: text.cpp:41
void setShader(std::shared_ptr< Shader > shader)
Sets the shader.
Definition: text.cpp:33
virtual void log(el::base::type::ostream_t &os) const
Definition: text.cpp:123
glm::vec4 getColor() const noexcept
Gets the color.
Definition: text.cpp:29
glm::vec4 color
Definition: text.h:22
std::shared_ptr< Transform > transform
Definition: component.h:23
std::shared_ptr< Shader > shader
Definition: text.h:23
std::string text
Definition: text.h:21
Text()
Constructor for Text.
Definition: text.cpp:9
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: text.cpp:45
void renderCharacter(const unsigned char character, Transform transform)
Definition: text.cpp:55
void onNotifyNow(std::shared_ptr< Events::Event > event) override
When receiving an event that is immediate, onNotifyNow is used. It acts as an interrupt to make sure ...
Definition: text.cpp:81
virtual void onDestroy() override
Called when the engine is shutting down.
Definition: text.cpp:85
float kerning
Definition: text.h:24
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: text.cpp:119
virtual bool onUpdate(const double delta) override
Called every engine loop.
Definition: text.cpp:92
void setColor(const glm::vec4 &color)
Sets the color.
Definition: text.cpp:25