15#include <aegis/component.hpp>
31 void update(ae::q20_12_t )
override;
33 ae::ComponentTypeID
getType()
const override
78 bool hyphenate =
false);
123 const Glyph& glyph,
int x,
int y,
int color,
bool bold =
false,
bool italic =
false,
bool underline =
false);
138 void clearArea(
int x,
int y,
int width,
int height);
Manager for text loading.
Manages rendering text from a bitmap.
void configureText(const TextConfig &config, bool loadDefaultPalette=true)
Configure the text system.
int getLetterSpacing()
A getter to return the letter spacing.
void drawGlyph(const Glyph &glyph, int x, int y, int color, bool bold=false, bool italic=false, bool underline=false)
A wrapper for drawGlyph in TextSystem. Draw a single glyph to the screen.
ae::ComponentTypeID getType() const override
void appearTextSkip()
A wrapper for appearTextSkip in TextSystem. If a text is currently being rendered with appearText,...
std::unique_ptr< Font > font
void testPalette()
A wrapper for testPalette in TextSystem.
void clearScreen()
A wrapper for clearScreen in TextManager. Clear the text layer by filling the video buffer with black...
int getFontSize()
A getter to return the font size.
void clearArea(int x, int y, int width, int height)
A wrapper for clearArea in TextSystem. Clear a rectangular area of the text video buffer.
void update(ae::q20_12_t) override
void testBitmap()
A wrapper for testBitmap in TextSystem.
int getSpaceWidth()
A getter to return the space width (width of a ' ' character).
std::unique_ptr< Text > appearingText
static constexpr ae::ComponentTypeID TYPE_ID
void appearTextStop()
Stops the appearText animation immediately and clears the state.
int letterSpacing
Auto-derived from fontSize in configureText(); can be overridden manually via the setters above.
void setSpaceWidth(int value)
Manually override the auto-calculated space width.
int getLineSpacing()
A getter to return the line spacing.
bool appearTextDone()
A wrapper for appearTextDone in TextSystem. Check if the text being rendered with appearText has fini...
void submitToManager() override
void setLetterSpacing(int value)
Manually override the auto-calculated letter spacing.
bool appearTextPaused()
Check if the paginated text is waiting for the next page.
void destroy() override
Sets active to false on component destruction.
Glyph * getGlyph(const char &c, bool bold=false)
Returns the Glyph struct for a given character. Useful for when drawing single characters from outsid...
void appearTextNextPage()
Clear the text area and continue the paused text from the top of it.
void drawText(const std::string &text, int x, int y, int color=TextColor::White, int xBoundary=256)
A wrapper for drawText in TextSystem. Draws text to the screen.
void setLineSpacing(int value)
Manually override the auto-calculated line spacing.
void appearText(const std::string &text, int x, int y, int color=TextColor::White, int maxX=256, int maxY=0, bool hyphenate=false)
A wrapper for appearText in TextSystem. Simulates text typing effect.
Stores data for a single glyph (character) in a font.
A struct that holds initial config values for the TextComponent.