diff options
Diffstat (limited to 'include/Text.hpp')
-rw-r--r-- | include/Text.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/Text.hpp b/include/Text.hpp index 73dd565..601f1a2 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -100,6 +100,8 @@ namespace QuickMedia // 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); + // Set to 0 to disable max lines + void set_max_lines(int max_lines); static std::string to_printable_string(const std::string &str); @@ -186,7 +188,7 @@ namespace QuickMedia float maxWidth; mgl::vec2f position; mgl::Color color; - bool force_color; + bool force_color = false; bool dirty; bool dirtyText; bool dirtyCaret; @@ -202,10 +204,9 @@ namespace QuickMedia int caretIndex; float caret_offset_x; mgl::vec2f caretPosition; - mgl::vec2u renderTarget_size; + int max_lines = 0; std::vector<VertexRef> vertices_linear; // TODO: Use textElements instead - std::vector<Range> url_ranges; }; } |