diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Text.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/Text.hpp b/include/Text.hpp index 245284f..89aba99 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -51,8 +51,9 @@ namespace QuickMedia } // If size is {0, 0} then the image is drawn at its original size - void create_image(std::string url, bool local, mgl::vec2i size) { + void create_image(std::string url, bool local, mgl::vec2i size, std::string alt) { this->url = std::move(url); + this->alt = std::move(alt); this->local = local; this->size = size; type = Type::IMAGE; @@ -68,6 +69,7 @@ namespace QuickMedia // TODO: Remove these std::string url; + std::string alt; bool local = false; mgl::vec2i pos; mgl::vec2i size; @@ -94,7 +96,7 @@ namespace QuickMedia const std::string& getString() const; void appendText(const std::string &str); // size = {0, 0} = keep original image size - static std::string formatted_image(const std::string &url, bool local, mgl::vec2i size); + static std::string formatted_image(const std::string &url, bool local, mgl::vec2i size, const std::string &alt); // text_flags is bit-or of FormattedTextFlag static std::string formatted_text(const std::string &text, mgl::Color color, uint8_t text_flags); void insert_text_at_caret_position(const std::string &str); |