diff options
| author | Juan Linietsky | 2016-10-07 11:31:18 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-10-07 11:31:18 -0300 |
| commit | 850eaf7ed796d2f2d9a35c6bc4ba9a4e69f5ca1d (patch) | |
| tree | 052ed86d4a0eafb2373e65b78b14b6eccba0f707 /tools/editor/plugins/shader_editor_plugin.h | |
| parent | cf5778e51a883936ffc896231da8259e5ebabc0a (diff) | |
| download | godot-850eaf7ed796d2f2d9a35c6bc4ba9a4e69f5ca1d.tar.gz godot-850eaf7ed796d2f2d9a35c6bc4ba9a4e69f5ca1d.tar.zst godot-850eaf7ed796d2f2d9a35c6bc4ba9a4e69f5ca1d.zip | |
-the new shader language seems to work
-shader editor plugin can edit shaders
-code completion in shader editor plugin
Diffstat (limited to '')
| -rw-r--r-- | tools/editor/plugins/shader_editor_plugin.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/tools/editor/plugins/shader_editor_plugin.h b/tools/editor/plugins/shader_editor_plugin.h index ef7cc6772..ffe6a42e8 100644 --- a/tools/editor/plugins/shader_editor_plugin.h +++ b/tools/editor/plugins/shader_editor_plugin.h @@ -38,33 +38,34 @@ #include "scene/resources/shader.h" #include "servers/visual/shader_language.h" -#if 0 class ShaderTextEditor : public CodeTextEditor { OBJ_TYPE( ShaderTextEditor, CodeTextEditor ); Ref<Shader> shader; - ShaderLanguage::ShaderType type; protected: static void _bind_methods(); virtual void _load_theme_settings(); + + 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,ShaderLanguage::ShaderType p_type); + void set_edited_shader(const Ref<Shader>& p_shader); ShaderTextEditor(); }; -class ShaderEditor : public Control { +class ShaderEditor : public VBoxContainer { - OBJ_TYPE(ShaderEditor, Control ); + OBJ_TYPE(ShaderEditor, VBoxContainer ); enum { @@ -88,22 +89,17 @@ class ShaderEditor : public Control { MenuButton *settings_menu; uint64_t idle; - TabContainer *tab_container; GotoLineDialog *goto_line_dialog; ConfirmationDialog *erase_tab_confirm; - TextureButton *close; - ShaderTextEditor *vertex_editor; - ShaderTextEditor *fragment_editor; - ShaderTextEditor *light_editor; + ShaderTextEditor *shader_editor; + - void _tab_changed(int p_which); void _menu_option(int p_optin); void _params_changed(); mutable Ref<Shader> shader; - void _close_callback(); void _editor_settings_changed(); @@ -134,6 +130,8 @@ class ShaderEditorPlugin : public EditorPlugin { bool _2d; ShaderEditor *shader_editor; EditorNode *editor; + Button *button; + public: virtual String get_name() const { return "Shader"; } @@ -150,10 +148,9 @@ public: virtual void save_external_data(); virtual void apply_changes(); - ShaderEditorPlugin(EditorNode *p_node,bool p_2d); + ShaderEditorPlugin(EditorNode *p_node); ~ShaderEditorPlugin(); }; #endif -#endif |
