1 #ifndef WRAPPABLE_TEXT_H
2 #define WRAPPABLE_TEXT_H
33 std::multimap<unsigned char, Transform> character_transforms;
50 void setSize(
float width,
float height);
75 virtual void setText(
const std::string&
text)
override;
81 virtual std::string
to_string() const noexcept override;
82 virtual std::
string className() const noexcept override;
86 virtual
void onStart() override;
87 virtual
bool onUpdate(const
double delta) override;
89 void onNotifyNow(std::shared_ptr<Events::Event> event) override;
91 virtual
void log(el::base::type::ostream_t& os) const;
Class for text.
Definition: text.h:18
HorizontalAlignment
Horizontal Alignment Enum.
Definition: wrappable_text.h:20
std::vector< std::pair< float, std::vector< Character > > > splitTextIntoLines()
Definition: wrappable_text.cpp:28
virtual void onDestroy() override
Called when the engine is shutting down.
Definition: wrappable_text.cpp:142
void setLineSpacing(float spacing)
Sets the line spacing.
Definition: wrappable_text.cpp:24
void setVerticalAlignment(const VerticalAlignment &alignment)
Sets the vertical alignment.
Definition: wrappable_text.cpp:15
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: wrappable_text.cpp:180
void handleQueuedEvent(std::shared_ptr< Events::Event > event) override
HandleQueuedEvent allows derived classes to define behaviour for when queuedEvents are received...
Definition: wrappable_text.cpp:172
virtual void setText(const std::string &text) override
Sets the text string.
Definition: wrappable_text.cpp:54
Definition: wrappable_text.h:25
virtual bool onUpdate(const double delta) override
Called every engine loop.
Definition: wrappable_text.cpp:149
Definition: wrappable_text.h:25
Definition: wrappable_text.h:25
Definition: wrappable_text.h:20
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: wrappable_text.cpp:184
std::string text
Definition: text.h:21
void setSize(float width, float height)
Sets the size.
Definition: wrappable_text.cpp:19
VerticalAlignment
Vertical Alignment Enum.
Definition: wrappable_text.h:25
WrappableText()
Wrappable Text constructor.
Definition: wrappable_text.cpp:7
virtual void log(el::base::type::ostream_t &os) const
Definition: wrappable_text.cpp:190
Definition: wrappable_text.h:20
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: wrappable_text.cpp:176
virtual void onStart() override
Called when the engine starts and when a new scene is loaded.
Definition: wrappable_text.cpp:146
Definition: wrappable_text.h:20
Class for wrappable text.
Definition: wrappable_text.h:14
void setHorizontalAlignment(const HorizontalAlignment &alignment)
Sets the horizontal alignment.
Definition: wrappable_text.cpp:11