Now all gozmo plugins return gizmo names properly.

This commit is contained in:
Relintai 2022-10-09 00:52:52 +02:00
parent e003437196
commit 3f86c49d1e
4 changed files with 7 additions and 8 deletions

View File

@ -646,7 +646,7 @@ Ref<EditorSpatialGizmo> PathSpatialGizmoPlugin::create_gizmo(Spatial *p_spatial)
return ref;
}
String PathSpatialGizmoPlugin::get_name() const {
String PathSpatialGizmoPlugin::get_gizmo_name() const {
return "Path";
}

View File

@ -75,7 +75,7 @@ protected:
Ref<EditorSpatialGizmo> create_gizmo(Spatial *p_spatial);
public:
String get_name() const;
String get_gizmo_name() const;
int get_priority() const;
PathSpatialGizmoPlugin();
};

View File

@ -2252,7 +2252,7 @@ bool ShapeCastGizmoPlugin::has_gizmo(Spatial *p_spatial) {
return Object::cast_to<ShapeCast>(p_spatial) != nullptr;
}
String ShapeCastGizmoPlugin::get_name() const {
String ShapeCastGizmoPlugin::get_gizmo_name() const {
return "ShapeCast";
}

View File

@ -355,7 +355,7 @@ class ShapeCastGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
String get_gizmo_name() const;
int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
@ -595,13 +595,12 @@ public:
class RoomGizmoPlugin : public EditorSpatialGizmoPlugin {
GDCLASS(RoomGizmoPlugin, EditorSpatialGizmoPlugin);
protected:
public:
virtual bool has_gizmo(Spatial *p_spatial);
String get_gizmo_name() const;
int get_priority() const;
Ref<EditorSpatialGizmo> create_gizmo(Spatial *p_spatial);
public:
RoomGizmoPlugin();
};
@ -627,13 +626,12 @@ public:
class PortalGizmoPlugin : public EditorSpatialGizmoPlugin {
GDCLASS(PortalGizmoPlugin, EditorSpatialGizmoPlugin);
protected:
public:
virtual bool has_gizmo(Spatial *p_spatial);
String get_gizmo_name() const;
int get_priority() const;
Ref<EditorSpatialGizmo> create_gizmo(Spatial *p_spatial);
public:
PortalGizmoPlugin();
};
@ -661,6 +659,7 @@ class OccluderSpatialGizmo : public EditorSpatialGizmo {
void _redraw_poly(bool p_hole, const Vector<Vector2> &p_pts, const PoolVector<Vector2> &p_pts_raw);
public:
String get_gizmo_name() const;
virtual String get_handle_name(int p_id, bool p_secondary) const;
virtual Variant get_handle_value(int p_id, bool p_secondary);
virtual void set_handle(int p_id, bool p_secondary, Camera *p_camera, const Point2 &p_point);