diff options
Diffstat (limited to 'modules/gridmap/grid_map_editor_plugin.h')
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.h | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h index 07ac34cd4e..27a063ee41 100644 --- a/modules/gridmap/grid_map_editor_plugin.h +++ b/modules/gridmap/grid_map_editor_plugin.h @@ -29,10 +29,10 @@ #ifndef GRID_MAP_EDITOR_PLUGIN_H #define GRID_MAP_EDITOR_PLUGIN_H -#include "editor/editor_plugin.h" #include "editor/editor_node.h" -#include "grid_map.h" +#include "editor/editor_plugin.h" #include "editor/pane_drag.h" +#include "grid_map.h" /** @author Juan Linietsky <reduzio@gmail.com> */ @@ -40,11 +40,11 @@ class SpatialEditorPlugin; class GridMapEditor : public VBoxContainer { - GDCLASS(GridMapEditor, VBoxContainer ); + GDCLASS(GridMapEditor, VBoxContainer); enum { - GRID_CURSOR_SIZE=50 + GRID_CURSOR_SIZE = 50 }; enum InputAction { @@ -65,14 +65,14 @@ class GridMapEditor : public VBoxContainer { }; enum DisplayMode { - DISPLAY_THUMBNAIL, - DISPLAY_LIST + DISPLAY_THUMBNAIL, + DISPLAY_LIST }; UndoRedo *undo_redo; InputAction input_action; Panel *panel; - MenuButton * options; + MenuButton *options; SpinBox *floor; OptionButton *edit_mode; ToolButton *mode_thumbnail; @@ -94,7 +94,7 @@ class GridMapEditor : public VBoxContainer { List<SetItem> set_items; GridMap *node; - MeshLibrary* last_theme; + MeshLibrary *last_theme; ClipMode clip_mode; bool lock_view; @@ -118,10 +118,8 @@ class GridMapEditor : public VBoxContainer { bool updating; - struct Selection { - Vector3 click; Vector3 current; Vector3 begin; @@ -141,7 +139,6 @@ class GridMapEditor : public VBoxContainer { int selected_area; int cursor_rot; - enum Menu { MENU_OPTION_CONFIGURE, @@ -173,7 +170,6 @@ class GridMapEditor : public VBoxContainer { SpatialEditorPlugin *spatial_editor; - struct AreaDisplay { RID mesh; @@ -212,20 +208,18 @@ class GridMapEditor : public VBoxContainer { void update_areas(); EditorNode *editor; - bool do_input_action(Camera* p_camera,const Point2& p_point,bool p_click); + bool do_input_action(Camera *p_camera, const Point2 &p_point, bool p_click); -friend class GridMapEditorPlugin; + friend class GridMapEditorPlugin; Panel *theme_panel; protected: void _notification(int p_what); void _node_removed(Node *p_node); static void _bind_methods(); -public: - - bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event); - +public: + bool forward_spatial_input_event(Camera *p_camera, const InputEvent &p_event); void edit(GridMap *p_gridmap); GridMapEditor() {} @@ -235,14 +229,13 @@ public: class GridMapEditorPlugin : public EditorPlugin { - GDCLASS( GridMapEditorPlugin, EditorPlugin ); + GDCLASS(GridMapEditorPlugin, EditorPlugin); GridMapEditor *gridmap_editor; EditorNode *editor; public: - - virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) { return gridmap_editor->forward_spatial_input_event(p_camera,p_event); } + virtual bool forward_spatial_input_event(Camera *p_camera, const InputEvent &p_event) { return gridmap_editor->forward_spatial_input_event(p_camera, p_event); } virtual String get_name() const { return "GridMap"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_node); @@ -251,7 +244,6 @@ public: GridMapEditorPlugin(EditorNode *p_node); ~GridMapEditorPlugin(); - }; #endif // CUBE_GRID_MAP_EDITOR_PLUGIN_H |