1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Make shader language editors inherit the same base class

This commit is contained in:
Aaron Franke
2024-07-12 11:56:49 -07:00
parent ee363af0ed
commit 99e997ae15
8 changed files with 120 additions and 61 deletions

View File

@@ -37,6 +37,7 @@ class HSplitContainer;
class ItemList;
class MenuButton;
class ShaderCreateDialog;
class ShaderEditor;
class TabContainer;
class TextShaderEditor;
class VisualShaderEditor;
@@ -52,8 +53,7 @@ class ShaderEditorPlugin : public EditorPlugin {
struct EditedShader {
Ref<Shader> shader;
Ref<ShaderInclude> shader_inc;
TextShaderEditor *shader_editor = nullptr;
VisualShaderEditor *visual_shader_editor = nullptr;
ShaderEditor *shader_editor = nullptr;
String path;
String name;
};
@@ -121,8 +121,7 @@ public:
virtual void make_visible(bool p_visible) override;
virtual void selected_notify() override;
TextShaderEditor *get_shader_editor(const Ref<Shader> &p_for_shader);
VisualShaderEditor *get_visual_shader_editor(const Ref<Shader> &p_for_shader);
ShaderEditor *get_shader_editor(const Ref<Shader> &p_for_shader);
virtual void set_window_layout(Ref<ConfigFile> p_layout) override;
virtual void get_window_layout(Ref<ConfigFile> p_layout) override;