aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-18 06:20:56 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-18 06:20:56 +0100
commit8765ee0f90be145ad73a6a912c8df6ebb16dd963 (patch)
tree476f516422f730401bab3c24dd44e4957a23c61d /include
parent65fd232e102ff89564d5417771e94bed3d1d31c7 (diff)
Fix corrupt reactions in matrix (use of deleted vertex buffer)
Diffstat (limited to 'include')
-rw-r--r--include/Text.hpp5
1 files changed, 4 insertions, 1 deletions
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<std::vector<mgl::Vertex>, 4> vertices;
std::array<mgl::VertexBuffer, 4> vertex_buffers;