aboutsummaryrefslogtreecommitdiff
path: root/editor/resources_dock.h
diff options
context:
space:
mode:
authorRémi Verschelde2017-03-05 16:44:50 +0100
committerRémi Verschelde2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /editor/resources_dock.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadgodot-5dbf180.tar.gz
godot-5dbf180.tar.zst
godot-5dbf180.zip
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
Diffstat (limited to 'editor/resources_dock.h')
-rw-r--r--editor/resources_dock.h39
1 files changed, 14 insertions, 25 deletions
diff --git a/editor/resources_dock.h b/editor/resources_dock.h
index e22578658..15437f981 100644
--- a/editor/resources_dock.h
+++ b/editor/resources_dock.h
@@ -29,23 +29,22 @@
#ifndef RESOURCES_DOCK_H
#define RESOURCES_DOCK_H
+#include "create_dialog.h"
+#include "editor_file_dialog.h"
+#include "scene/gui/box_container.h"
+#include "scene/gui/button.h"
#include "scene/gui/control.h"
-#include "scene/gui/tree.h"
+#include "scene/gui/file_dialog.h"
#include "scene/gui/label.h"
-#include "scene/gui/button.h"
-#include "scene/gui/tool_button.h"
-#include "scene/gui/box_container.h"
#include "scene/gui/menu_button.h"
-#include "scene/gui/file_dialog.h"
-#include "create_dialog.h"
-#include "editor_file_dialog.h"
-
+#include "scene/gui/tool_button.h"
+#include "scene/gui/tree.h"
class EditorNode;
class ResourcesDock : public VBoxContainer {
- GDCLASS( ResourcesDock, VBoxContainer );
+ GDCLASS(ResourcesDock, VBoxContainer);
enum {
TOOL_NEW,
@@ -58,7 +57,6 @@ class ResourcesDock : public VBoxContainer {
TOOL_MAX
};
-
EditorNode *editor;
Button *button_new;
@@ -74,32 +72,23 @@ class ResourcesDock : public VBoxContainer {
bool block_add;
int current_action;
+ void _file_action(const String &p_action);
-
-
-
- void _file_action(const String& p_action);
-
-
-
- void _delete(Object* p_item, int p_column, int p_id);
+ void _delete(Object *p_item, int p_column, int p_id);
void _resource_selected();
void _update_name(TreeItem *item);
void _tool_selected(int p_tool);
void _create();
protected:
-
void _notification(int p_what);
static void _bind_methods();
public:
-
- void add_resource(const Ref<Resource>& p_resource);
- void remove_resource(const Ref<Resource>& p_resource);
- void save_resource(const String& p_path,const Ref<Resource>& p_resource);
- void save_resource_as(const Ref<Resource>& p_resource);
-
+ void add_resource(const Ref<Resource> &p_resource);
+ void remove_resource(const Ref<Resource> &p_resource);
+ void save_resource(const String &p_path, const Ref<Resource> &p_resource);
+ void save_resource_as(const Ref<Resource> &p_resource);
void cleanup();