diff options
Diffstat (limited to 'editor/plugins')
| -rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 14 | ||||
| -rw-r--r-- | editor/plugins/debugger_editor_plugin.cpp | 14 | ||||
| -rw-r--r-- | editor/plugins/debugger_editor_plugin.h | 1 | ||||
| -rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 11 | ||||
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 10 | ||||
| -rw-r--r-- | editor/plugins/script_text_editor.cpp | 17 | ||||
| -rw-r--r-- | editor/plugins/skeleton_3d_editor_plugin.cpp | 2 | ||||
| -rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 114 | ||||
| -rw-r--r-- | editor/plugins/theme_editor_plugin.h | 15 | ||||
| -rw-r--r-- | editor/plugins/tiles/tile_atlas_view.cpp | 2 | ||||
| -rw-r--r-- | editor/plugins/tiles/tile_data_editors.cpp | 5 | ||||
| -rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 2 |
12 files changed, 171 insertions, 36 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 4bfa6adaae..55d45fdd2e 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -60,11 +60,6 @@ #include "scene/resources/packed_scene.h" #include "scene/resources/style_box_texture.h" -// Min and Max are power of two in order to play nicely with successive increment. -// That way, we can naturally reach a 100% zoom from boundaries. -constexpr real_t MIN_ZOOM = 1. / 128; -constexpr real_t MAX_ZOOM = 128; - #define RULER_WIDTH (15 * EDSCALE) constexpr real_t SCALE_HANDLE_DISTANCE = 25; constexpr real_t MOVE_HANDLE_DISTANCE = 25; @@ -4115,10 +4110,9 @@ void CanvasItemEditor::_update_scroll(real_t) { } void CanvasItemEditor::_zoom_on_position(real_t p_zoom, Point2 p_position) { - p_zoom = CLAMP(p_zoom, MIN_ZOOM, MAX_ZOOM); + p_zoom = CLAMP(p_zoom, zoom_widget->get_min_zoom(), zoom_widget->get_max_zoom()); if (p_zoom == zoom) { - zoom_widget->set_zoom(p_zoom); return; } @@ -4128,12 +4122,12 @@ void CanvasItemEditor::_zoom_on_position(real_t p_zoom, Point2 p_position) { view_offset += p_position / prev_zoom - p_position / zoom; // We want to align in-scene pixels to screen pixels, this prevents blurry rendering - // in small details (texts, lines). + // of small details (texts, lines). // This correction adds a jitter movement when zooming, so we correct only when the // zoom factor is an integer. (in the other cases, all pixels won't be aligned anyway) const real_t closest_zoom_factor = Math::round(zoom); if (Math::is_zero_approx(zoom - closest_zoom_factor)) { - // make sure scene pixel at view_offset is aligned on a screen pixel + // Make sure scene pixel at view_offset is aligned on a screen pixel. Vector2 view_offset_int = view_offset.floor(); Vector2 view_offset_frac = view_offset - view_offset_int; view_offset = view_offset_int + (view_offset_frac * closest_zoom_factor).round() / closest_zoom_factor; @@ -5147,9 +5141,9 @@ CanvasItemEditor::CanvasItemEditor() { button_center_view->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(VIEW_CENTER_TO_SELECTION)); zoom_widget = memnew(EditorZoomWidget); - controls_hb->add_child(zoom_widget); zoom_widget->set_anchors_and_offsets_preset(Control::PRESET_TOP_LEFT, Control::PRESET_MODE_MINSIZE, 2 * EDSCALE); zoom_widget->set_shortcut_context(this); + controls_hb->add_child(zoom_widget); zoom_widget->connect("zoom_changed", callable_mp(this, &CanvasItemEditor::_update_zoom)); panner.instantiate(); diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp index 15829a55de..b636ec4f5c 100644 --- a/editor/plugins/debugger_editor_plugin.cpp +++ b/editor/plugins/debugger_editor_plugin.cpp @@ -79,6 +79,10 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) { debug_menu->set_item_tooltip(-1, TTR("When this option is enabled, avoidance objects shapes, radius and velocities will be visible in the running project.")); debug_menu->add_separator(); + debug_menu->add_check_shortcut(ED_SHORTCUT("editor/visible_canvas_redraw", TTR("Debug CanvasItem Redraws")), RUN_DEBUG_CANVAS_REDRAW); + debug_menu->set_item_tooltip(-1, + TTR("When this option is enabled, redraw requests of 2D objects will become visible (as a short flash) in the running project.\nThis is useful to troubleshoot low processor mode.")); + debug_menu->add_separator(); debug_menu->add_check_shortcut(ED_SHORTCUT("editor/sync_scene_changes", TTR("Synchronize Scene Changes")), RUN_LIVE_DEBUG); debug_menu->set_item_tooltip(-1, TTR("When this option is enabled, any changes made to the scene in the editor will be replicated in the running project.\nWhen used remotely on a device, this is more efficient when the network filesystem option is enabled.")); @@ -175,6 +179,12 @@ void DebuggerEditorPlugin::_menu_option(int p_option) { EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_avoidance", !ischecked); } break; + case RUN_DEBUG_CANVAS_REDRAW: { + bool ischecked = debug_menu->is_item_checked(debug_menu->get_item_index(RUN_DEBUG_CANVAS_REDRAW)); + debug_menu->set_item_checked(debug_menu->get_item_index(RUN_DEBUG_CANVAS_REDRAW), !ischecked); + EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_canvas_redraw", !ischecked); + + } break; case RUN_RELOAD_SCRIPTS: { bool ischecked = debug_menu->is_item_checked(debug_menu->get_item_index(RUN_RELOAD_SCRIPTS)); debug_menu->set_item_checked(debug_menu->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked); @@ -213,6 +223,7 @@ void DebuggerEditorPlugin::_update_debug_options() { bool check_debug_paths = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_paths", false); bool check_debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false); bool check_debug_avoidance = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_avoidance", false); + bool check_debug_canvas_redraw = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_canvas_redraw", false); bool check_live_debug = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_live_debug", true); bool check_reload_scripts = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_reload_scripts", true); bool check_server_keep_open = EditorSettings::get_singleton()->get_project_metadata("debug_options", "server_keep_open", false); @@ -236,6 +247,9 @@ void DebuggerEditorPlugin::_update_debug_options() { if (check_debug_avoidance) { _menu_option(RUN_DEBUG_AVOIDANCE); } + if (check_debug_canvas_redraw) { + _menu_option(RUN_DEBUG_CANVAS_REDRAW); + } if (check_live_debug) { _menu_option(RUN_LIVE_DEBUG); } diff --git a/editor/plugins/debugger_editor_plugin.h b/editor/plugins/debugger_editor_plugin.h index eb8da7ca8e..8d65dbd2e4 100644 --- a/editor/plugins/debugger_editor_plugin.h +++ b/editor/plugins/debugger_editor_plugin.h @@ -52,6 +52,7 @@ private: RUN_DEBUG_PATHS, RUN_DEBUG_NAVIGATION, RUN_DEBUG_AVOIDANCE, + RUN_DEBUG_CANVAS_REDRAW, RUN_DEPLOY_REMOTE_DEBUG, RUN_RELOAD_SCRIPTS, SERVER_KEEP_OPEN, diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 1872857130..afc72cdde6 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -496,6 +496,7 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from, Color text_color = EDITOR_GET("text_editor/theme/highlighting/text_color"); Color symbol_color = EDITOR_GET("text_editor/theme/highlighting/symbol_color"); Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color"); + Color doc_comment_color = EDITOR_GET("text_editor/theme/highlighting/doc_comment_color"); if (bg_color.a == 0) { bg_color = Color(0, 0, 0, 0); @@ -513,6 +514,7 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from, bool in_control_flow_keyword = false; bool in_keyword = false; bool in_comment = false; + bool in_doc_comment = false; for (int i = 0; i < code.length(); i++) { char32_t c = code[i]; if (c > 32) { @@ -520,11 +522,17 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from, Color color = text_color; if (c == '#') { - in_comment = true; + if (i < code.length() - 1 && code[i + 1] == '#') { + in_doc_comment = true; + } else { + in_comment = true; + } } if (in_comment) { color = comment_color; + } else if (in_doc_comment) { + color = doc_comment_color; } else { if (is_symbol(c)) { //make symbol a little visible @@ -569,6 +577,7 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from, if (c == '\n') { in_comment = false; + in_doc_comment = false; col = x0; line++; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index ec927f6c5d..79e260ef35 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -191,6 +191,16 @@ void EditorStandardSyntaxHighlighter::_update_cache() { highlighter->add_color_region(beg, end, comment_color, end.is_empty()); } + /* Doc comments */ + const Color doc_comment_color = EDITOR_GET("text_editor/theme/highlighting/doc_comment_color"); + List<String> doc_comments; + scr->get_language()->get_doc_comment_delimiters(&doc_comments); + for (const String &doc_comment : doc_comments) { + String beg = doc_comment.get_slice(" ", 0); + String end = doc_comment.get_slice_count(" ") > 1 ? doc_comment.get_slice(" ", 1) : String(); + highlighter->add_color_region(beg, end, doc_comment_color, end.is_empty()); + } + /* Strings */ const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color"); List<String> strings; diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 5322f3c813..5b67c6d509 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -234,9 +234,10 @@ void ScriptTextEditor::_set_theme_for_script() { } } + text_edit->clear_comment_delimiters(); + List<String> comments; script->get_language()->get_comment_delimiters(&comments); - text_edit->clear_comment_delimiters(); for (const String &comment : comments) { String beg = comment.get_slice(" ", 0); String end = comment.get_slice_count(" ") > 1 ? comment.get_slice(" ", 1) : String(); @@ -246,6 +247,18 @@ void ScriptTextEditor::_set_theme_for_script() { text_edit->add_auto_brace_completion_pair(beg, end); } } + + List<String> doc_comments; + script->get_language()->get_doc_comment_delimiters(&doc_comments); + for (const String &doc_comment : doc_comments) { + String beg = doc_comment.get_slice(" ", 0); + String end = doc_comment.get_slice_count(" ") > 1 ? doc_comment.get_slice(" ", 1) : String(); + text_edit->add_comment_delimiter(beg, end, end.is_empty()); + + if (!end.is_empty() && !text_edit->has_auto_brace_completion_open_key(beg)) { + text_edit->add_auto_brace_completion_pair(beg, end); + } + } } void ScriptTextEditor::_show_errors_panel(bool p_show) { @@ -779,7 +792,7 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo return; } - ERR_FAIL_COND(!get_tree()); + ERR_FAIL_NULL(get_tree()); HashSet<Ref<Script>> scripts; diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index e6bb5532a3..20b91d8bfd 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -363,7 +363,7 @@ void Skeleton3DEditor::pose_to_rest(const bool p_all_bones) { void Skeleton3DEditor::create_physical_skeleton() { EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton(); - ERR_FAIL_COND(!get_tree()); + ERR_FAIL_NULL(get_tree()); Node *owner = get_tree()->get_edited_scene_root(); const int bone_count = skeleton->get_bone_count(); diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 821d8151a4..9ba5f2faf1 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -31,12 +31,14 @@ #include "theme_editor_plugin.h" #include "core/os/keyboard.h" +#include "editor/editor_help.h" #include "editor/editor_node.h" #include "editor/editor_resource_picker.h" #include "editor/editor_scale.h" #include "editor/editor_string_names.h" #include "editor/editor_undo_redo_manager.h" #include "editor/gui/editor_file_dialog.h" +#include "editor/inspector_dock.h" #include "editor/progress_dialog.h" #include "scene/gui/check_button.h" #include "scene/gui/color_picker.h" @@ -2259,6 +2261,10 @@ ThemeTypeDialog::ThemeTypeDialog() { /////////////////////// +Control *ThemeItemLabel::make_custom_tooltip(const String &p_text) const { + return memnew(EditorHelpTooltip(p_text)); +} + VBoxContainer *ThemeTypeEditor::_create_item_list(Theme::DataType p_data_type) { VBoxContainer *items_tab = memnew(VBoxContainer); items_tab->set_custom_minimum_size(Size2(0, 160) * EDSCALE); @@ -2413,11 +2419,13 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_ item_name_container->set_stretch_ratio(2.0); item_control->add_child(item_name_container); - Label *item_name = memnew(Label); + Label *item_name = memnew(ThemeItemLabel); item_name->set_h_size_flags(SIZE_EXPAND_FILL); item_name->set_clip_text(true); item_name->set_text(p_item_name); - item_name->set_tooltip_text(p_item_name); + // `|` separators used in `EditorHelpTooltip` for formatting. + item_name->set_tooltip_text("theme_item|" + edited_type + "|" + p_item_name + "|"); + item_name->set_mouse_filter(Control::MOUSE_FILTER_STOP); item_name_container->add_child(item_name); if (p_editable) { @@ -2477,7 +2485,6 @@ void ThemeTypeEditor::_add_focusable(Control *p_control) { void ThemeTypeEditor::_update_type_items() { bool show_default = show_default_items_button->is_pressed(); - List<StringName> names; focusables.clear(); @@ -3528,6 +3535,16 @@ void ThemeEditor::_theme_edit_button_cbk() { theme_edit_dialog->popup_centered(Size2(850, 700) * EDSCALE); } +void ThemeEditor::_theme_close_button_cbk() { + plugin->make_visible(false); // Enables auto hide. + if (theme.is_valid() && InspectorDock::get_inspector_singleton()->get_edited_object() == theme.ptr()) { + EditorNode::get_singleton()->push_item(nullptr); + } else { + theme = Ref<Theme>(); + EditorNode::get_singleton()->hide_unused_editors(plugin); + } +} + void ThemeEditor::_add_preview_button_cbk() { preview_scene_dialog->popup_file_dialog(); } @@ -3645,6 +3662,12 @@ ThemeEditor::ThemeEditor() { theme_save_as_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(true)); top_menu->add_child(theme_save_as_button); + Button *theme_close_button = memnew(Button); + theme_close_button->set_text(TTR("Close")); + theme_close_button->set_flat(true); + theme_close_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_close_button_cbk)); + top_menu->add_child(theme_close_button); + top_menu->add_child(memnew(VSeparator)); Button *theme_edit_button = memnew(Button); @@ -3711,20 +3734,12 @@ ThemeEditor::ThemeEditor() { /////////////////////// -void ThemeEditorPlugin::edit(Object *p_node) { - if (Object::cast_to<Theme>(p_node)) { - theme_editor->edit(Object::cast_to<Theme>(p_node)); - } else { - // We intentionally keep a reference to the last used theme to work around - // the the editor being hidden while base resources are edited. Uncomment - // the following line again and remove this comment once that bug has been - // fixed (scheduled for Godot 4.1 in PR 73098): - // theme_editor->edit(Ref<Theme>()); - } +void ThemeEditorPlugin::edit(Object *p_object) { + theme_editor->edit(Ref<Theme>(p_object)); } -bool ThemeEditorPlugin::handles(Object *p_node) const { - return Object::cast_to<Theme>(p_node) != nullptr; +bool ThemeEditorPlugin::handles(Object *p_object) const { + return Object::cast_to<Theme>(p_object) != nullptr; } void ThemeEditorPlugin::make_visible(bool p_visible) { @@ -3740,8 +3755,77 @@ void ThemeEditorPlugin::make_visible(bool p_visible) { } } +bool ThemeEditorPlugin::can_auto_hide() const { + Ref<Theme> edited_theme = theme_editor->theme; + if (edited_theme.is_null()) { + return true; + } + + Ref<Resource> edited_resource = Ref<Resource>(InspectorDock::get_inspector_singleton()->get_next_edited_object()); + if (edited_resource.is_null()) { + return true; + } + + // Don't hide if edited resource used by this theme. + Ref<StyleBox> sbox = edited_resource; + if (sbox.is_valid()) { + List<StringName> type_list; + edited_theme->get_stylebox_type_list(&type_list); + + for (const StringName &E : type_list) { + List<StringName> list; + edited_theme->get_stylebox_list(E, &list); + + for (const StringName &F : list) { + if (edited_theme->get_stylebox(F, E) == sbox) { + return false; + } + } + } + return true; + } + + Ref<Texture2D> tex = edited_resource; + if (tex.is_valid()) { + List<StringName> type_list; + edited_theme->get_icon_type_list(&type_list); + + for (const StringName &E : type_list) { + List<StringName> list; + edited_theme->get_icon_list(E, &list); + + for (const StringName &F : list) { + if (edited_theme->get_icon(F, E) == tex) { + return false; + } + } + } + return true; + } + + Ref<Font> fnt = edited_resource; + if (fnt.is_valid()) { + List<StringName> type_list; + edited_theme->get_font_type_list(&type_list); + + for (const StringName &E : type_list) { + List<StringName> list; + edited_theme->get_font_list(E, &list); + + for (const StringName &F : list) { + if (edited_theme->get_font(F, E) == fnt) { + return false; + } + } + } + return true; + } + return true; +} + ThemeEditorPlugin::ThemeEditorPlugin() { theme_editor = memnew(ThemeEditor); + theme_editor->plugin = this; theme_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE); button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Theme"), theme_editor); diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index 077ce8e8f7..33accf587a 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -47,6 +47,7 @@ class OptionButton; class PanelContainer; class TabBar; class TabContainer; +class ThemeEditorPlugin; class TextureRect; class ThemeItemImportTree : public VBoxContainer { @@ -320,6 +321,11 @@ public: ThemeTypeDialog(); }; +// Custom `Label` needed to use `EditorHelpTooltip` to display theme item documentation. +class ThemeItemLabel : public Label { + virtual Control *make_custom_tooltip(const String &p_text) const; +}; + class ThemeTypeEditor : public MarginContainer { GDCLASS(ThemeTypeEditor, MarginContainer); @@ -419,6 +425,9 @@ public: class ThemeEditor : public VBoxContainer { GDCLASS(ThemeEditor, VBoxContainer); + friend class ThemeEditorPlugin; + ThemeEditorPlugin *plugin = nullptr; + Ref<Theme> theme; TabBar *preview_tabs = nullptr; @@ -433,6 +442,7 @@ class ThemeEditor : public VBoxContainer { void _theme_save_button_cbk(bool p_save_as); void _theme_edit_button_cbk(); + void _theme_close_button_cbk(); void _add_preview_button_cbk(); void _preview_scene_dialog_cbk(const String &p_path); @@ -462,9 +472,10 @@ class ThemeEditorPlugin : public EditorPlugin { public: 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 edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; virtual void make_visible(bool p_visible) override; + virtual bool can_auto_hide() const override; ThemeEditorPlugin(); }; diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index b55be8b3f8..039213e545 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -90,8 +90,6 @@ Size2i TileAtlasView::_compute_alternative_tiles_control_size() { } void TileAtlasView::_update_zoom_and_panning(bool p_zoom_on_mouse_pos) { - // Don't allow zoom to go below 1% or above 10000% - zoom_widget->set_zoom(CLAMP(zoom_widget->get_zoom(), 0.01f, 100.f)); float zoom = zoom_widget->get_zoom(); // Compute the minimum sizes. diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index d634d957b3..ad4844fe3e 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -361,8 +361,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) { } undo_redo->add_do_method(base_control, "queue_redraw"); undo_redo->add_do_method(this, "emit_signal", "polygons_changed"); - for (const PackedVector2Array &polygon : polygons) { - undo_redo->add_undo_method(this, "set_polygon", polygon); + for (unsigned int i = 0; i < polygons.size(); i++) { + undo_redo->add_undo_method(this, "set_polygon", i, polygons[i]); } undo_redo->add_undo_method(base_control, "queue_redraw"); undo_redo->add_undo_method(this, "emit_signal", "polygons_changed"); @@ -931,6 +931,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() { snap_subdivision->connect("value_changed", callable_mp(this, &GenericTilePolygonEditor::_store_snap_options).unbind(1)); editor_zoom_widget = memnew(EditorZoomWidget); + editor_zoom_widget->setup_zoom_limits(0.125, 128.0); editor_zoom_widget->set_position(Vector2(5, 5)); editor_zoom_widget->connect("zoom_changed", callable_mp(this, &GenericTilePolygonEditor::_zoom_changed).unbind(1)); editor_zoom_widget->set_shortcut_context(this); diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index afc929b547..6bac62d861 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -44,7 +44,7 @@ #include "scene/gui/separator.h" #define CHECK_PLUGIN_INITIALIZED() \ - ERR_FAIL_COND_MSG(!EditorVCSInterface::get_singleton(), "No VCS plugin is initialized. Select a Version Control Plugin from Project menu."); + ERR_FAIL_NULL_MSG(EditorVCSInterface::get_singleton(), "No VCS plugin is initialized. Select a Version Control Plugin from Project menu."); VersionControlEditorPlugin *VersionControlEditorPlugin::singleton = nullptr; |
