diff options
Diffstat (limited to '')
| -rw-r--r-- | editor/plugins/path_editor_plugin.h | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/editor/plugins/path_editor_plugin.h b/editor/plugins/path_editor_plugin.h index 4dbda1026..651dcdaa7 100644 --- a/editor/plugins/path_editor_plugin.h +++ b/editor/plugins/path_editor_plugin.h @@ -32,30 +32,27 @@ #include "editor/spatial_editor_gizmos.h" #include "scene/3d/path.h" -#if 0 -class PathSpatialGizmo : public EditorSpatialGizmo { - GDCLASS(PathSpatialGizmo,EditorSpatialGizmo); +class PathSpatialGizmo : public EditorSpatialGizmo { - Path* path; + GDCLASS(PathSpatialGizmo, EditorSpatialGizmo); + + Path *path; mutable Vector3 original; public: - virtual String get_handle_name(int p_idx) const; virtual Variant get_handle_value(int p_idx) const; - virtual void set_handle(int p_idx,Camera *p_camera, const Point2& p_point); - virtual void commit_handle(int p_idx,const Variant& p_restore,bool p_cancel=false); + virtual void set_handle(int p_idx, Camera *p_camera, const Point2 &p_point); + virtual void commit_handle(int p_idx, const Variant &p_restore, bool p_cancel = false); void redraw(); - PathSpatialGizmo(Path* p_path=NULL); - + PathSpatialGizmo(Path *p_path = NULL); }; class PathEditorPlugin : public EditorPlugin { - GDCLASS( PathEditorPlugin, EditorPlugin ); - + GDCLASS(PathEditorPlugin, EditorPlugin); Separator *sep; ToolButton *curve_create; @@ -65,26 +62,25 @@ class PathEditorPlugin : public EditorPlugin { EditorNode *editor; - Path *path; void _mode_changed(int p_idx); - void _close_curve(); + void _close_curve(); + protected: void _notification(int p_what); static void _bind_methods(); public: - Path *get_edited_path() { return path; } - static PathEditorPlugin* singleton; + static PathEditorPlugin *singleton; Ref<SpatialMaterial> path_material; Ref<SpatialMaterial> path_thin_material; - virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event); + virtual bool forward_spatial_gui_input(Camera *p_camera, const Ref<InputEvent> &p_event); //virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } - virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial); + virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial *p_spatial); virtual String get_name() const { return "Path"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_node); @@ -93,8 +89,6 @@ public: PathEditorPlugin(EditorNode *p_node); ~PathEditorPlugin(); - }; -#endif #endif // PATH_EDITOR_PLUGIN_H |
