From 2658e5d03d86034cf926584ed3d4a63f5e9d7329 Mon Sep 17 00:00:00 2001 From: JFonS Date: Tue, 12 Mar 2019 00:30:50 +0100 Subject: Add priority to gizmos and fix small issues User defined gizmos will haave higher preference than editor gizmos by default. Also fixed some inconsistencies in the gizmos menu when using custom gizmos. --- modules/csg/csg_gizmos.cpp | 4 ++++ modules/csg/csg_gizmos.h | 1 + 2 files changed, 5 insertions(+) (limited to 'modules/csg') diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp index 3044887ef5..d4069b901f 100644 --- a/modules/csg/csg_gizmos.cpp +++ b/modules/csg/csg_gizmos.cpp @@ -283,6 +283,10 @@ String CSGShapeSpatialGizmoPlugin::get_name() const { return "CSGShapes"; } +int CSGShapeSpatialGizmoPlugin::get_priority() const { + return -1; +} + bool CSGShapeSpatialGizmoPlugin::is_selectable_when_hidden() const { return true; } diff --git a/modules/csg/csg_gizmos.h b/modules/csg/csg_gizmos.h index b208c39938..0915d05111 100644 --- a/modules/csg/csg_gizmos.h +++ b/modules/csg/csg_gizmos.h @@ -42,6 +42,7 @@ class CSGShapeSpatialGizmoPlugin : public EditorSpatialGizmoPlugin { public: bool has_gizmo(Spatial *p_spatial); String get_name() const; + int get_priority() const; bool is_selectable_when_hidden() const; void redraw(EditorSpatialGizmo *p_gizmo); -- cgit v1.2.3