From 5f981d7fefe8fd720796c67547afb34421e742b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Roudi=C3=A8re?= Date: Fri, 1 Feb 2019 17:20:59 +0100 Subject: Displays errors and warnings in a better way in the script editor --- editor/code_editor.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'editor/code_editor.h') diff --git a/editor/code_editor.h b/editor/code_editor.h index 96fc5b79e5..14ce3254ea 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -142,12 +142,12 @@ class CodeTextEditor : public VBoxContainer { TextEdit *text_editor; FindReplaceBar *find_replace_bar; HBoxContainer *status_bar; - Label *warning_label; + + ToolButton *warning_button; Label *warning_count_label; - Label *line_nb; - Label *col_nb; - Label *font_size_nb; + Label *line_and_col_txt; + Label *info; Timer *idle; Timer *code_complete_timer; @@ -176,6 +176,10 @@ class CodeTextEditor : public VBoxContainer { CodeTextEditorCodeCompleteFunc code_complete_func; void *code_complete_ud; + void _warning_label_gui_input(const Ref &p_event); + void _warning_button_pressed(); + void _error_pressed(const Ref &p_event); + protected: virtual void _load_theme_settings() {} virtual void _validate_script() {} @@ -212,15 +216,14 @@ public: Variant get_edit_state(); void set_edit_state(const Variant &p_state); + void set_warning_nb(int p_warning_nb); + void update_editor_settings(); void set_error(const String &p_error); void set_error_pos(int p_line, int p_column); void update_line_and_column() { _line_col_changed(); } TextEdit *get_text_edit() { return text_editor; } FindReplaceBar *get_find_replace_bar() { return find_replace_bar; } - Label *get_error_label() const { return error; } - Label *get_warning_label() const { return warning_label; } - Label *get_warning_count_label() const { return warning_count_label; } virtual void apply_code() {} void goto_error(); -- cgit v1.2.3