A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user