From 8765ee0f90be145ad73a6a912c8df6ebb16dd963 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 18 Nov 2021 06:20:56 +0100 Subject: Fix corrupt reactions in matrix (use of deleted vertex buffer) --- include/Text.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Text.hpp b/include/Text.hpp index dc3a0f7..a8a17be 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -55,6 +55,8 @@ namespace QuickMedia { public: Text(std::string str, bool bold_font, unsigned int characterSize, float maxWidth, bool highlight_urls = false); + Text(const Text &other); + Text& operator=(const Text&); void setString(std::string str); const std::string& getString() const; @@ -112,6 +114,7 @@ namespace QuickMedia RIGHT_WORD }; + Text(); void updateCaret(); int getStartOfLine(int startIndex) const; int getEndOfLine(int startIndex) const; @@ -135,7 +138,7 @@ namespace QuickMedia size_t get_string_index_from_caret_index(size_t caret_index) const; private: std::string str; // TODO: Remove this for non-editable text??? also replace with std::string? then we get more efficient editing of text - const bool bold_font; + bool bold_font; unsigned int characterSize; std::array, 4> vertices; std::array vertex_buffers; -- cgit v1.2.3