1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Applied clang-format.

Since PathEditorPlugin was commented out, it didn't get clang-format'ed.
This commit is contained in:
Ferenc Arn
2017-05-24 17:11:20 -05:00
parent fdf301e78b
commit 42de893f9a
3 changed files with 181 additions and 223 deletions

View File

@@ -33,29 +33,26 @@
#include "editor/spatial_editor_gizmos.h"
#include "scene/3d/path.h"
class PathSpatialGizmo : public EditorSpatialGizmo {
class PathSpatialGizmo : public EditorSpatialGizmo {
GDCLASS(PathSpatialGizmo,EditorSpatialGizmo);
GDCLASS(PathSpatialGizmo, EditorSpatialGizmo);
Path* path;
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 Ref<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,7 +89,6 @@ public:
PathEditorPlugin(EditorNode *p_node);
~PathEditorPlugin();
};
#endif // PATH_EDITOR_PLUGIN_H