aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/shader_editor_plugin.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/plugins/shader_editor_plugin.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/plugins/shader_editor_plugin.h')
-rw-r--r--editor/plugins/shader_editor_plugin.h32
1 files changed, 11 insertions, 21 deletions
diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h
index 703913e43..4a56c14ec 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -31,41 +31,36 @@
#include "editor/code_editor.h"
#include "editor/editor_plugin.h"
+#include "scene/gui/menu_button.h"
#include "scene/gui/tab_container.h"
#include "scene/gui/text_edit.h"
-#include "scene/gui/menu_button.h"
#include "scene/main/timer.h"
#include "scene/resources/shader.h"
#include "servers/visual/shader_language.h"
class ShaderTextEditor : public CodeTextEditor {
- GDCLASS( ShaderTextEditor, CodeTextEditor );
+ GDCLASS(ShaderTextEditor, CodeTextEditor);
Ref<Shader> shader;
protected:
-
static void _bind_methods();
virtual void _load_theme_settings();
- virtual void _code_complete_script(const String& p_code, List<String>* r_options);
+ virtual void _code_complete_script(const String &p_code, List<String> *r_options);
public:
-
virtual void _validate_script();
-
Ref<Shader> get_edited_shader() const;
- void set_edited_shader(const Ref<Shader>& p_shader);
+ void set_edited_shader(const Ref<Shader> &p_shader);
ShaderTextEditor();
-
};
-
class ShaderEditor : public VBoxContainer {
- GDCLASS(ShaderEditor, VBoxContainer );
+ GDCLASS(ShaderEditor, VBoxContainer);
enum {
@@ -92,32 +87,29 @@ class ShaderEditor : public VBoxContainer {
GotoLineDialog *goto_line_dialog;
ConfirmationDialog *erase_tab_confirm;
-
ShaderTextEditor *shader_editor;
-
void _menu_option(int p_optin);
void _params_changed();
mutable Ref<Shader> shader;
-
void _editor_settings_changed();
protected:
void _notification(int p_what);
static void _bind_methods();
-public:
+public:
void apply_shaders();
void ensure_select_current();
- void edit(const Ref<Shader>& p_shader);
+ void edit(const Ref<Shader> &p_shader);
Dictionary get_state() const;
- void set_state(const Dictionary& p_state);
+ void set_state(const Dictionary &p_state);
void clear();
- virtual Size2 get_minimum_size() const { return Size2(0,200); }
+ virtual Size2 get_minimum_size() const { return Size2(0, 200); }
void save_external_data();
ShaderEditor();
@@ -125,7 +117,7 @@ public:
class ShaderEditorPlugin : public EditorPlugin {
- GDCLASS( ShaderEditorPlugin, EditorPlugin );
+ GDCLASS(ShaderEditorPlugin, EditorPlugin);
bool _2d;
ShaderEditor *shader_editor;
@@ -133,7 +125,6 @@ class ShaderEditorPlugin : public EditorPlugin {
Button *button;
public:
-
virtual String get_name() const { return "Shader"; }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
@@ -142,7 +133,7 @@ public:
virtual void selected_notify();
Dictionary get_state() const;
- virtual void set_state(const Dictionary& p_state);
+ virtual void set_state(const Dictionary &p_state);
virtual void clear();
virtual void save_external_data();
@@ -150,7 +141,6 @@ public:
ShaderEditorPlugin(EditorNode *p_node);
~ShaderEditorPlugin();
-
};
#endif