CodeEditor: Make possible to select and copy error text

This commit is contained in:
Danil Alexeev 2025-05-07 00:16:03 +03:00 committed by Rémi Verschelde
parent 03bd8ba9c2
commit db9b8ff003
No known key found for this signature in database
GPG key ID: C3336907360768E1
7 changed files with 150 additions and 81 deletions

View file

@ -31,17 +31,17 @@
#pragma once
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/check_box.h"
#include "scene/gui/code_edit.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/label.h"
#include "scene/gui/popup.h"
#include "scene/main/timer.h"
class MenuButton;
class Button;
class CheckBox;
class CodeTextEditor;
class Label;
class LineEdit;
class MenuButton;
class RichTextLabel;
class Timer;
class GotoLinePopup : public PopupPanel {
GDCLASS(GotoLinePopup, PopupPanel);
@ -138,7 +138,6 @@ public:
bool is_case_sensitive() const;
bool is_whole_words() const;
bool is_selection_only() const;
void set_error(const String &p_label);
void set_text_edit(CodeTextEditor *p_text_editor);
@ -183,7 +182,7 @@ class CodeTextEditor : public VBoxContainer {
float zoom_factor = 1.0f;
Label *error = nullptr;
RichTextLabel *error = nullptr;
int error_line;
int error_column;
@ -211,6 +210,8 @@ class CodeTextEditor : public VBoxContainer {
void _zoom_out();
void _zoom_to(float p_zoom_factor);
void _update_error_content_height();
void _error_button_pressed();
void _warning_button_pressed();
void _set_show_errors_panel(bool p_show);