diff options
Diffstat (limited to 'editor/code_editor.h')
-rw-r--r-- | editor/code_editor.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/editor/code_editor.h b/editor/code_editor.h index 9d8a3a2229..c888619ac0 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -40,6 +40,8 @@ #include "scene/gui/line_edit.h" #include "scene/main/timer.h" +class MenuButton; + class GotoLineDialog : public ConfirmationDialog { GDCLASS(GotoLineDialog, ConfirmationDialog); @@ -156,7 +158,9 @@ class CodeTextEditor : public VBoxContainer { Button *error_button = nullptr; Button *warning_button = nullptr; + MenuButton *zoom_button = nullptr; Label *line_and_col_txt = nullptr; + Label *indentation_txt = nullptr; Label *info = nullptr; Timer *idle = nullptr; @@ -164,29 +168,19 @@ class CodeTextEditor : public VBoxContainer { Timer *code_complete_timer = nullptr; int code_complete_timer_line = 0; - Timer *font_resize_timer = nullptr; - int font_resize_val; - real_t font_size; + float zoom_factor = 1.0f; Label *error = nullptr; int error_line; int error_column; - void _on_settings_change(); - void _apply_settings_change(); - void _update_text_editor_theme(); + void _update_font_ligatures(); void _complete_request(); Ref<Texture2D> _get_completion_icon(const ScriptLanguage::CodeCompletionOption &p_option); - void _font_resize_timeout(); - bool _add_font_size(int p_delta); virtual void input(const Ref<InputEvent> &event) override; void _text_editor_gui_input(const Ref<InputEvent> &p_event); - void _zoom_in(); - void _zoom_out(); - void _zoom_changed(); - void _reset_zoom(); Color completion_font_color; Color completion_string_color; @@ -195,13 +189,17 @@ class CodeTextEditor : public VBoxContainer { CodeTextEditorCodeCompleteFunc code_complete_func; void *code_complete_ud = nullptr; + void _zoom_in(); + void _zoom_out(); + void _zoom_to(float p_zoom_factor); + void _error_button_pressed(); void _warning_button_pressed(); void _set_show_errors_panel(bool p_show); void _set_show_warnings_panel(bool p_show); void _error_pressed(const Ref<InputEvent> &p_event); - void _update_status_bar_theme(); + void _zoom_popup_id_pressed(int p_idx); void _toggle_scripts_pressed(); @@ -234,6 +232,8 @@ public: }; void convert_case(CaseStyle p_case); + void set_indent_using_spaces(bool p_use_spaces); + void move_lines_up(); void move_lines_down(); void delete_lines(); @@ -273,6 +273,9 @@ public: void goto_prev_bookmark(); void remove_all_bookmarks(); + void set_zoom_factor(float p_zoom_factor); + float get_zoom_factor(); + void set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void *p_ud); void validate_script(); |