| 776 | } |
| 777 | |
| 778 | void TextBoxEditTool::edit_start(EditTool& editTool, std::any& prevData) { |
| 779 | auto& a = static_cast<TextBoxCanvasComponent&>(comp->obj->get_comp()); |
| 780 | auto& cur = a.cursor; |
| 781 | auto& textbox = a.textBox; |
| 782 | |
| 783 | a.init_text_box(drawP); |
| 784 | |
| 785 | cur = std::make_shared<TextBox::Cursor>(); |
| 786 | Vector2f textSelectPos = a.get_mouse_pos(drawP); |
| 787 | textbox->process_mouse_left_button(*cur, textSelectPos, 1, false, false); |
| 788 | prevData = get_all_data(a); |
| 789 | a.d.editing = true; |
| 790 | |
| 791 | set_styles_at_selection(a); |
| 792 | |
| 793 | editTool.add_point_handle({&a.d.p1, nullptr, &a.d.p2}); |
| 794 | editTool.add_point_handle({&a.d.p2, &a.d.p1, nullptr}); |
| 795 | |
| 796 | commitUpdate = true; |
| 797 | |
| 798 | userInput = std::make_unique<RichTextUserInput>(CustomEvents::text_box_get_new_id(), textbox, cur, currentModsPtr); |
| 799 | CustomEvents::emit_event(CustomEvents::RefreshTextBoxInputEvent{}); |
| 800 | } |
| 801 | |
| 802 | void TextBoxEditTool::edit_update() { |
| 803 | } |
nothing calls this directly
no test coverage detected