diff options
Diffstat (limited to 'editor')
105 files changed, 964 insertions, 930 deletions
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h index 1c1cde47b4..217393a3b3 100644 --- a/editor/animation_bezier_editor.h +++ b/editor/animation_bezier_editor.h @@ -143,12 +143,12 @@ protected: void _notification(int p_what); public: - virtual String get_tooltip(const Point2 &p_pos) const; + virtual String get_tooltip(const Point2 &p_pos) const override; Ref<Animation> get_animation() const; void set_animation_and_track(const Ref<Animation> &p_animation, int p_track); - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void set_undo_redo(UndoRedo *p_undo_redo); void set_timeline(AnimationTimelineEdit *p_timeline); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 911280dc3b..a31ca892ef 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -97,7 +97,7 @@ public: float get_zoom_scale() const; - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void set_animation(const Ref<Animation> &p_animation); void set_zoom(Range *p_zoom); Range *get_zoom() const { return zoom; } @@ -192,11 +192,11 @@ protected: virtual void _gui_input(const Ref<InputEvent> &p_event); public: - virtual Variant get_drag_data(const Point2 &p_point); - virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const; - virtual void drop_data(const Point2 &p_point, const Variant &p_data); + virtual Variant get_drag_data(const Point2 &p_point) override; + virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override; + virtual void drop_data(const Point2 &p_point, const Variant &p_data) override; - virtual String get_tooltip(const Point2 &p_pos) const; + virtual String get_tooltip(const Point2 &p_pos) const override; virtual int get_key_height() const; virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); @@ -218,7 +218,7 @@ public: UndoRedo *get_undo_redo() const { return undo_redo; } NodePath get_path() const; void set_animation_and_track(const Ref<Animation> &p_animation, int p_track); - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void set_undo_redo(UndoRedo *p_undo_redo); void set_timeline(AnimationTimelineEdit *p_timeline); @@ -264,7 +264,7 @@ protected: public: void set_type_and_name(const Ref<Texture2D> &p_type, const String &p_name, const NodePath &p_node); - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void set_timeline(AnimationTimelineEdit *p_timeline); void set_root(Node *p_root); diff --git a/editor/animation_track_editor_plugins.h b/editor/animation_track_editor_plugins.h index 378070a45d..7c5d7ae04f 100644 --- a/editor/animation_track_editor_plugins.h +++ b/editor/animation_track_editor_plugins.h @@ -39,21 +39,21 @@ class AnimationTrackEditBool : public AnimationTrackEdit { Ref<Texture2D> icon_unchecked; public: - virtual int get_key_height() const; - virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); - virtual bool is_key_selectable_by_distance() const; - virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right); + virtual int get_key_height() const override; + virtual Rect2 get_key_rect(int p_index, float p_pixels_sec) override; + virtual bool is_key_selectable_by_distance() const override; + virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) override; }; class AnimationTrackEditColor : public AnimationTrackEdit { GDCLASS(AnimationTrackEditColor, AnimationTrackEdit); public: - virtual int get_key_height() const; - virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); - virtual bool is_key_selectable_by_distance() const; - virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right); - virtual void draw_key_link(int p_index, float p_pixels_sec, int p_x, int p_next_x, int p_clip_left, int p_clip_right); + virtual int get_key_height() const override; + virtual Rect2 get_key_rect(int p_index, float p_pixels_sec) override; + virtual bool is_key_selectable_by_distance() const override; + virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) override; + virtual void draw_key_link(int p_index, float p_pixels_sec, int p_x, int p_next_x, int p_clip_left, int p_clip_right) override; }; class AnimationTrackEditAudio : public AnimationTrackEdit { @@ -67,10 +67,10 @@ protected: static void _bind_methods(); public: - virtual int get_key_height() const; - virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); - virtual bool is_key_selectable_by_distance() const; - virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right); + virtual int get_key_height() const override; + virtual Rect2 get_key_rect(int p_index, float p_pixels_sec) override; + virtual bool is_key_selectable_by_distance() const override; + virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) override; void set_node(Object *p_object); @@ -84,10 +84,10 @@ class AnimationTrackEditSpriteFrame : public AnimationTrackEdit { bool is_coords; public: - virtual int get_key_height() const; - virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); - virtual bool is_key_selectable_by_distance() const; - virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right); + virtual int get_key_height() const override; + virtual Rect2 get_key_rect(int p_index, float p_pixels_sec) override; + virtual bool is_key_selectable_by_distance() const override; + virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) override; void set_node(Object *p_object); void set_as_coords(); @@ -101,10 +101,10 @@ class AnimationTrackEditSubAnim : public AnimationTrackEdit { ObjectID id; public: - virtual int get_key_height() const; - virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); - virtual bool is_key_selectable_by_distance() const; - virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right); + virtual int get_key_height() const override; + virtual Rect2 get_key_rect(int p_index, float p_pixels_sec) override; + virtual bool is_key_selectable_by_distance() const override; + virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) override; void set_node(Object *p_object); }; @@ -124,15 +124,15 @@ protected: static void _bind_methods(); public: - virtual void _gui_input(const Ref<InputEvent> &p_event); + virtual void _gui_input(const Ref<InputEvent> &p_event) override; - virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const; - virtual void drop_data(const Point2 &p_point, const Variant &p_data); + virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override; + virtual void drop_data(const Point2 &p_point, const Variant &p_data) override; - virtual int get_key_height() const; - virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); - virtual bool is_key_selectable_by_distance() const; - virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right); + virtual int get_key_height() const override; + virtual Rect2 get_key_rect(int p_index, float p_pixels_sec) override; + virtual bool is_key_selectable_by_distance() const override; + virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) override; AnimationTrackEditTypeAudio(); }; @@ -143,10 +143,10 @@ class AnimationTrackEditTypeAnimation : public AnimationTrackEdit { ObjectID id; public: - virtual int get_key_height() const; - virtual Rect2 get_key_rect(int p_index, float p_pixels_sec); - virtual bool is_key_selectable_by_distance() const; - virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right); + virtual int get_key_height() const override; + virtual Rect2 get_key_rect(int p_index, float p_pixels_sec) override; + virtual bool is_key_selectable_by_distance() const override; + virtual void draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) override; void set_node(Object *p_object); AnimationTrackEditTypeAnimation(); @@ -156,19 +156,19 @@ class AnimationTrackEditVolumeDB : public AnimationTrackEdit { GDCLASS(AnimationTrackEditVolumeDB, AnimationTrackEdit); public: - virtual void draw_bg(int p_clip_left, int p_clip_right); - virtual void draw_fg(int p_clip_left, int p_clip_right); - virtual int get_key_height() const; - virtual void draw_key_link(int p_index, float p_pixels_sec, int p_x, int p_next_x, int p_clip_left, int p_clip_right); + virtual void draw_bg(int p_clip_left, int p_clip_right) override; + virtual void draw_fg(int p_clip_left, int p_clip_right) override; + virtual int get_key_height() const override; + virtual void draw_key_link(int p_index, float p_pixels_sec, int p_x, int p_next_x, int p_clip_left, int p_clip_right) override; }; class AnimationTrackEditDefaultPlugin : public AnimationTrackEditPlugin { GDCLASS(AnimationTrackEditDefaultPlugin, AnimationTrackEditPlugin); public: - virtual AnimationTrackEdit *create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage); - virtual AnimationTrackEdit *create_audio_track_edit(); - virtual AnimationTrackEdit *create_animation_track_edit(Object *p_object); + virtual AnimationTrackEdit *create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage) override; + virtual AnimationTrackEdit *create_audio_track_edit() override; + virtual AnimationTrackEdit *create_animation_track_edit(Object *p_object) override; }; #endif // ANIMATION_TRACK_EDITOR_PLUGINS_H diff --git a/editor/code_editor.h b/editor/code_editor.h index ab298202bd..d3090b28c1 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -47,7 +47,7 @@ class GotoLineDialog : public ConfirmationDialog { TextEdit *text_editor; - virtual void ok_pressed(); + virtual void ok_pressed() override; public: void popup_find_line(TextEdit *p_edit); diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index d0c8d939cf..9da9a8fb2c 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -102,7 +102,7 @@ private: Label *error_label; - void ok_pressed(); + void ok_pressed() override; void _cancel_pressed(); void _item_activated(); void _text_entered(const String &_text); diff --git a/editor/create_dialog.h b/editor/create_dialog.h index 52eb9945af..75a317275a 100644 --- a/editor/create_dialog.h +++ b/editor/create_dialog.h @@ -78,7 +78,7 @@ class CreateDialog : public ConfirmationDialog { void _hide_requested(); void _confirmed(); - virtual void cancel_pressed(); + virtual void cancel_pressed() override; void _favorite_toggled(); diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index 12fb82cc6f..6e5699e929 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -252,7 +252,7 @@ public: bool is_skip_breakpoints(); - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; ScriptEditorDebugger(EditorNode *p_editor = nullptr); ~ScriptEditorDebugger(); }; diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h index ee74072731..5d2ae582e6 100644 --- a/editor/dependency_editor.h +++ b/editor/dependency_editor.h @@ -123,7 +123,7 @@ class DependencyRemoveDialog : public ConfirmationDialog { void _find_all_removed_dependencies(EditorFileSystemDirectory *efsd, Vector<RemovedDependency> &p_removed); void _build_removed_dependency_tree(const Vector<RemovedDependency> &p_removed); - void ok_pressed(); + void ok_pressed() override; static void _bind_methods(); @@ -147,8 +147,8 @@ private: Button *fdep; Label *text; Tree *files; - void ok_pressed(); - void custom_action(const String &); + void ok_pressed() override; + void custom_action(const String &) override; public: void show(Mode p_mode, const String &p_for_file, const Vector<String> &report); @@ -161,7 +161,7 @@ class OrphanResourcesDialog : public ConfirmationDialog { DependencyEditor *dep_edit; Tree *files; ConfirmationDialog *delete_confirm; - void ok_pressed(); + void ok_pressed() override; bool _fill_owners(EditorFileSystemDirectory *efsd, HashMap<String, int> &refs, TreeItem *p_parent); diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index edb299bb90..8aeeba52ed 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -54,6 +54,27 @@ void EditorAssetInstaller::_update_subitems(TreeItem *p_item, bool p_check, bool } } +void EditorAssetInstaller::_uncheck_parent(TreeItem *p_item) { + if (!p_item) { + return; + } + + bool any_checked = false; + TreeItem *item = p_item->get_children(); + while (item) { + if (item->is_checked(0)) { + any_checked = true; + break; + } + item = item->get_next(); + } + + if (!any_checked) { + p_item->set_checked(0, false); + _uncheck_parent(p_item->get_parent()); + } +} + void EditorAssetInstaller::_item_edited() { if (updating) { return; @@ -67,7 +88,7 @@ void EditorAssetInstaller::_item_edited() { String path = item->get_metadata(0); updating = true; - if (path == String()) { //a dir + if (path == String() || item == tree->get_root()) { //a dir or root _update_subitems(item, item->is_checked(0), true); } @@ -76,6 +97,8 @@ void EditorAssetInstaller::_item_edited() { item->set_checked(0, true); item = item->get_parent(); } + } else { + _uncheck_parent(item->get_parent()); } updating = false; } diff --git a/editor/editor_asset_installer.h b/editor/editor_asset_installer.h index 7f3d00994f..e31cff8845 100644 --- a/editor/editor_asset_installer.h +++ b/editor/editor_asset_installer.h @@ -42,8 +42,9 @@ class EditorAssetInstaller : public ConfirmationDialog { Map<String, TreeItem *> status_map; bool updating; void _update_subitems(TreeItem *p_item, bool p_check, bool p_first = false); + void _uncheck_parent(TreeItem *p_item); void _item_edited(); - virtual void ok_pressed(); + virtual void ok_pressed() override; protected: static void _bind_methods(); diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h index 5d5502002d..87c060d1f5 100644 --- a/editor/editor_audio_buses.h +++ b/editor/editor_audio_buses.h @@ -112,9 +112,9 @@ class EditorAudioBus : public PanelContainer { void _effect_rmb(const Vector2 &p_pos); void _update_visible_channels(); - virtual Variant get_drag_data(const Point2 &p_point); - virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const; - virtual void drop_data(const Point2 &p_point, const Variant &p_data); + virtual Variant get_drag_data(const Point2 &p_point) override; + virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override; + virtual void drop_data(const Point2 &p_point, const Variant &p_data) override; Variant get_drag_data_fw(const Point2 &p_point, Control *p_from); bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; @@ -138,8 +138,8 @@ public: class EditorAudioBusDrop : public Control { GDCLASS(EditorAudioBusDrop, Control); - virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const; - virtual void drop_data(const Point2 &p_point, const Variant &p_data); + virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override; + virtual void drop_data(const Point2 &p_point, const Variant &p_data) override; mutable bool hovering_drop; @@ -250,7 +250,7 @@ public: Color notch_color; void add_notch(float p_normalized_offset, float p_db_value, bool p_render_value = false); - Size2 get_minimum_size() const; + Size2 get_minimum_size() const override; private: static void _bind_methods(); @@ -267,11 +267,11 @@ class AudioBusesEditorPlugin : public EditorPlugin { EditorAudioBuses *audio_bus_editor; public: - virtual String get_name() const { return "SampleLibrary"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_node); - virtual bool handles(Object *p_node) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "SampleLibrary"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_node) override; + virtual bool handles(Object *p_node) const override; + virtual void make_visible(bool p_visible) override; AudioBusesEditorPlugin(EditorAudioBuses *p_node); ~AudioBusesEditorPlugin(); diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h index 2233dbbeee..b688e9dc06 100644 --- a/editor/editor_dir_dialog.h +++ b/editor/editor_dir_dialog.h @@ -56,7 +56,7 @@ class EditorDirDialog : public ConfirmationDialog { void _make_dir(); void _make_dir_confirm(); - void ok_pressed(); + void ok_pressed() override; bool must_reload; diff --git a/editor/editor_export.h b/editor/editor_export.h index 8ad8326f10..e31b53ad67 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -417,17 +417,17 @@ private: FixUpEmbeddedPckFunc fixup_embedded_pck_func; public: - virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features); + virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override; - virtual void get_export_options(List<ExportOption> *r_options); + virtual void get_export_options(List<ExportOption> *r_options) override; - virtual String get_name() const; - virtual String get_os_name() const; - virtual Ref<Texture2D> get_logo() const; + virtual String get_name() const override; + virtual String get_os_name() const override; + virtual Ref<Texture2D> get_logo() const override; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const; - virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const; - virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0); + virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override; + virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path); void set_extension(const String &p_extension, const String &p_feature_key = "default"); @@ -442,8 +442,8 @@ public: void set_debug_32(const String &p_file); void add_platform_feature(const String &p_feature); - virtual void get_platform_features(List<String> *r_features); - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features); + virtual void get_platform_features(List<String> *r_features) override; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override; int get_chmod_flags() const; void set_chmod_flags(int p_flags); @@ -458,7 +458,7 @@ class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin { GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin); public: - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features); + virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features) override; EditorExportTextSceneToBinaryPlugin(); }; diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index 1e224b933d..40906ab42b 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -185,7 +185,7 @@ private: void _go_back(); void _go_forward(); - virtual void _post_popup(); + virtual void _post_popup() override; void _save_to_recent(); //callback function is callback(String p_path,Ref<Texture2D> preview,Variant udata) preview null if could not load diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index e367ed4989..a5edcf5c22 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -533,6 +533,7 @@ bool EditorFileSystem::_update_scan_actions() { if (_test_for_reimport(full_path, false)) { //must reimport reimports.push_back(full_path); + reimports.append_array(_get_dependencies(full_path)); } else { //must not reimport, all was good //update modified times, to avoid reimport diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 615ad97766..95072fd703 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -107,7 +107,7 @@ protected: public: void emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field = StringName(), bool p_changing = false); - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void set_label(const String &p_label); String get_label() const; @@ -151,7 +151,7 @@ public: virtual void expand_all_folding(); virtual void collapse_all_folding(); - virtual Variant get_drag_data(const Point2 &p_point); + virtual Variant get_drag_data(const Point2 &p_point) override; void set_selectable(bool p_selectable); bool is_selectable() const; @@ -160,7 +160,7 @@ public: float get_name_split_ratio() const; void set_object_and_property(Object *p_object, const StringName &p_property); - virtual Control *make_custom_tooltip(const String &p_text) const; + virtual Control *make_custom_tooltip(const String &p_text) const override; String get_tooltip_text() const; @@ -212,8 +212,8 @@ protected: static void _bind_methods(); public: - virtual Size2 get_minimum_size() const; - virtual Control *make_custom_tooltip(const String &p_text) const; + virtual Size2 get_minimum_size() const override; + virtual Control *make_custom_tooltip(const String &p_text) const override; String get_tooltip_text() const; @@ -239,7 +239,7 @@ protected: void _gui_input(const Ref<InputEvent> &p_event); public: - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void setup(const String &p_section, const String &p_label, Object *p_object, const Color &p_bg_color, bool p_foldable); VBoxContainer *get_vbox(); @@ -323,7 +323,7 @@ class EditorInspector : public ScrollContainer { void _node_removed(Node *p_node); - void _changed_callback(Object *p_changed, const char *p_prop); + void _changed_callback(Object *p_changed, const char *p_prop) override; void _edit_request_change(Object *p_object, const String &p_prop); void _filter_changed(const String &p_text); diff --git a/editor/editor_layouts_dialog.h b/editor/editor_layouts_dialog.h index 39f0f4163d..ebb523829f 100644 --- a/editor/editor_layouts_dialog.h +++ b/editor/editor_layouts_dialog.h @@ -47,8 +47,8 @@ class EditorLayoutsDialog : public ConfirmationDialog { protected: static void _bind_methods(); - virtual void ok_pressed(); - virtual void _post_popup(); + virtual void ok_pressed() override; + virtual void _post_popup() override; public: EditorLayoutsDialog(); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 454170647f..f768a2cacf 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -456,8 +456,6 @@ void EditorNode::_notification(int p_what) { editor_selection->update(); - //scene_root->set_size_override(true, Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"))); - { //TODO should only happen on settings changed int current_filter = GLOBAL_GET("rendering/canvas_textures/default_texture_filter"); if (current_filter != scene_root->get_default_canvas_item_texture_filter()) { @@ -1241,7 +1239,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) { // The 3D editor may be disabled as a feature, but scenes can still be opened. // This check prevents the preview from regenerating in case those scenes are then saved. Ref<EditorFeatureProfile> profile = feature_profile_manager->get_current_profile(); - if (!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)) { + if (profile.is_valid() && !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)) { img = Node3DEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_texture()->get_data(); } } diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 8f9c92ea15..48f1a1f134 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -584,12 +584,12 @@ public: Vector<String> tooltips; int hovered_index; - virtual Size2 get_minimum_size() const { + virtual Size2 get_minimum_size() const override { Ref<Font> font = get_theme_font("font", "Label"); return Vector2(0, font->get_height() * 2); } - virtual String get_tooltip(const Point2 &p_pos) const { + virtual String get_tooltip(const Point2 &p_pos) const override { for (int i = 0; i < flag_rects.size(); i++) { if (i < tooltips.size() && flag_rects[i].has_point(p_pos)) { return tooltips[i]; diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 35e6c10d90..be3e9db8ed 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -44,7 +44,7 @@ class EditorPropertyNil : public EditorProperty { LineEdit *text; public: - virtual void update_property(); + virtual void update_property() override; EditorPropertyNil(); }; @@ -62,7 +62,7 @@ protected: public: void set_string_name(bool p_enabled); - virtual void update_property(); + virtual void update_property() override; void set_placeholder(const String &p_string); EditorPropertyText(); }; @@ -84,7 +84,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; EditorPropertyMultilineText(); }; @@ -100,7 +100,7 @@ protected: public: void setup(const Vector<String> &p_options, bool p_string_name = false); - virtual void update_property(); + virtual void update_property() override; EditorPropertyTextEnum(); }; @@ -125,7 +125,7 @@ protected: public: void setup(const Vector<String> &p_extensions, bool p_folder, bool p_global); void set_save_mode(); - virtual void update_property(); + virtual void update_property() override; EditorPropertyPath(); }; @@ -145,7 +145,7 @@ protected: public: void setup(const String &p_base_type, const String &p_selected_type); - virtual void update_property(); + virtual void update_property() override; EditorPropertyClassName(); }; @@ -179,7 +179,7 @@ protected: public: void setup(Type p_hint, const String &p_hint_text); - virtual void update_property(); + virtual void update_property() override; EditorPropertyMember(); }; @@ -193,7 +193,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; EditorPropertyCheck(); }; @@ -208,7 +208,7 @@ protected: public: void setup(const Vector<String> &p_options); - virtual void update_property(); + virtual void update_property() override; void set_option_button_clip(bool p_enable); EditorPropertyEnum(); }; @@ -226,7 +226,7 @@ protected: public: void setup(const Vector<String> &p_options); - virtual void update_property(); + virtual void update_property() override; EditorPropertyFlags(); }; @@ -258,7 +258,7 @@ protected: public: void setup(LayerType p_layer_type); - virtual void update_property(); + virtual void update_property() override; EditorPropertyLayers(); }; @@ -272,7 +272,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser); EditorPropertyInteger(); }; @@ -287,7 +287,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(const String &p_base_type); EditorPropertyObjectID(); }; @@ -302,7 +302,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_exp_range, bool p_greater, bool p_lesser); EditorPropertyFloat(); }; @@ -343,7 +343,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(bool p_full, bool p_flip); EditorPropertyEasing(); }; @@ -359,7 +359,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyVector2(bool p_force_wide = false); }; @@ -375,7 +375,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyRect2(bool p_force_wide = false); }; @@ -391,7 +391,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; virtual void update_using_vector(Vector3 p_vector); virtual Vector3 get_vector(); void setup(double p_min, double p_max, double p_step, bool p_no_slider); @@ -409,7 +409,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(int p_min, int p_max, bool p_no_slider); EditorPropertyVector2i(bool p_force_wide = false); }; @@ -425,7 +425,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(int p_min, int p_max, bool p_no_slider); EditorPropertyRect2i(bool p_force_wide = false); }; @@ -441,7 +441,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(int p_min, int p_max, bool p_no_slider); EditorPropertyVector3i(bool p_force_wide = false); }; @@ -457,7 +457,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyPlane(bool p_force_wide = false); }; @@ -473,7 +473,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyQuat(); }; @@ -489,7 +489,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyAABB(); }; @@ -505,7 +505,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyTransform2D(); }; @@ -521,7 +521,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyBasis(); }; @@ -537,7 +537,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; virtual void update_using_transform(Transform p_transform); void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyTransform(); @@ -554,7 +554,7 @@ protected: static void _bind_methods(); public: - virtual void update_property(); + virtual void update_property() override; void setup(bool p_show_alpha); EditorPropertyColor(); }; @@ -577,7 +577,7 @@ protected: void _notification(int p_what); public: - virtual void update_property(); + virtual void update_property() override; void setup(const NodePath &p_base_hint, Vector<StringName> p_valid_types, bool p_use_path_from_scene_root = true); EditorPropertyNodePath(); }; @@ -587,7 +587,7 @@ class EditorPropertyRID : public EditorProperty { Label *label; public: - virtual void update_property(); + virtual void update_property() override; EditorPropertyRID(); }; @@ -657,11 +657,11 @@ protected: void _notification(int p_what); public: - virtual void update_property(); + virtual void update_property() override; void setup(const String &p_base_type); - void collapse_all_folding(); - void expand_all_folding(); + void collapse_all_folding() override; + void expand_all_folding() override; void set_use_sub_inspector(bool p_enable); @@ -675,10 +675,10 @@ class EditorInspectorDefaultPlugin : public EditorInspectorPlugin { GDCLASS(EditorInspectorDefaultPlugin, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); - virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false); - virtual void parse_end(); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; + virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false) override; + virtual void parse_end() override; }; #endif // EDITOR_PROPERTIES_H diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h index 7eed9b4fa7..c786528d48 100644 --- a/editor/editor_properties_array_dict.h +++ b/editor/editor_properties_array_dict.h @@ -118,7 +118,7 @@ protected: public: void setup(Variant::Type p_array_type, const String &p_hint_string = ""); - virtual void update_property(); + virtual void update_property() override; EditorPropertyArray(); }; @@ -152,7 +152,7 @@ protected: void _notification(int p_what); public: - virtual void update_property(); + virtual void update_property() override; EditorPropertyDictionary(); }; diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h index db74f5fb70..d000ebd151 100644 --- a/editor/editor_spin_slider.h +++ b/editor/editor_spin_slider.h @@ -87,7 +87,7 @@ protected: void _focus_entered(); public: - String get_tooltip(const Point2 &p_pos) const; + String get_tooltip(const Point2 &p_pos) const override; String get_text_value() const; void set_label(const String &p_label); @@ -107,7 +107,7 @@ public: void setup_and_show() { _focus_entered(); } LineEdit *get_line_edit() { return value_input; } - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; EditorSpinSlider(); }; diff --git a/editor/editor_sub_scene.h b/editor/editor_sub_scene.h index cd88805254..bdfbbca02f 100644 --- a/editor/editor_sub_scene.h +++ b/editor/editor_sub_scene.h @@ -53,7 +53,7 @@ class EditorSubScene : public ConfirmationDialog { void _remove_selection_child(Node *p_node); void _reown(Node *p_node, List<Node *> *p_to_reown); - void ok_pressed(); + void ok_pressed() override; protected: void _notification(int p_what); diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h index 6ebc7fd131..3d527f2338 100644 --- a/editor/export_template_manager.h +++ b/editor/export_template_manager.h @@ -69,7 +69,7 @@ class ExportTemplateManager : public ConfirmationDialog { void _uninstall_template(const String &p_version); void _uninstall_template_confirm(); - virtual void ok_pressed(); + virtual void ok_pressed() override; bool _install_from_file(const String &p_file, bool p_use_progress = true); void _http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); diff --git a/editor/find_in_files.h b/editor/find_in_files.h index 9815296be8..5f2c6ee174 100644 --- a/editor/find_in_files.h +++ b/editor/find_in_files.h @@ -123,7 +123,7 @@ protected: void _notification(int p_what); void _visibility_changed(); - void custom_action(const String &p_action); + void custom_action(const String &p_action) override; static void _bind_methods(); private: diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h index 57c694b698..5fa17ebd02 100644 --- a/editor/import/editor_import_collada.h +++ b/editor/import/editor_import_collada.h @@ -37,10 +37,10 @@ class EditorSceneImporterCollada : public EditorSceneImporter { GDCLASS(EditorSceneImporterCollada, EditorSceneImporter); public: - virtual uint32_t get_import_flags() const; - virtual void get_extensions(List<String> *r_extensions) const; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr); - virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps); + virtual uint32_t get_import_flags() const override; + virtual void get_extensions(List<String> *r_extensions) const override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override; + virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) override; EditorSceneImporterCollada(); }; diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h index be4679b6d3..00a7d9efba 100644 --- a/editor/import/editor_import_plugin.h +++ b/editor/import/editor_import_plugin.h @@ -41,18 +41,18 @@ protected: public: EditorImportPlugin(); - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_preset_name(int p_idx) const; - virtual int get_preset_count() const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; - virtual float get_priority() const; - virtual int get_import_order() const; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr); + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_preset_name(int p_idx) const override; + virtual int get_preset_count() const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; + virtual float get_priority() const override; + virtual int get_import_order() const override; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override; }; #endif //EDITOR_IMPORT_PLUGIN_H diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h index 95c6b87af5..bd30f8f1dd 100644 --- a/editor/import/editor_scene_importer_gltf.h +++ b/editor/import/editor_scene_importer_gltf.h @@ -387,10 +387,10 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { void _import_animation(GLTFState &state, AnimationPlayer *ap, const GLTFAnimationIndex index, const int bake_fps); public: - virtual uint32_t get_import_flags() const; - virtual void get_extensions(List<String> *r_extensions) const; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr); - virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps); + virtual uint32_t get_import_flags() const override; + virtual void get_extensions(List<String> *r_extensions) const override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override; + virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) override; EditorSceneImporterGLTF(); }; diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h index 927fac566e..0d3cb23697 100644 --- a/editor/import/resource_importer_bitmask.h +++ b/editor/import/resource_importer_bitmask.h @@ -40,18 +40,18 @@ class ResourceImporterBitMap : public ResourceImporter { GDCLASS(ResourceImporterBitMap, ResourceImporter); public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; - - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; - - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; + + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; + + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterBitMap(); ~ResourceImporterBitMap(); diff --git a/editor/import/resource_importer_csv.h b/editor/import/resource_importer_csv.h index 7aa48f68de..c9fbe75dd2 100644 --- a/editor/import/resource_importer_csv.h +++ b/editor/import/resource_importer_csv.h @@ -37,19 +37,19 @@ class ResourceImporterCSV : public ResourceImporter { GDCLASS(ResourceImporterCSV, ResourceImporter); public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterCSV(); }; diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h index 742f6b8f60..7c7646b640 100644 --- a/editor/import/resource_importer_csv_translation.h +++ b/editor/import/resource_importer_csv_translation.h @@ -37,19 +37,19 @@ class ResourceImporterCSVTranslation : public ResourceImporter { GDCLASS(ResourceImporterCSVTranslation, ResourceImporter); public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterCSVTranslation(); }; diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h index abb74d0665..dc9c2c3014 100644 --- a/editor/import/resource_importer_image.h +++ b/editor/import/resource_importer_image.h @@ -38,19 +38,19 @@ class ResourceImporterImage : public ResourceImporter { GDCLASS(ResourceImporterImage, ResourceImporter); public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterImage(); }; diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h index 18eaf31f6b..2d50889e9e 100644 --- a/editor/import/resource_importer_layered_texture.h +++ b/editor/import/resource_importer_layered_texture.h @@ -101,11 +101,11 @@ protected: public: static ResourceImporterLayeredTexture *get_singleton() { return singleton; } - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; enum CompressMode { COMPRESS_LOSSLESS, @@ -115,20 +115,20 @@ public: COMPRESS_BASIS_UNIVERSAL }; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; void _save_tex(Vector<Ref<Image>> p_images, const String &p_to_path, int p_compress_mode, float p_lossy, Image::CompressMode p_vram_compression, Image::CompressSource p_csource, Image::UsedChannels used_channels, bool p_mipmaps, bool p_force_po2); - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; void update_imports(); - virtual bool are_import_settings_valid(const String &p_path) const; - virtual String get_import_settings_string() const; + virtual bool are_import_settings_valid(const String &p_path) const override; + virtual String get_import_settings_string() const override; void set_mode(Mode p_mode) { mode = p_mode; } diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h index aec5de3dcc..4083bc7403 100644 --- a/editor/import/resource_importer_obj.h +++ b/editor/import/resource_importer_obj.h @@ -37,10 +37,10 @@ class EditorOBJImporter : public EditorSceneImporter { GDCLASS(EditorOBJImporter, EditorSceneImporter); public: - virtual uint32_t get_import_flags() const; - virtual void get_extensions(List<String> *r_extensions) const; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr); - virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps); + virtual uint32_t get_import_flags() const override; + virtual void get_extensions(List<String> *r_extensions) const override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; + virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) override; EditorOBJImporter(); }; @@ -49,19 +49,19 @@ class ResourceImporterOBJ : public ResourceImporter { GDCLASS(ResourceImporterOBJ, ResourceImporter); public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterOBJ(); }; diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 34d96bbc44..465d11116b 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -128,18 +128,18 @@ public: void add_importer(Ref<EditorSceneImporter> p_importer) { importers.insert(p_importer); } void remove_importer(Ref<EditorSceneImporter> p_importer) { importers.erase(p_importer); } - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; - virtual int get_import_order() const { return 100; } //after everything + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual int get_import_order() const override { return 100; } //after everything void _find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Transform> &meshes); @@ -152,7 +152,7 @@ public: void _filter_tracks(Node *scene, const String &p_text); void _optimize_animations(Node *scene, float p_max_lin_error, float p_max_ang_error, float p_max_angle); - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; Node *import_scene_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps); Ref<Animation> import_animation_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps); @@ -164,10 +164,10 @@ class EditorSceneImporterESCN : public EditorSceneImporter { GDCLASS(EditorSceneImporterESCN, EditorSceneImporter); public: - virtual uint32_t get_import_flags() const; - virtual void get_extensions(List<String> *r_extensions) const; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr); - virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps); + virtual uint32_t get_import_flags() const override; + virtual void get_extensions(List<String> *r_extensions) const override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; + virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) override; }; #endif // RESOURCEIMPORTERSCENE_H diff --git a/editor/import/resource_importer_shader_file.h b/editor/import/resource_importer_shader_file.h index fa95ceecc1..66ae626c51 100644 --- a/editor/import/resource_importer_shader_file.h +++ b/editor/import/resource_importer_shader_file.h @@ -37,19 +37,19 @@ class ResourceImporterShaderFile : public ResourceImporter { GDCLASS(ResourceImporterShaderFile, ResourceImporter); public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterShaderFile(); }; diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h index 12eb7f67c2..bc41aacae5 100644 --- a/editor/import/resource_importer_texture.h +++ b/editor/import/resource_importer_texture.h @@ -84,11 +84,11 @@ public: static void save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality); static ResourceImporterTexture *get_singleton() { return singleton; } - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; enum Preset { PRESET_DETECT, @@ -96,18 +96,18 @@ public: PRESET_3D, }; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; void update_imports(); - virtual bool are_import_settings_valid(const String &p_path) const; - virtual String get_import_settings_string() const; + virtual bool are_import_settings_valid(const String &p_path) const override; + virtual String get_import_settings_string() const override; ResourceImporterTexture(); ~ResourceImporterTexture(); diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h index c61fa5c040..25a662a333 100644 --- a/editor/import/resource_importer_texture_atlas.h +++ b/editor/import/resource_importer_texture_atlas.h @@ -50,21 +50,21 @@ public: IMPORT_MODE_2D_MESH }; - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; - virtual String get_option_group_file() const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual String get_option_group_file() const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); - virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) override; ResourceImporterTextureAtlas(); }; diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h index 3ff3aea9f4..3c4a8757eb 100644 --- a/editor/import/resource_importer_wav.h +++ b/editor/import/resource_importer_wav.h @@ -37,17 +37,17 @@ class ResourceImporterWAV : public ResourceImporter { GDCLASS(ResourceImporterWAV, ResourceImporter); public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; + virtual String get_importer_name() const override; + virtual String get_visible_name() const override; + virtual void get_recognized_extensions(List<String> *p_extensions) const override; + virtual String get_save_extension() const override; + virtual String get_resource_type() const override; - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; + virtual int get_preset_count() const override; + virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; static void _compress_ima_adpcm(const Vector<float> &p_data, Vector<uint8_t> &dst_data) { /*p_sample_data->data = (void*)malloc(len); @@ -162,7 +162,7 @@ public: } } - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr); + virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterWAV(); }; diff --git a/editor/node_3d_editor_gizmos.h b/editor/node_3d_editor_gizmos.h index 8154dc7a6d..c7aae39a45 100644 --- a/editor/node_3d_editor_gizmos.h +++ b/editor/node_3d_editor_gizmos.h @@ -40,15 +40,15 @@ class Light3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(Light3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); - void redraw(EditorNode3DGizmo *p_gizmo); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; + void redraw(EditorNode3DGizmo *p_gizmo) override; Light3DGizmoPlugin(); }; @@ -57,15 +57,15 @@ class AudioStreamPlayer3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(AudioStreamPlayer3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); - void redraw(EditorNode3DGizmo *p_gizmo); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; + void redraw(EditorNode3DGizmo *p_gizmo) override; AudioStreamPlayer3DGizmoPlugin(); }; @@ -74,15 +74,15 @@ class Camera3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(Camera3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); - void redraw(EditorNode3DGizmo *p_gizmo); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; + void redraw(EditorNode3DGizmo *p_gizmo) override; Camera3DGizmoPlugin(); }; @@ -91,11 +91,11 @@ class MeshInstance3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(MeshInstance3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - bool can_be_hidden() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + bool can_be_hidden() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; MeshInstance3DGizmoPlugin(); }; @@ -104,11 +104,11 @@ class Sprite3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(Sprite3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - bool can_be_hidden() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + bool can_be_hidden() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; Sprite3DGizmoPlugin(); }; @@ -120,10 +120,10 @@ class Position3DGizmoPlugin : public EditorNode3DGizmoPlugin { Vector<Vector3> cursor_points; public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; Position3DGizmoPlugin(); }; @@ -132,10 +132,10 @@ class Skeleton3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(Skeleton3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; Skeleton3DGizmoPlugin(); }; @@ -144,10 +144,10 @@ class PhysicalBone3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(PhysicalBone3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; PhysicalBone3DGizmoPlugin(); }; @@ -156,10 +156,10 @@ class RayCast3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(RayCast3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; RayCast3DGizmoPlugin(); }; @@ -168,10 +168,10 @@ class SpringArm3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(SpringArm3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; SpringArm3DGizmoPlugin(); }; @@ -180,10 +180,10 @@ class VehicleWheel3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(VehicleWheel3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; VehicleWheel3DGizmoPlugin(); }; @@ -192,16 +192,16 @@ class SoftBody3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(SoftBody3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - bool is_selectable_when_hidden() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + bool is_selectable_when_hidden() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel); - bool is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int idx) const; + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) override; + bool is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int idx) const override; SoftBody3DGizmoPlugin(); }; @@ -210,15 +210,15 @@ class VisibilityNotifier3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(VisibilityNotifier3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; VisibilityNotifier3DGizmoPlugin(); }; @@ -227,11 +227,11 @@ class CPUParticles3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(CPUParticles3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - bool is_selectable_when_hidden() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + bool is_selectable_when_hidden() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; CPUParticles3DGizmoPlugin(); }; @@ -239,16 +239,16 @@ class GPUParticles3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(GPUParticles3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - bool is_selectable_when_hidden() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + bool is_selectable_when_hidden() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; GPUParticles3DGizmoPlugin(); }; @@ -257,15 +257,15 @@ class ReflectionProbeGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(ReflectionProbeGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; ReflectionProbeGizmoPlugin(); }; @@ -274,15 +274,15 @@ class DecalGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(DecalGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; DecalGizmoPlugin(); }; @@ -291,15 +291,15 @@ class GIProbeGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(GIProbeGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; GIProbeGizmoPlugin(); }; @@ -308,15 +308,15 @@ class BakedLightmapGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(BakedLightmapGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; BakedLightmapGizmoPlugin(); }; @@ -325,15 +325,15 @@ class LightmapProbeGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(LightmapProbeGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; LightmapProbeGizmoPlugin(); }; @@ -342,15 +342,15 @@ class CollisionShape3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(CollisionShape3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; - String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const; - Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const; - void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); - void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override; + Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override; + void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; CollisionShape3DGizmoPlugin(); }; @@ -359,10 +359,10 @@ class CollisionPolygon3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(CollisionPolygon3DGizmoPlugin, EditorNode3DGizmoPlugin); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; CollisionPolygon3DGizmoPlugin(); }; @@ -377,10 +377,10 @@ class NavigationRegion3DGizmoPlugin : public EditorNode3DGizmoPlugin { }; public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; NavigationRegion3DGizmoPlugin(); }; @@ -409,10 +409,10 @@ class Joint3DGizmoPlugin : public EditorNode3DGizmoPlugin { void incremental_update_gizmos(); public: - bool has_gizmo(Node3D *p_spatial); - String get_name() const; - int get_priority() const; - void redraw(EditorNode3DGizmo *p_gizmo); + bool has_gizmo(Node3D *p_spatial) override; + String get_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; static void CreatePinJointGizmo(const Transform &p_offset, Vector<Vector3> &r_cursor_points); static void CreateHingeJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points); diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h index b3a17f7660..527803150d 100644 --- a/editor/plugins/abstract_polygon_2d_editor.h +++ b/editor/plugins/abstract_polygon_2d_editor.h @@ -156,14 +156,14 @@ class AbstractPolygon2DEditorPlugin : public EditorPlugin { String klass; public: - virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return polygon_editor->forward_gui_input(p_event); } - virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { polygon_editor->forward_canvas_draw_over_viewport(p_overlay); } - - bool has_main_screen() const { return false; } - virtual String get_name() const { return klass; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override { return polygon_editor->forward_gui_input(p_event); } + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override { polygon_editor->forward_canvas_draw_over_viewport(p_overlay); } + + bool has_main_screen() const override { return false; } + virtual String get_name() const override { return klass; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; AbstractPolygon2DEditorPlugin(EditorNode *p_node, AbstractPolygon2DEditor *p_polygon_editor, String p_class); ~AbstractPolygon2DEditorPlugin(); diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h index c319b648ba..5ff5da47c0 100644 --- a/editor/plugins/animation_blend_space_1d_editor.h +++ b/editor/plugins/animation_blend_space_1d_editor.h @@ -129,8 +129,8 @@ protected: public: static AnimationNodeBlendSpace1DEditor *get_singleton() { return singleton; } - virtual bool can_edit(const Ref<AnimationNode> &p_node); - virtual void edit(const Ref<AnimationNode> &p_node); + virtual bool can_edit(const Ref<AnimationNode> &p_node) override; + virtual void edit(const Ref<AnimationNode> &p_node) override; AnimationNodeBlendSpace1DEditor(); }; diff --git a/editor/plugins/animation_blend_space_2d_editor.h b/editor/plugins/animation_blend_space_2d_editor.h index 659b96cefa..64885aeaca 100644 --- a/editor/plugins/animation_blend_space_2d_editor.h +++ b/editor/plugins/animation_blend_space_2d_editor.h @@ -142,8 +142,8 @@ protected: public: static AnimationNodeBlendSpace2DEditor *get_singleton() { return singleton; } - virtual bool can_edit(const Ref<AnimationNode> &p_node); - virtual void edit(const Ref<AnimationNode> &p_node); + virtual bool can_edit(const Ref<AnimationNode> &p_node) override; + virtual void edit(const Ref<AnimationNode> &p_node) override; AnimationNodeBlendSpace2DEditor(); }; diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h index 6bdb7e7909..3ebf623eef 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.h +++ b/editor/plugins/animation_blend_tree_editor_plugin.h @@ -129,10 +129,10 @@ public: void add_custom_type(const String &p_name, const Ref<Script> &p_script); void remove_custom_type(const Ref<Script> &p_script); - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; - virtual bool can_edit(const Ref<AnimationNode> &p_node); - virtual void edit(const Ref<AnimationNode> &p_node); + virtual bool can_edit(const Ref<AnimationNode> &p_node) override; + virtual void edit(const Ref<AnimationNode> &p_node) override; AnimationNodeBlendTreeEditor(); }; diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h index fe96deecf2..e11db1390b 100644 --- a/editor/plugins/animation_player_editor_plugin.h +++ b/editor/plugins/animation_player_editor_plugin.h @@ -251,16 +251,16 @@ protected: void _notification(int p_what); public: - virtual Dictionary get_state() const { return anim_editor->get_state(); } - virtual void set_state(const Dictionary &p_state) { anim_editor->set_state(p_state); } + virtual Dictionary get_state() const override { return anim_editor->get_state(); } + virtual void set_state(const Dictionary &p_state) override { anim_editor->set_state(p_state); } - virtual String get_name() const { return "Anim"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Anim"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; - virtual void forward_canvas_force_draw_over_viewport(Control *p_overlay) { anim_editor->forward_canvas_force_draw_over_viewport(p_overlay); } + virtual void forward_canvas_force_draw_over_viewport(Control *p_overlay) override { anim_editor->forward_canvas_force_draw_over_viewport(p_overlay); } AnimationPlayerEditorPlugin(EditorNode *p_node); ~AnimationPlayerEditorPlugin(); diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h index c4caf2e52b..f78d90bdbf 100644 --- a/editor/plugins/animation_state_machine_editor.h +++ b/editor/plugins/animation_state_machine_editor.h @@ -182,8 +182,8 @@ protected: public: static AnimationNodeStateMachineEditor *get_singleton() { return singleton; } - virtual bool can_edit(const Ref<AnimationNode> &p_node); - virtual void edit(const Ref<AnimationNode> &p_node); + virtual bool can_edit(const Ref<AnimationNode> &p_node) override; + virtual void edit(const Ref<AnimationNode> &p_node) override; AnimationNodeStateMachineEditor(); }; diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h index 79a010b0c0..356a078d99 100644 --- a/editor/plugins/animation_tree_editor_plugin.h +++ b/editor/plugins/animation_tree_editor_plugin.h @@ -101,11 +101,11 @@ class AnimationTreeEditorPlugin : public EditorPlugin { Button *button; public: - virtual String get_name() const { return "AnimationTree"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "AnimationTree"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; AnimationTreeEditorPlugin(EditorNode *p_node); ~AnimationTreeEditorPlugin(); diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index d5d381dee3..3fca8a1084 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -311,11 +311,11 @@ class AssetLibraryEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "AssetLib"; } - bool has_main_screen() const { return true; } - virtual void edit(Object *p_object) {} - virtual bool handles(Object *p_object) const { return false; } - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "AssetLib"; } + bool has_main_screen() const override { return true; } + virtual void edit(Object *p_object) override {} + virtual bool handles(Object *p_object) const override { return false; } + virtual void make_visible(bool p_visible) override; //virtual bool get_remove_list(List<Node*> *p_list) { return canvas_item_editor->get_remove_list(p_list); } //virtual Dictionary get_state() const; //virtual void set_state(const Dictionary& p_state); diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h index de176aab49..5936b91fa1 100644 --- a/editor/plugins/audio_stream_editor_plugin.h +++ b/editor/plugins/audio_stream_editor_plugin.h @@ -63,7 +63,7 @@ protected: void _draw_indicator(); void _on_input_indicator(Ref<InputEvent> p_event); void _seek_to(real_t p_x); - void _changed_callback(Object *p_changed, const char *p_prop); + void _changed_callback(Object *p_changed, const char *p_prop) override; static void _bind_methods(); public: @@ -78,11 +78,11 @@ class AudioStreamEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "Audio"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Audio"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; AudioStreamEditorPlugin(EditorNode *p_node); ~AudioStreamEditorPlugin(); diff --git a/editor/plugins/baked_lightmap_editor_plugin.h b/editor/plugins/baked_lightmap_editor_plugin.h index 54eb0f71ec..b4c7c07562 100644 --- a/editor/plugins/baked_lightmap_editor_plugin.h +++ b/editor/plugins/baked_lightmap_editor_plugin.h @@ -56,11 +56,11 @@ protected: static void _bind_methods(); public: - virtual String get_name() const { return "BakedLightmap"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "BakedLightmap"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; BakedLightmapEditorPlugin(EditorNode *p_node); ~BakedLightmapEditorPlugin(); diff --git a/editor/plugins/camera_3d_editor_plugin.h b/editor/plugins/camera_3d_editor_plugin.h index 2603229a46..023f1866df 100644 --- a/editor/plugins/camera_3d_editor_plugin.h +++ b/editor/plugins/camera_3d_editor_plugin.h @@ -60,11 +60,11 @@ class Camera3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "Camera3D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Camera3D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; Camera3DEditorPlugin(EditorNode *p_node); ~Camera3DEditorPlugin(); diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index c5d74c6fc9..12abf05cf9 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -649,13 +649,13 @@ class CanvasItemEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "2D"; } - bool has_main_screen() const { return true; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); - virtual Dictionary get_state() const; - virtual void set_state(const Dictionary &p_state); + virtual String get_name() const override { return "2D"; } + bool has_main_screen() const override { return true; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; + virtual Dictionary get_state() const override; + virtual void set_state(const Dictionary &p_state) override; CanvasItemEditor *get_canvas_item_editor() { return canvas_item_editor; } @@ -706,8 +706,8 @@ protected: void _notification(int p_what); public: - virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const; - virtual void drop_data(const Point2 &p_point, const Variant &p_data); + virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override; + virtual void drop_data(const Point2 &p_point, const Variant &p_data) override; CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor *p_canvas_item_editor); ~CanvasItemEditorViewport(); diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.h b/editor/plugins/collision_polygon_2d_editor_plugin.h index b0be92db44..482f00a7f7 100644 --- a/editor/plugins/collision_polygon_2d_editor_plugin.h +++ b/editor/plugins/collision_polygon_2d_editor_plugin.h @@ -40,8 +40,8 @@ class CollisionPolygon2DEditor : public AbstractPolygon2DEditor { CollisionPolygon2D *node; protected: - virtual Node2D *_get_node() const; - virtual void _set_node(Node *p_polygon); + virtual Node2D *_get_node() const override; + virtual void _set_node(Node *p_polygon) override; public: CollisionPolygon2DEditor(EditorNode *p_editor); diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.h b/editor/plugins/collision_polygon_3d_editor_plugin.h index 05b8df520c..98f499031a 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.h +++ b/editor/plugins/collision_polygon_3d_editor_plugin.h @@ -101,13 +101,13 @@ class Polygon3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { return collision_polygon_editor->forward_spatial_gui_input(p_camera, p_event); } + virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return collision_polygon_editor->forward_spatial_gui_input(p_camera, p_event); } - virtual String get_name() const { return "Polygon3DEditor"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Polygon3DEditor"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; Polygon3DEditorPlugin(EditorNode *p_node); ~Polygon3DEditorPlugin(); diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h index 6bb621c476..083ceb4b38 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.h +++ b/editor/plugins/collision_shape_2d_editor_plugin.h @@ -90,14 +90,14 @@ class CollisionShape2DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return collision_shape_2d_editor->forward_canvas_gui_input(p_event); } - virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { collision_shape_2d_editor->forward_canvas_draw_over_viewport(p_overlay); } - - virtual String get_name() const { return "CollisionShape2D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_obj); - virtual bool handles(Object *p_obj) const; - virtual void make_visible(bool visible); + virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override { return collision_shape_2d_editor->forward_canvas_gui_input(p_event); } + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override { collision_shape_2d_editor->forward_canvas_draw_over_viewport(p_overlay); } + + virtual String get_name() const override { return "CollisionShape2D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_obj) override; + virtual bool handles(Object *p_obj) const override; + virtual void make_visible(bool visible) override; CollisionShape2DEditorPlugin(EditorNode *p_editor); ~CollisionShape2DEditorPlugin(); diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.h b/editor/plugins/cpu_particles_2d_editor_plugin.h index fecbb8b1cd..58984d6d16 100644 --- a/editor/plugins/cpu_particles_2d_editor_plugin.h +++ b/editor/plugins/cpu_particles_2d_editor_plugin.h @@ -79,11 +79,11 @@ protected: static void _bind_methods(); public: - virtual String get_name() const { return "CPUParticles2D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "CPUParticles2D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; CPUParticles2DEditorPlugin(EditorNode *p_node); ~CPUParticles2DEditorPlugin(); diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.h b/editor/plugins/cpu_particles_3d_editor_plugin.h index d9680496ba..90300daf71 100644 --- a/editor/plugins/cpu_particles_3d_editor_plugin.h +++ b/editor/plugins/cpu_particles_3d_editor_plugin.h @@ -51,7 +51,7 @@ class CPUParticles3DEditor : public GPUParticles3DEditorBase { friend class CPUParticles3DEditorPlugin; - virtual void _generate_emission_points(); + virtual void _generate_emission_points() override; protected: void _notification(int p_notification); @@ -70,11 +70,11 @@ class CPUParticles3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "CPUParticles3D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "CPUParticles3D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; CPUParticles3DEditorPlugin(EditorNode *p_node); ~CPUParticles3DEditorPlugin(); diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h index c00aa3eca5..2872f65730 100644 --- a/editor/plugins/curve_editor_plugin.h +++ b/editor/plugins/curve_editor_plugin.h @@ -43,7 +43,7 @@ class CurveEditor : public Control { public: CurveEditor(); - Size2 get_minimum_size() const; + Size2 get_minimum_size() const override; void set_curve(Ref<Curve> curve); @@ -123,8 +123,8 @@ class EditorInspectorPluginCurve : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginCurve, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; }; class CurveEditorPlugin : public EditorPlugin { @@ -133,15 +133,15 @@ class CurveEditorPlugin : public EditorPlugin { public: CurveEditorPlugin(EditorNode *p_node); - virtual String get_name() const { return "Curve"; } + virtual String get_name() const override { return "Curve"; } }; class CurvePreviewGenerator : public EditorResourcePreviewGenerator { GDCLASS(CurvePreviewGenerator, EditorResourcePreviewGenerator); public: - virtual bool handles(const String &p_type) const; - virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const; + virtual bool handles(const String &p_type) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; }; #endif // CURVE_EDITOR_PLUGIN_H diff --git a/editor/plugins/debugger_editor_plugin.h b/editor/plugins/debugger_editor_plugin.h index 465041b5a7..c5ae4cd8a9 100644 --- a/editor/plugins/debugger_editor_plugin.h +++ b/editor/plugins/debugger_editor_plugin.h @@ -61,8 +61,8 @@ private: void _menu_option(int p_option); public: - virtual String get_name() const { return "Debugger"; } - bool has_main_screen() const { return false; } + virtual String get_name() const override { return "Debugger"; } + bool has_main_screen() const override { return false; } DebuggerEditorPlugin(EditorNode *p_node, MenuButton *p_menu); ~DebuggerEditorPlugin(); diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h index 8a9d6a93fb..9885efc2b5 100644 --- a/editor/plugins/editor_preview_plugins.h +++ b/editor/plugins/editor_preview_plugins.h @@ -39,9 +39,9 @@ class EditorTexturePreviewPlugin : public EditorResourcePreviewGenerator { GDCLASS(EditorTexturePreviewPlugin, EditorResourcePreviewGenerator); public: - virtual bool handles(const String &p_type) const; - virtual bool generate_small_preview_automatically() const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual bool handles(const String &p_type) const override; + virtual bool generate_small_preview_automatically() const override; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; EditorTexturePreviewPlugin(); }; @@ -50,9 +50,9 @@ class EditorImagePreviewPlugin : public EditorResourcePreviewGenerator { GDCLASS(EditorImagePreviewPlugin, EditorResourcePreviewGenerator); public: - virtual bool handles(const String &p_type) const; - virtual bool generate_small_preview_automatically() const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual bool handles(const String &p_type) const override; + virtual bool generate_small_preview_automatically() const override; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; EditorImagePreviewPlugin(); }; @@ -61,9 +61,9 @@ class EditorBitmapPreviewPlugin : public EditorResourcePreviewGenerator { GDCLASS(EditorBitmapPreviewPlugin, EditorResourcePreviewGenerator); public: - virtual bool handles(const String &p_type) const; - virtual bool generate_small_preview_automatically() const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual bool handles(const String &p_type) const override; + virtual bool generate_small_preview_automatically() const override; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; EditorBitmapPreviewPlugin(); }; @@ -98,9 +98,9 @@ protected: static void _bind_methods(); public: - virtual bool handles(const String &p_type) const; - virtual bool generate_small_preview_automatically() const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual bool handles(const String &p_type) const override; + virtual bool generate_small_preview_automatically() const override; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; EditorMaterialPreviewPlugin(); ~EditorMaterialPreviewPlugin(); @@ -142,8 +142,8 @@ protected: static void _bind_methods(); public: - virtual bool handles(const String &p_type) const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual bool handles(const String &p_type) const override; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; EditorMeshPreviewPlugin(); ~EditorMeshPreviewPlugin(); @@ -164,9 +164,9 @@ protected: static void _bind_methods(); public: - virtual bool handles(const String &p_type) const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; - virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const; + virtual bool handles(const String &p_type) const override; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const override; EditorFontPreviewPlugin(); ~EditorFontPreviewPlugin(); diff --git a/editor/plugins/gi_probe_editor_plugin.h b/editor/plugins/gi_probe_editor_plugin.h index e55f287908..85d2b6f449 100644 --- a/editor/plugins/gi_probe_editor_plugin.h +++ b/editor/plugins/gi_probe_editor_plugin.h @@ -61,11 +61,11 @@ protected: void _notification(int p_what); public: - virtual String get_name() const { return "GIProbe"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "GIProbe"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; GIProbeEditorPlugin(EditorNode *p_node); ~GIProbeEditorPlugin(); diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.h b/editor/plugins/gpu_particles_2d_editor_plugin.h index c76cecb3a2..86e89bd0b0 100644 --- a/editor/plugins/gpu_particles_2d_editor_plugin.h +++ b/editor/plugins/gpu_particles_2d_editor_plugin.h @@ -86,11 +86,11 @@ protected: static void _bind_methods(); public: - virtual String get_name() const { return "GPUParticles2D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "GPUParticles2D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; GPUParticles2DEditorPlugin(EditorNode *p_node); ~GPUParticles2DEditorPlugin(); diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.h b/editor/plugins/gpu_particles_3d_editor_plugin.h index 7838a63436..1665b3676a 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.h +++ b/editor/plugins/gpu_particles_3d_editor_plugin.h @@ -86,7 +86,7 @@ class GPUParticles3DEditor : public GPUParticles3DEditorBase { friend class GPUParticles3DEditorPlugin; - virtual void _generate_emission_points(); + virtual void _generate_emission_points() override; protected: void _notification(int p_notification); @@ -105,11 +105,11 @@ class GPUParticles3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "GPUParticles3D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "GPUParticles3D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; GPUParticles3DEditorPlugin(EditorNode *p_node); ~GPUParticles3DEditorPlugin(); diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h index 0641d54d5c..59cf787020 100644 --- a/editor/plugins/gradient_editor_plugin.h +++ b/editor/plugins/gradient_editor_plugin.h @@ -48,7 +48,7 @@ protected: static void _bind_methods(); public: - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void set_gradient(const Ref<Gradient> &p_gradient); GradientEditor(); }; @@ -57,15 +57,15 @@ class EditorInspectorPluginGradient : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginGradient, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; }; class GradientEditorPlugin : public EditorPlugin { GDCLASS(GradientEditorPlugin, EditorPlugin); public: - virtual String get_name() const { return "ColorRamp"; } + virtual String get_name() const override { return "ColorRamp"; } GradientEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h index d89631633c..87586904a3 100644 --- a/editor/plugins/item_list_editor_plugin.h +++ b/editor/plugins/item_list_editor_plugin.h @@ -100,25 +100,25 @@ class ItemListOptionButtonPlugin : public ItemListPlugin { OptionButton *ob; public: - virtual void set_object(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual int get_flags() const; + virtual void set_object(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual int get_flags() const override; - virtual void set_item_text(int p_idx, const String &p_text) { ob->set_item_text(p_idx, p_text); } - virtual String get_item_text(int p_idx) const { return ob->get_item_text(p_idx); } + virtual void set_item_text(int p_idx, const String &p_text) override { ob->set_item_text(p_idx, p_text); } + virtual String get_item_text(int p_idx) const override { return ob->get_item_text(p_idx); } - virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) { ob->set_item_icon(p_idx, p_tex); } - virtual Ref<Texture2D> get_item_icon(int p_idx) const { return ob->get_item_icon(p_idx); } + virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) override { ob->set_item_icon(p_idx, p_tex); } + virtual Ref<Texture2D> get_item_icon(int p_idx) const override { return ob->get_item_icon(p_idx); } - virtual void set_item_enabled(int p_idx, int p_enabled) { ob->set_item_disabled(p_idx, !p_enabled); } - virtual bool is_item_enabled(int p_idx) const { return !ob->is_item_disabled(p_idx); } + virtual void set_item_enabled(int p_idx, int p_enabled) override { ob->set_item_disabled(p_idx, !p_enabled); } + virtual bool is_item_enabled(int p_idx) const override { return !ob->is_item_disabled(p_idx); } - virtual void set_item_id(int p_idx, int p_id) { ob->set_item_id(p_idx, p_id); } - virtual int get_item_id(int p_idx) const { return ob->get_item_id(p_idx); } + virtual void set_item_id(int p_idx, int p_id) override { ob->set_item_id(p_idx, p_id); } + virtual int get_item_id(int p_idx) const override { return ob->get_item_id(p_idx); } - virtual void add_item(); - virtual int get_item_count() const; - virtual void erase(int p_idx); + virtual void add_item() override; + virtual int get_item_count() const override; + virtual void erase(int p_idx) override; ItemListOptionButtonPlugin(); }; @@ -129,36 +129,36 @@ class ItemListPopupMenuPlugin : public ItemListPlugin { PopupMenu *pp; public: - virtual void set_object(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual int get_flags() const; + virtual void set_object(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual int get_flags() const override; - virtual void set_item_text(int p_idx, const String &p_text) { pp->set_item_text(p_idx, p_text); } - virtual String get_item_text(int p_idx) const { return pp->get_item_text(p_idx); } + virtual void set_item_text(int p_idx, const String &p_text) override { pp->set_item_text(p_idx, p_text); } + virtual String get_item_text(int p_idx) const override { return pp->get_item_text(p_idx); } - virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) { pp->set_item_icon(p_idx, p_tex); } - virtual Ref<Texture2D> get_item_icon(int p_idx) const { return pp->get_item_icon(p_idx); } + virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) override { pp->set_item_icon(p_idx, p_tex); } + virtual Ref<Texture2D> get_item_icon(int p_idx) const override { return pp->get_item_icon(p_idx); } - virtual void set_item_checkable(int p_idx, bool p_check) { pp->set_item_as_checkable(p_idx, p_check); } - virtual void set_item_radio_checkable(int p_idx, bool p_check) { pp->set_item_as_radio_checkable(p_idx, p_check); } - virtual bool is_item_checkable(int p_idx) const { return pp->is_item_checkable(p_idx); } - virtual bool is_item_radio_checkable(int p_idx) const { return pp->is_item_radio_checkable(p_idx); } + virtual void set_item_checkable(int p_idx, bool p_check) override { pp->set_item_as_checkable(p_idx, p_check); } + virtual void set_item_radio_checkable(int p_idx, bool p_check) override { pp->set_item_as_radio_checkable(p_idx, p_check); } + virtual bool is_item_checkable(int p_idx) const override { return pp->is_item_checkable(p_idx); } + virtual bool is_item_radio_checkable(int p_idx) const override { return pp->is_item_radio_checkable(p_idx); } - virtual void set_item_checked(int p_idx, bool p_checked) { pp->set_item_checked(p_idx, p_checked); } - virtual bool is_item_checked(int p_idx) const { return pp->is_item_checked(p_idx); } + virtual void set_item_checked(int p_idx, bool p_checked) override { pp->set_item_checked(p_idx, p_checked); } + virtual bool is_item_checked(int p_idx) const override { return pp->is_item_checked(p_idx); } - virtual void set_item_enabled(int p_idx, int p_enabled) { pp->set_item_disabled(p_idx, !p_enabled); } - virtual bool is_item_enabled(int p_idx) const { return !pp->is_item_disabled(p_idx); } + virtual void set_item_enabled(int p_idx, int p_enabled) override { pp->set_item_disabled(p_idx, !p_enabled); } + virtual bool is_item_enabled(int p_idx) const override { return !pp->is_item_disabled(p_idx); } - virtual void set_item_id(int p_idx, int p_id) { pp->set_item_id(p_idx, p_id); } - virtual int get_item_id(int p_idx) const { return pp->get_item_id(p_idx); } + virtual void set_item_id(int p_idx, int p_id) override { pp->set_item_id(p_idx, p_id); } + virtual int get_item_id(int p_idx) const override { return pp->get_item_id(p_idx); } - virtual void set_item_separator(int p_idx, bool p_separator) { pp->set_item_as_separator(p_idx, p_separator); } - virtual bool is_item_separator(int p_idx) const { return pp->is_item_separator(p_idx); } + virtual void set_item_separator(int p_idx, bool p_separator) override { pp->set_item_as_separator(p_idx, p_separator); } + virtual bool is_item_separator(int p_idx) const override { return pp->is_item_separator(p_idx); } - virtual void add_item(); - virtual int get_item_count() const; - virtual void erase(int p_idx); + virtual void add_item() override; + virtual int get_item_count() const override; + virtual void erase(int p_idx) override; ItemListPopupMenuPlugin(); }; @@ -171,22 +171,22 @@ class ItemListItemListPlugin : public ItemListPlugin { ItemList *pp; public: - virtual void set_object(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual int get_flags() const; + virtual void set_object(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual int get_flags() const override; - virtual void set_item_text(int p_idx, const String &p_text) { pp->set_item_text(p_idx, p_text); } - virtual String get_item_text(int p_idx) const { return pp->get_item_text(p_idx); } + virtual void set_item_text(int p_idx, const String &p_text) override { pp->set_item_text(p_idx, p_text); } + virtual String get_item_text(int p_idx) const override { return pp->get_item_text(p_idx); } - virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) { pp->set_item_icon(p_idx, p_tex); } - virtual Ref<Texture2D> get_item_icon(int p_idx) const { return pp->get_item_icon(p_idx); } + virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) override { pp->set_item_icon(p_idx, p_tex); } + virtual Ref<Texture2D> get_item_icon(int p_idx) const override { return pp->get_item_icon(p_idx); } - virtual void set_item_enabled(int p_idx, int p_enabled) { pp->set_item_disabled(p_idx, !p_enabled); } - virtual bool is_item_enabled(int p_idx) const { return !pp->is_item_disabled(p_idx); } + virtual void set_item_enabled(int p_idx, int p_enabled) override { pp->set_item_disabled(p_idx, !p_enabled); } + virtual bool is_item_enabled(int p_idx) const override { return !pp->is_item_disabled(p_idx); } - virtual void add_item(); - virtual int get_item_count() const; - virtual void erase(int p_idx); + virtual void add_item() override; + virtual int get_item_count() const override; + virtual void erase(int p_idx) override; ItemListItemListPlugin(); }; @@ -236,11 +236,11 @@ class ItemListEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "ItemList"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "ItemList"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; ItemListEditorPlugin(EditorNode *p_node); ~ItemListEditorPlugin(); diff --git a/editor/plugins/light_occluder_2d_editor_plugin.h b/editor/plugins/light_occluder_2d_editor_plugin.h index 11c9f2b2a4..e034a41ddc 100644 --- a/editor/plugins/light_occluder_2d_editor_plugin.h +++ b/editor/plugins/light_occluder_2d_editor_plugin.h @@ -42,18 +42,18 @@ class LightOccluder2DEditor : public AbstractPolygon2DEditor { Ref<OccluderPolygon2D> _ensure_occluder() const; protected: - virtual Node2D *_get_node() const; - virtual void _set_node(Node *p_polygon); + virtual Node2D *_get_node() const override; + virtual void _set_node(Node *p_polygon) override; - virtual bool _is_line() const; - virtual int _get_polygon_count() const; - virtual Variant _get_polygon(int p_idx) const; - virtual void _set_polygon(int p_idx, const Variant &p_polygon) const; + virtual bool _is_line() const override; + virtual int _get_polygon_count() const override; + virtual Variant _get_polygon(int p_idx) const override; + virtual void _set_polygon(int p_idx, const Variant &p_polygon) const override; - virtual void _action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon); + virtual void _action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) override; - virtual bool _has_resource() const; - virtual void _create_resource(); + virtual bool _has_resource() const override; + virtual void _create_resource() override; public: LightOccluder2DEditor(EditorNode *p_editor); diff --git a/editor/plugins/line_2d_editor_plugin.h b/editor/plugins/line_2d_editor_plugin.h index bf411a070a..b3bc9df3a5 100644 --- a/editor/plugins/line_2d_editor_plugin.h +++ b/editor/plugins/line_2d_editor_plugin.h @@ -40,13 +40,13 @@ class Line2DEditor : public AbstractPolygon2DEditor { Line2D *node; protected: - virtual Node2D *_get_node() const; - virtual void _set_node(Node *p_line); + virtual Node2D *_get_node() const override; + virtual void _set_node(Node *p_line) override; - virtual bool _is_line() const; - virtual Variant _get_polygon(int p_idx) const; - virtual void _set_polygon(int p_idx, const Variant &p_polygon) const; - virtual void _action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon); + virtual bool _is_line() const override; + virtual Variant _get_polygon(int p_idx) const override; + virtual void _set_polygon(int p_idx, const Variant &p_polygon) const override; + virtual void _action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) override; public: Line2DEditor(EditorNode *p_editor); diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h index e03cb1b3ab..a6df790620 100644 --- a/editor/plugins/material_editor_plugin.h +++ b/editor/plugins/material_editor_plugin.h @@ -83,8 +83,8 @@ class EditorInspectorPluginMaterial : public EditorInspectorPlugin { Ref<Environment> env; public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; EditorInspectorPluginMaterial(); }; @@ -93,7 +93,7 @@ class MaterialEditorPlugin : public EditorPlugin { GDCLASS(MaterialEditorPlugin, EditorPlugin); public: - virtual String get_name() const { return "Material"; } + virtual String get_name() const override { return "Material"; } MaterialEditorPlugin(EditorNode *p_node); }; @@ -102,54 +102,54 @@ class StandardMaterial3DConversionPlugin : public EditorResourceConversionPlugin GDCLASS(StandardMaterial3DConversionPlugin, EditorResourceConversionPlugin); public: - virtual String converts_to() const; - virtual bool handles(const Ref<Resource> &p_resource) const; - virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; class ParticlesMaterialConversionPlugin : public EditorResourceConversionPlugin { GDCLASS(ParticlesMaterialConversionPlugin, EditorResourceConversionPlugin); public: - virtual String converts_to() const; - virtual bool handles(const Ref<Resource> &p_resource) const; - virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; class CanvasItemMaterialConversionPlugin : public EditorResourceConversionPlugin { GDCLASS(CanvasItemMaterialConversionPlugin, EditorResourceConversionPlugin); public: - virtual String converts_to() const; - virtual bool handles(const Ref<Resource> &p_resource) const; - virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; class ProceduralSkyMaterialConversionPlugin : public EditorResourceConversionPlugin { GDCLASS(ProceduralSkyMaterialConversionPlugin, EditorResourceConversionPlugin); public: - virtual String converts_to() const; - virtual bool handles(const Ref<Resource> &p_resource) const; - virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; class PanoramaSkyMaterialConversionPlugin : public EditorResourceConversionPlugin { GDCLASS(PanoramaSkyMaterialConversionPlugin, EditorResourceConversionPlugin); public: - virtual String converts_to() const; - virtual bool handles(const Ref<Resource> &p_resource) const; - virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; class PhysicalSkyMaterialConversionPlugin : public EditorResourceConversionPlugin { GDCLASS(PhysicalSkyMaterialConversionPlugin, EditorResourceConversionPlugin); public: - virtual String converts_to() const; - virtual bool handles(const Ref<Resource> &p_resource) const; - virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; #endif // MATERIAL_EDITOR_PLUGIN_H diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h index 6f171a0eab..1fb0babb10 100644 --- a/editor/plugins/mesh_editor_plugin.h +++ b/editor/plugins/mesh_editor_plugin.h @@ -76,15 +76,15 @@ class EditorInspectorPluginMesh : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginMesh, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; }; class MeshEditorPlugin : public EditorPlugin { GDCLASS(MeshEditorPlugin, EditorPlugin); public: - virtual String get_name() const { return "Mesh"; } + virtual String get_name() const override { return "Mesh"; } MeshEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.h b/editor/plugins/mesh_instance_3d_editor_plugin.h index 3350a792bc..77a2b8ec34 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.h +++ b/editor/plugins/mesh_instance_3d_editor_plugin.h @@ -89,11 +89,11 @@ class MeshInstance3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "MeshInstance3D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "MeshInstance3D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; MeshInstance3DEditorPlugin(EditorNode *p_node); ~MeshInstance3DEditorPlugin(); diff --git a/editor/plugins/mesh_library_editor_plugin.h b/editor/plugins/mesh_library_editor_plugin.h index 61ce5692bc..ea13303740 100644 --- a/editor/plugins/mesh_library_editor_plugin.h +++ b/editor/plugins/mesh_library_editor_plugin.h @@ -79,11 +79,11 @@ class MeshLibraryEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "MeshLibrary"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_node); - virtual bool handles(Object *p_node) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "MeshLibrary"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_node) override; + virtual bool handles(Object *p_node) const override; + virtual void make_visible(bool p_visible) override; MeshLibraryEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/multimesh_editor_plugin.h b/editor/plugins/multimesh_editor_plugin.h index 2b0a0c137f..d1f8a3b74a 100644 --- a/editor/plugins/multimesh_editor_plugin.h +++ b/editor/plugins/multimesh_editor_plugin.h @@ -88,11 +88,11 @@ class MultiMeshEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "MultiMesh"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "MultiMesh"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; MultiMeshEditorPlugin(EditorNode *p_node); ~MultiMeshEditorPlugin(); diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h index 0767322c17..3c5a7c2829 100644 --- a/editor/plugins/navigation_polygon_editor_plugin.h +++ b/editor/plugins/navigation_polygon_editor_plugin.h @@ -42,19 +42,19 @@ class NavigationPolygonEditor : public AbstractPolygon2DEditor { Ref<NavigationPolygon> _ensure_navpoly() const; protected: - virtual Node2D *_get_node() const; - virtual void _set_node(Node *p_polygon); + virtual Node2D *_get_node() const override; + virtual void _set_node(Node *p_polygon) override; - virtual int _get_polygon_count() const; - virtual Variant _get_polygon(int p_idx) const; - virtual void _set_polygon(int p_idx, const Variant &p_polygon) const; + virtual int _get_polygon_count() const override; + virtual Variant _get_polygon(int p_idx) const override; + virtual void _set_polygon(int p_idx, const Variant &p_polygon) const override; - virtual void _action_add_polygon(const Variant &p_polygon); - virtual void _action_remove_polygon(int p_idx); - virtual void _action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon); + virtual void _action_add_polygon(const Variant &p_polygon) override; + virtual void _action_remove_polygon(int p_idx) override; + virtual void _action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) override; - virtual bool _has_resource() const; - virtual void _create_resource(); + virtual bool _has_resource() const override; + virtual void _create_resource() override; public: NavigationPolygonEditor(EditorNode *p_editor); diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index a40de78795..6a8af38742 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -122,11 +122,11 @@ public: bool intersect_frustum(const Camera3D *p_camera, const Vector<Plane> &p_frustum); bool intersect_ray(Camera3D *p_camera, const Point2 &p_point, Vector3 &r_pos, Vector3 &r_normal, int *r_gizmo_handle = nullptr, bool p_sec_first = false); - virtual void clear(); - virtual void create(); - virtual void transform(); - virtual void redraw(); - virtual void free(); + virtual void clear() override; + virtual void create() override; + virtual void transform() override; + virtual void redraw() override; + virtual void free() override; virtual bool is_editable() const; @@ -826,17 +826,17 @@ public: void snap_cursor_to_plane(const Plane &p_plane); Node3DEditor *get_spatial_editor() { return spatial_editor; } - virtual String get_name() const { return "3D"; } - bool has_main_screen() const { return true; } - virtual void make_visible(bool p_visible); - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; + virtual String get_name() const override { return "3D"; } + bool has_main_screen() const override { return true; } + virtual void make_visible(bool p_visible) override; + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; - virtual Dictionary get_state() const; - virtual void set_state(const Dictionary &p_state); - virtual void clear() { spatial_editor->clear(); } + virtual Dictionary get_state() const override; + virtual void set_state(const Dictionary &p_state) override; + virtual void clear() override { spatial_editor->clear(); } - virtual void edited_scene_changed(); + virtual void edited_scene_changed() override; Node3DEditorPlugin(EditorNode *p_node); ~Node3DEditorPlugin(); diff --git a/editor/plugins/packed_scene_translation_parser_plugin.h b/editor/plugins/packed_scene_translation_parser_plugin.h index 9fead84c3f..2bd4dae995 100644 --- a/editor/plugins/packed_scene_translation_parser_plugin.h +++ b/editor/plugins/packed_scene_translation_parser_plugin.h @@ -40,8 +40,8 @@ class PackedSceneEditorTranslationParserPlugin : public EditorTranslationParserP Set<String> lookup_properties; public: - virtual Error parse_file(const String &p_path, Vector<String> *r_extracted_strings); - virtual void get_recognized_extensions(List<String> *r_extensions) const; + virtual Error parse_file(const String &p_path, Vector<String> *r_extracted_strings) override; + virtual void get_recognized_extensions(List<String> *r_extensions) const override; PackedSceneEditorTranslationParserPlugin(); }; diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h index d0c02b28d4..6a7dffc7f8 100644 --- a/editor/plugins/path_2d_editor_plugin.h +++ b/editor/plugins/path_2d_editor_plugin.h @@ -116,14 +116,14 @@ class Path2DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return path2d_editor->forward_gui_input(p_event); } - virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { path2d_editor->forward_canvas_draw_over_viewport(p_overlay); } - - virtual String get_name() const { return "Path2D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override { return path2d_editor->forward_gui_input(p_event); } + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override { path2d_editor->forward_canvas_draw_over_viewport(p_overlay); } + + virtual String get_name() const override { return "Path2D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; Path2DEditorPlugin(EditorNode *p_node); ~Path2DEditorPlugin(); diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h index 3a75717b73..be275944a6 100644 --- a/editor/plugins/path_3d_editor_plugin.h +++ b/editor/plugins/path_3d_editor_plugin.h @@ -43,12 +43,12 @@ class Path3DGizmo : public EditorNode3DGizmo { mutable float orig_out_length; public: - virtual String get_handle_name(int p_idx) const; - virtual Variant get_handle_value(int p_idx); - virtual void set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point); - virtual void commit_handle(int p_idx, const Variant &p_restore, bool p_cancel = false); + virtual String get_handle_name(int p_idx) const override; + virtual Variant get_handle_value(int p_idx) override; + virtual void set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) override; + virtual void commit_handle(int p_idx, const Variant &p_restore, bool p_cancel = false) override; - virtual void redraw(); + virtual void redraw() override; Path3DGizmo(Path3D *p_path = nullptr); }; @@ -56,11 +56,11 @@ class Path3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(Path3DGizmoPlugin, EditorNode3DGizmoPlugin); protected: - Ref<EditorNode3DGizmo> create_gizmo(Node3D *p_spatial); + Ref<EditorNode3DGizmo> create_gizmo(Node3D *p_spatial) override; public: - String get_name() const; - int get_priority() const; + String get_name() const override; + int get_priority() const override; Path3DGizmoPlugin(); }; @@ -98,13 +98,13 @@ public: Path3D *get_edited_path() { return path; } static Path3DEditorPlugin *singleton; - virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event); + virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override; - virtual String get_name() const { return "Path3D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Path3D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; bool mirror_angle_enabled() { return mirror_handle_angle; } bool mirror_length_enabled() { return mirror_handle_length; } diff --git a/editor/plugins/physical_bone_3d_editor_plugin.h b/editor/plugins/physical_bone_3d_editor_plugin.h index 8699176fe0..bdfcca8878 100644 --- a/editor/plugins/physical_bone_3d_editor_plugin.h +++ b/editor/plugins/physical_bone_3d_editor_plugin.h @@ -67,10 +67,10 @@ class PhysicalBone3DEditorPlugin : public EditorPlugin { PhysicalBone3DEditor physical_bone_editor; public: - virtual String get_name() const { return "PhysicalBone3D"; } - virtual bool handles(Object *p_object) const { return p_object->is_class("PhysicalBone3D"); } - virtual void make_visible(bool p_visible); - virtual void edit(Object *p_node); + virtual String get_name() const override { return "PhysicalBone3D"; } + virtual bool handles(Object *p_object) const override { return p_object->is_class("PhysicalBone3D"); } + virtual void make_visible(bool p_visible) override; + virtual void edit(Object *p_node) override; PhysicalBone3DEditorPlugin(EditorNode *p_editor); }; diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h index 33ea7722ac..77580a5604 100644 --- a/editor/plugins/polygon_2d_editor_plugin.h +++ b/editor/plugins/polygon_2d_editor_plugin.h @@ -122,7 +122,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { Vector2 snap_offset; Vector2 snap_step; - virtual void _menu_option(int p_option); + virtual void _menu_option(int p_option) override; void _cancel_editing(); void _update_polygon_editing_state(); @@ -143,16 +143,16 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { void _uv_edit_popup_hide(); void _bone_paint_selected(int p_index); - int _get_polygon_count() const; + int _get_polygon_count() const override; protected: - virtual Node2D *_get_node() const; - virtual void _set_node(Node *p_polygon); + virtual Node2D *_get_node() const override; + virtual void _set_node(Node *p_polygon) override; - virtual Vector2 _get_offset(int p_idx) const; + virtual Vector2 _get_offset(int p_idx) const override; - virtual bool _has_uv() const { return true; }; - virtual void _commit_action(); + virtual bool _has_uv() const override { return true; }; + virtual void _commit_action() override; void _notification(int p_what); static void _bind_methods(); diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h index 2d7a54eda5..ddfb54c40b 100644 --- a/editor/plugins/resource_preloader_editor_plugin.h +++ b/editor/plugins/resource_preloader_editor_plugin.h @@ -93,11 +93,11 @@ class ResourcePreloaderEditorPlugin : public EditorPlugin { Button *button; public: - virtual String get_name() const { return "ResourcePreloader"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "ResourcePreloader"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; ResourcePreloaderEditorPlugin(EditorNode *p_node); ~ResourcePreloaderEditorPlugin(); diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h index f72ad1ec05..cc19228470 100644 --- a/editor/plugins/root_motion_editor_plugin.h +++ b/editor/plugins/root_motion_editor_plugin.h @@ -54,7 +54,7 @@ protected: void _notification(int p_what); public: - virtual void update_property(); + virtual void update_property() override; void setup(const NodePath &p_base_hint); EditorPropertyRootMotion(); }; @@ -63,10 +63,10 @@ class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin { GDCLASS(EditorInspectorRootMotionPlugin, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); - virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false); - virtual void parse_end(); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; + virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false) override; + virtual void parse_end() override; }; #endif // ROOT_MOTION_EDITOR_PLUGIN_H diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 66f0155c6a..8386d44e69 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -537,11 +537,14 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected)); if (current) { + Ref<Script> script = current->get_edited_resource(); if (p_save) { - _menu_option(FILE_SAVE); + // Do not try to save internal scripts + if (!(script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1)) { + _menu_option(FILE_SAVE); + } } - Ref<Script> script = current->get_edited_resource(); if (script != nullptr) { previous_scripts.push_back(script->get_path()); notify_script_close(script); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 8c4b7de27d..d51c95ec4b 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -455,25 +455,25 @@ class ScriptEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "Script"; } - bool has_main_screen() const { return true; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); - virtual void selected_notify(); + virtual String get_name() const override { return "Script"; } + bool has_main_screen() const override { return true; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; + virtual void selected_notify() override; - virtual void save_external_data(); - virtual void apply_changes(); + virtual void save_external_data() override; + virtual void apply_changes() override; - virtual void restore_global_state(); - virtual void save_global_state(); + virtual void restore_global_state() override; + virtual void save_global_state() override; - virtual void set_window_layout(Ref<ConfigFile> p_layout); - virtual void get_window_layout(Ref<ConfigFile> p_layout); + virtual void set_window_layout(Ref<ConfigFile> p_layout) override; + virtual void get_window_layout(Ref<ConfigFile> p_layout) override; - virtual void get_breakpoints(List<String> *p_breakpoints); + virtual void get_breakpoints(List<String> *p_breakpoints) override; - virtual void edited_scene_changed(); + virtual void edited_scene_changed() override; ScriptEditorPlugin(EditorNode *p_node); ~ScriptEditorPlugin(); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index 8fa380b64d..a8d7f80e7b 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -42,7 +42,7 @@ class ConnectionInfoDialog : public AcceptDialog { Label *method; Tree *tree; - virtual void ok_pressed(); + virtual void ok_pressed() override; public: void popup_connections(String p_method, Vector<Node *> p_nodes); @@ -190,50 +190,50 @@ protected: public: void _update_connected_methods(); - virtual void add_syntax_highlighter(SyntaxHighlighter *p_highlighter); - virtual void set_syntax_highlighter(SyntaxHighlighter *p_highlighter); + virtual void add_syntax_highlighter(SyntaxHighlighter *p_highlighter) override; + virtual void set_syntax_highlighter(SyntaxHighlighter *p_highlighter) override; void update_toggle_scripts_button(); - virtual void apply_code(); - virtual RES get_edited_resource() const; - virtual void set_edited_resource(const RES &p_res); - virtual Vector<String> get_functions(); - virtual void reload_text(); - virtual String get_name(); - virtual Ref<Texture2D> get_theme_icon(); - virtual bool is_unsaved(); - virtual Variant get_edit_state(); - virtual void set_edit_state(const Variant &p_state); - virtual void ensure_focus(); - virtual void trim_trailing_whitespace(); - virtual void insert_final_newline(); - virtual void convert_indent_to_spaces(); - virtual void convert_indent_to_tabs(); - virtual void tag_saved_version(); - - virtual void goto_line(int p_line, bool p_with_error = false); + virtual void apply_code() override; + virtual RES get_edited_resource() const override; + virtual void set_edited_resource(const RES &p_res) override; + virtual Vector<String> get_functions() override; + virtual void reload_text() override; + virtual String get_name() override; + virtual Ref<Texture2D> get_theme_icon() override; + virtual bool is_unsaved() override; + virtual Variant get_edit_state() override; + virtual void set_edit_state(const Variant &p_state) override; + virtual void ensure_focus() override; + virtual void trim_trailing_whitespace() override; + virtual void insert_final_newline() override; + virtual void convert_indent_to_spaces() override; + virtual void convert_indent_to_tabs() override; + virtual void tag_saved_version() override; + + virtual void goto_line(int p_line, bool p_with_error = false) override; void goto_line_selection(int p_line, int p_begin, int p_end); void goto_line_centered(int p_line); - virtual void set_executing_line(int p_line); - virtual void clear_executing_line(); + virtual void set_executing_line(int p_line) override; + virtual void clear_executing_line() override; - virtual void reload(bool p_soft); - virtual void get_breakpoints(List<int> *p_breakpoints); + virtual void reload(bool p_soft) override; + virtual void get_breakpoints(List<int> *p_breakpoints) override; - virtual void add_callback(const String &p_function, PackedStringArray p_args); - virtual void update_settings(); + virtual void add_callback(const String &p_function, PackedStringArray p_args) override; + virtual void update_settings() override; - virtual bool show_members_overview(); + virtual bool show_members_overview() override; - virtual void set_tooltip_request_func(String p_method, Object *p_obj); + virtual void set_tooltip_request_func(String p_method, Object *p_obj) override; - virtual void set_debugger_active(bool p_active); + virtual void set_debugger_active(bool p_active) override; - Control *get_edit_menu(); - virtual void clear_edit_menu(); + Control *get_edit_menu() override; + virtual void clear_edit_menu() override; static void register_editor(); - virtual void validate(); + virtual void validate() override; ScriptTextEditor(); ~ScriptTextEditor(); diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h index 0208b43e13..6ad3413dd7 100644 --- a/editor/plugins/shader_editor_plugin.h +++ b/editor/plugins/shader_editor_plugin.h @@ -50,12 +50,12 @@ class ShaderTextEditor : public CodeTextEditor { protected: static void _bind_methods(); - virtual void _load_theme_settings(); + virtual void _load_theme_settings() override; - virtual void _code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options); + virtual void _code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options) override; public: - virtual void _validate_script(); + virtual void _validate_script() override; void reload_text(); @@ -134,7 +134,7 @@ public: void goto_line_selection(int p_line, int p_begin, int p_end); - virtual Size2 get_minimum_size() const { return Size2(0, 200); } + virtual Size2 get_minimum_size() const override { return Size2(0, 200); } void save_external_data(const String &p_str = ""); ShaderEditor(EditorNode *p_node); @@ -149,17 +149,17 @@ class ShaderEditorPlugin : public EditorPlugin { Button *button; public: - virtual String get_name() const { return "Shader"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); - virtual void selected_notify(); + virtual String get_name() const override { return "Shader"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; + virtual void selected_notify() override; ShaderEditor *get_shader_editor() const { return shader_editor; } - virtual void save_external_data(); - virtual void apply_changes(); + virtual void save_external_data() override; + virtual void apply_changes() override; ShaderEditorPlugin(EditorNode *p_node); ~ShaderEditorPlugin(); diff --git a/editor/plugins/shader_file_editor_plugin.h b/editor/plugins/shader_file_editor_plugin.h index 19617366b2..6858f7d933 100644 --- a/editor/plugins/shader_file_editor_plugin.h +++ b/editor/plugins/shader_file_editor_plugin.h @@ -77,11 +77,11 @@ class ShaderFileEditorPlugin : public EditorPlugin { Button *button; public: - virtual String get_name() const { return "ShaderFile"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "ShaderFile"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; ShaderFileEditor *get_shader_editor() const { return shader_editor; } diff --git a/editor/plugins/skeleton_2d_editor_plugin.h b/editor/plugins/skeleton_2d_editor_plugin.h index f1ba1a3612..b8377fc914 100644 --- a/editor/plugins/skeleton_2d_editor_plugin.h +++ b/editor/plugins/skeleton_2d_editor_plugin.h @@ -70,11 +70,11 @@ class Skeleton2DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "Skeleton2D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Skeleton2D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; Skeleton2DEditorPlugin(EditorNode *p_node); ~Skeleton2DEditorPlugin(); diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h index a5b8ce80a9..7843fc1754 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.h +++ b/editor/plugins/skeleton_3d_editor_plugin.h @@ -190,8 +190,8 @@ class EditorInspectorPluginSkeleton : public EditorInspectorPlugin { EditorNode *editor; public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; }; class Skeleton3DEditorPlugin : public EditorPlugin { @@ -202,7 +202,7 @@ class Skeleton3DEditorPlugin : public EditorPlugin { public: Skeleton3DEditorPlugin(EditorNode *p_node); - virtual String get_name() const { return "Skeleton3D"; } + virtual String get_name() const override { return "Skeleton3D"; } }; #endif // SKELETON_3D_EDITOR_PLUGIN_H diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.h b/editor/plugins/skeleton_ik_3d_editor_plugin.h index bd4c5ba93e..c1585ea670 100644 --- a/editor/plugins/skeleton_ik_3d_editor_plugin.h +++ b/editor/plugins/skeleton_ik_3d_editor_plugin.h @@ -50,11 +50,11 @@ protected: static void _bind_methods(); public: - virtual String get_name() const { return "SkeletonIK3D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "SkeletonIK3D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; SkeletonIK3DEditorPlugin(EditorNode *p_node); ~SkeletonIK3DEditorPlugin(); diff --git a/editor/plugins/sprite_2d_editor_plugin.h b/editor/plugins/sprite_2d_editor_plugin.h index c2b942fd82..8769f19b5c 100644 --- a/editor/plugins/sprite_2d_editor_plugin.h +++ b/editor/plugins/sprite_2d_editor_plugin.h @@ -102,11 +102,11 @@ class Sprite2DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "Sprite2D"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Sprite2D"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; Sprite2DEditorPlugin(EditorNode *p_node); ~Sprite2DEditorPlugin(); diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h index c050ae484b..ee743fe60d 100644 --- a/editor/plugins/sprite_frames_editor_plugin.h +++ b/editor/plugins/sprite_frames_editor_plugin.h @@ -140,11 +140,11 @@ class SpriteFramesEditorPlugin : public EditorPlugin { Button *button; public: - virtual String get_name() const { return "SpriteFrames"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "SpriteFrames"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; SpriteFramesEditorPlugin(EditorNode *p_node); ~SpriteFramesEditorPlugin(); diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h index d9958d42e6..41daa662db 100644 --- a/editor/plugins/style_box_editor_plugin.h +++ b/editor/plugins/style_box_editor_plugin.h @@ -59,17 +59,17 @@ class EditorInspectorPluginStyleBox : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginStyleBox, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); - virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false); - virtual void parse_end(); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; + virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false) override; + virtual void parse_end() override; }; class StyleBoxEditorPlugin : public EditorPlugin { GDCLASS(StyleBoxEditorPlugin, EditorPlugin); public: - virtual String get_name() const { return "StyleBox"; } + virtual String get_name() const override { return "StyleBox"; } StyleBoxEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 9d9025a2c4..5af020eabe 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -116,42 +116,42 @@ protected: void _bookmark_item_pressed(int p_idx); public: - virtual void add_syntax_highlighter(SyntaxHighlighter *p_highlighter); - virtual void set_syntax_highlighter(SyntaxHighlighter *p_highlighter); + virtual void add_syntax_highlighter(SyntaxHighlighter *p_highlighter) override; + virtual void set_syntax_highlighter(SyntaxHighlighter *p_highlighter) override; - virtual String get_name(); - virtual Ref<Texture2D> get_theme_icon(); - virtual RES get_edited_resource() const; - virtual void set_edited_resource(const RES &p_res); + virtual String get_name() override; + virtual Ref<Texture2D> get_theme_icon() override; + virtual RES get_edited_resource() const override; + virtual void set_edited_resource(const RES &p_res) override; void set_edited_file(const Ref<TextFile> &p_file); - virtual void reload_text(); - virtual void apply_code(); - virtual bool is_unsaved(); - virtual Variant get_edit_state(); - virtual void set_edit_state(const Variant &p_state); - virtual Vector<String> get_functions(); - virtual void get_breakpoints(List<int> *p_breakpoints); - virtual void goto_line(int p_line, bool p_with_error = false); + virtual void reload_text() override; + virtual void apply_code() override; + virtual bool is_unsaved() override; + virtual Variant get_edit_state() override; + virtual void set_edit_state(const Variant &p_state) override; + virtual Vector<String> get_functions() override; + virtual void get_breakpoints(List<int> *p_breakpoints) override; + virtual void goto_line(int p_line, bool p_with_error = false) override; void goto_line_selection(int p_line, int p_begin, int p_end); - virtual void set_executing_line(int p_line); - virtual void clear_executing_line(); - virtual void trim_trailing_whitespace(); - virtual void insert_final_newline(); - virtual void convert_indent_to_spaces(); - virtual void convert_indent_to_tabs(); - virtual void ensure_focus(); - virtual void tag_saved_version(); - virtual void update_settings(); - virtual bool show_members_overview(); - virtual bool can_lose_focus_on_node_selection() { return true; } - virtual void set_debugger_active(bool p_active); - virtual void set_tooltip_request_func(String p_method, Object *p_obj); - virtual void add_callback(const String &p_function, PackedStringArray p_args); - - virtual Control *get_edit_menu(); - virtual void clear_edit_menu(); - - virtual void validate(); + virtual void set_executing_line(int p_line) override; + virtual void clear_executing_line() override; + virtual void trim_trailing_whitespace() override; + virtual void insert_final_newline() override; + virtual void convert_indent_to_spaces() override; + virtual void convert_indent_to_tabs() override; + virtual void ensure_focus() override; + virtual void tag_saved_version() override; + virtual void update_settings() override; + virtual bool show_members_overview() override; + virtual bool can_lose_focus_on_node_selection() override { return true; } + virtual void set_debugger_active(bool p_active) override; + virtual void set_tooltip_request_func(String p_method, Object *p_obj) override; + virtual void add_callback(const String &p_function, PackedStringArray p_args) override; + + virtual Control *get_edit_menu() override; + virtual void clear_edit_menu() override; + + virtual void validate() override; static void register_editor(); diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h index 63eea2b767..0d4452c662 100644 --- a/editor/plugins/texture_editor_plugin.h +++ b/editor/plugins/texture_editor_plugin.h @@ -43,7 +43,7 @@ class TextureEditor : public Control { protected: void _notification(int p_what); void _gui_input(Ref<InputEvent> p_event); - void _changed_callback(Object *p_changed, const char *p_prop); + void _changed_callback(Object *p_changed, const char *p_prop) override; static void _bind_methods(); public: @@ -56,15 +56,15 @@ class EditorInspectorPluginTexture : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginTexture, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; }; class TextureEditorPlugin : public EditorPlugin { GDCLASS(TextureEditorPlugin, EditorPlugin); public: - virtual String get_name() const { return "Texture2D"; } + virtual String get_name() const override { return "Texture2D"; } TextureEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/texture_layered_editor_plugin.h b/editor/plugins/texture_layered_editor_plugin.h index 4c5e06a5b8..9a28d2dff8 100644 --- a/editor/plugins/texture_layered_editor_plugin.h +++ b/editor/plugins/texture_layered_editor_plugin.h @@ -66,7 +66,7 @@ class TextureLayeredEditor : public Control { protected: void _notification(int p_what); void _gui_input(Ref<InputEvent> p_event); - void _changed_callback(Object *p_changed, const char *p_prop); + void _changed_callback(Object *p_changed, const char *p_prop) override; static void _bind_methods(); public: @@ -79,15 +79,15 @@ class EditorInspectorPluginLayeredTexture : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginLayeredTexture, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; }; class TextureLayeredEditorPlugin : public EditorPlugin { GDCLASS(TextureLayeredEditorPlugin, EditorPlugin); public: - virtual String get_name() const { return "TextureLayered"; } + virtual String get_name() const override { return "TextureLayered"; } TextureLayeredEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h index 8991603c0f..e9f58006a4 100644 --- a/editor/plugins/texture_region_editor_plugin.h +++ b/editor/plugins/texture_region_editor_plugin.h @@ -124,7 +124,7 @@ protected: Vector2 snap_point(Vector2 p_target) const; - virtual void _changed_callback(Object *p_changed, const char *p_prop); + virtual void _changed_callback(Object *p_changed, const char *p_prop) override; public: void _edit_region(); @@ -155,13 +155,13 @@ protected: void _editor_visiblity_changed(); public: - virtual String get_name() const { return "TextureRegion"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); - void set_state(const Dictionary &p_state); - Dictionary get_state() const; + virtual String get_name() const override { return "TextureRegion"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; + void set_state(const Dictionary &p_state) override; + Dictionary get_state() const override; TextureRegionEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index 983bfb6b50..e374dd8714 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -105,11 +105,11 @@ class ThemeEditorPlugin : public EditorPlugin { Button *button; public: - virtual String get_name() const { return "Theme"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_node); - virtual bool handles(Object *p_node) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "Theme"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_node) override; + virtual bool handles(Object *p_node) const override; + virtual void make_visible(bool p_visible) override; ThemeEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h index 135a9bd5a5..996e904853 100644 --- a/editor/plugins/tile_map_editor_plugin.h +++ b/editor/plugins/tile_map_editor_plugin.h @@ -231,14 +231,14 @@ protected: void _notification(int p_what); public: - virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return tile_map_editor->forward_gui_input(p_event); } - virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { tile_map_editor->forward_canvas_draw_over_viewport(p_overlay); } - - virtual String get_name() const { return "TileMap"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override { return tile_map_editor->forward_gui_input(p_event); } + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override { tile_map_editor->forward_canvas_draw_over_viewport(p_overlay); } + + virtual String get_name() const override { return "TileMap"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; TileMapEditorPlugin(EditorNode *p_node); ~TileMapEditorPlugin(); diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h index d2687e7a4b..72eb14941c 100644 --- a/editor/plugins/tile_set_editor_plugin.h +++ b/editor/plugins/tile_set_editor_plugin.h @@ -284,13 +284,13 @@ class TileSetEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "TileSet"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_node); - virtual bool handles(Object *p_node) const; - virtual void make_visible(bool p_visible); - void set_state(const Dictionary &p_state); - Dictionary get_state() const; + virtual String get_name() const override { return "TileSet"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_node) override; + virtual bool handles(Object *p_node) const override; + virtual void make_visible(bool p_visible) override; + void set_state(const Dictionary &p_state) override; + Dictionary get_state() const override; TileSetEditorPlugin(EditorNode *p_node); }; diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 13d8f0c856..c19140ae7c 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -1392,6 +1392,12 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) { if (vderFunc) { vderFunc->set_function((VisualShaderNodeVectorDerivativeFunc::Function)p_op_idx); } + + VisualShaderNodeMultiplyAdd *fmaFunc = Object::cast_to<VisualShaderNodeMultiplyAdd>(vsn); + + if (fmaFunc) { + fmaFunc->set_type((VisualShaderNodeMultiplyAdd::Type)p_op_idx); + } } vsnode = Ref<VisualShaderNode>(vsn); @@ -2711,6 +2717,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the greater of two values."), VisualShaderNodeFloatOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the lesser of two values."), VisualShaderNodeFloatOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Mix", "Scalar", "Functions", "VisualShaderNodeScalarInterp", TTR("Linear interpolation between two scalars."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("MultiplyAdd", "Scalar", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on scalars."), VisualShaderNodeMultiplyAdd::TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeFloatFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeIntFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR_INT)); add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 - scalar"), VisualShaderNodeFloatFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR)); @@ -2813,6 +2820,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Min", "Vector", "Functions", "VisualShaderNodeVectorOp", TTR("Returns the lesser of two values."), VisualShaderNodeVectorOp::OP_MIN, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("Mix", "Vector", "Functions", "VisualShaderNodeVectorInterp", TTR("Linear interpolation between two vectors."), -1, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("MixS", "Vector", "Functions", "VisualShaderNodeVectorScalarMix", TTR("Linear interpolation between two vectors using scalar."), -1, VisualShaderNode::PORT_TYPE_VECTOR)); + add_options.push_back(AddOption("MultiplyAdd", "Vector", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), VisualShaderNodeMultiplyAdd::TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("Negate", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("Normalize", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Calculates the normalize product of vector."), VisualShaderNodeVectorFunc::FUNC_NORMALIZE, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("OneMinus", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_VECTOR)); diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index b7c0fb8e45..dd9144c567 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -281,7 +281,7 @@ public: void clear_custom_types(); void add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend); - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void edit(VisualShader *p_visual_shader); VisualShaderEditor(); }; @@ -294,11 +294,11 @@ class VisualShaderEditorPlugin : public EditorPlugin { Button *button; public: - virtual String get_name() const { return "VisualShader"; } - bool has_main_screen() const { return false; } - virtual void edit(Object *p_object); - virtual bool handles(Object *p_object) const; - virtual void make_visible(bool p_visible); + virtual String get_name() const override { return "VisualShader"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; VisualShaderEditorPlugin(EditorNode *p_node); ~VisualShaderEditorPlugin(); @@ -308,7 +308,7 @@ class VisualShaderNodePluginDefault : public VisualShaderNodePlugin { GDCLASS(VisualShaderNodePluginDefault, VisualShaderNodePlugin); public: - virtual Control *create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node); + virtual Control *create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) override; }; class EditorPropertyShaderMode : public EditorProperty { @@ -322,7 +322,7 @@ protected: public: void setup(const Vector<String> &p_options); - virtual void update_property(); + virtual void update_property() override; void set_option_button_clip(bool p_enable); EditorPropertyShaderMode(); }; @@ -331,10 +331,10 @@ class EditorInspectorShaderModePlugin : public EditorInspectorPlugin { GDCLASS(EditorInspectorShaderModePlugin, EditorInspectorPlugin); public: - virtual bool can_handle(Object *p_object); - virtual void parse_begin(Object *p_object); - virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false); - virtual void parse_end(); + virtual bool can_handle(Object *p_object) override; + virtual void parse_begin(Object *p_object) override; + virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false) override; + virtual void parse_end() override; }; class VisualShaderNodePortPreview : public Control { @@ -349,7 +349,7 @@ protected: static void _bind_methods(); public: - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void setup(const Ref<VisualShader> &p_shader, VisualShader::Type p_type, int p_node, int p_port); VisualShaderNodePortPreview(); }; @@ -358,9 +358,9 @@ class VisualShaderConversionPlugin : public EditorResourceConversionPlugin { GDCLASS(VisualShaderConversionPlugin, EditorResourceConversionPlugin); public: - virtual String converts_to() const; - virtual bool handles(const Ref<Resource> &p_resource) const; - virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; #endif // VISUAL_SHADER_EDITOR_PLUGIN_H diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 1880fd5112..cd85817622 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -415,7 +415,7 @@ private: } } - void ok_pressed() { + void ok_pressed() override { String dir = project_path->get_text(); if (mode == MODE_RENAME) { @@ -603,7 +603,7 @@ private: } } - void cancel_pressed() { + void cancel_pressed() override { _remove_created_folder(); project_path->clear(); diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h index dfdb1bcd76..100426af4f 100644 --- a/editor/rename_dialog.h +++ b/editor/rename_dialog.h @@ -46,7 +46,7 @@ class RenameDialog : public ConfirmationDialog { GDCLASS(RenameDialog, ConfirmationDialog); - virtual void ok_pressed() { rename(); }; + virtual void ok_pressed() override { rename(); }; void _cancel_pressed() {} void _features_toggled(bool pressed); void _insert_text(String text); @@ -103,7 +103,7 @@ class RenameDialog : public ConfirmationDialog { protected: static void _bind_methods(); - virtual void _post_popup(); + virtual void _post_popup() override; public: void reset(); diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h index 63a30eba88..40415ea209 100644 --- a/editor/script_create_dialog.h +++ b/editor/script_create_dialog.h @@ -117,7 +117,7 @@ class ScriptCreateDialog : public ConfirmationDialog { void _file_selected(const String &p_file); void _create(); void _browse_class_in_tree(); - virtual void ok_pressed(); + virtual void ok_pressed() override; void _create_new(); void _load_exist(); void _msg_script_valid(bool valid, const String &p_msg = String()); diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h index 19fe1a7633..044519cb4d 100644 --- a/editor/settings_config_dialog.h +++ b/editor/settings_config_dialog.h @@ -63,8 +63,8 @@ class EditorSettingsDialog : public AcceptDialog { String shortcut_configured; String shortcut_filter; - virtual void cancel_pressed(); - virtual void ok_pressed(); + virtual void cancel_pressed() override; + virtual void ok_pressed() override; void _settings_changed(); void _settings_property_edited(const String &p_name); |