Fixed more RichTextBox issues, fixed segfault from zooming in/out too fast, fixed segfault from undoing an edit
This commit is contained in:
parent
4db5838a64
commit
011f8ba0b4
12 changed files with 113 additions and 88 deletions
|
|
@ -17,12 +17,9 @@ class DrawTextBox : public DrawComponent {
|
|||
|
||||
// User input data
|
||||
struct Data {
|
||||
Vector4f textColor;
|
||||
float textSize = -100000.0f;
|
||||
Vector2f p1;
|
||||
Vector2f p2;
|
||||
std::string currentText;
|
||||
bool editing = false;
|
||||
bool editing = false; // Should probably move this out of the Data struct
|
||||
bool operator==(const Data& o) const = default;
|
||||
bool operator!=(const Data& o) const = default;
|
||||
} d;
|
||||
|
|
@ -38,13 +35,10 @@ class DrawTextBox : public DrawComponent {
|
|||
void create_collider();
|
||||
virtual void update_from_delayed_ptr(const std::shared_ptr<DrawComponent>& delayedUpdatePtr) override;
|
||||
void init_text_box(DrawingProgram& drawP);
|
||||
void update_contained_string(DrawingProgram& drawP);
|
||||
void set_textbox_string(const std::string& str);
|
||||
Vector2f get_mouse_pos(DrawingProgram& drawP);
|
||||
|
||||
virtual SCollision::AABB<float> get_obj_coord_bounds() const override;
|
||||
|
||||
bool textboxUpdate = false;
|
||||
std::shared_ptr<RichTextBox> textBox;
|
||||
std::shared_ptr<RichTextBox::Cursor> cursor;
|
||||
SCollision::BVHContainer<float> collisionTree;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue