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

Add multi window code and shader editors

This commit is contained in:
trollodel
2022-11-02 15:23:25 +01:00
parent 769d8a7bbe
commit b4d6b47c17
14 changed files with 949 additions and 94 deletions

View File

@@ -40,6 +40,7 @@ class ShaderCreateDialog;
class TabContainer;
class TextShaderEditor;
class VisualShaderEditor;
class WindowWrapper;
class ShaderEditorPlugin : public EditorPlugin {
GDCLASS(ShaderEditorPlugin, EditorPlugin);
@@ -74,6 +75,9 @@ class ShaderEditorPlugin : public EditorPlugin {
Button *button = nullptr;
MenuButton *file_menu = nullptr;
WindowWrapper *window_wrapper = nullptr;
Button *make_floating = nullptr;
ShaderCreateDialog *shader_create_dialog = nullptr;
void _update_shader_list();
@@ -93,6 +97,8 @@ class ShaderEditorPlugin : public EditorPlugin {
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
void _window_changed(bool p_visible);
protected:
void _notification(int p_what);
@@ -102,6 +108,8 @@ public:
virtual bool handles(Object *p_object) const override;
virtual void make_visible(bool p_visible) override;
virtual void selected_notify() override;
virtual void set_window_layout(Ref<ConfigFile> p_layout) override;
virtual void get_window_layout(Ref<ConfigFile> p_layout) override;
TextShaderEditor *get_shader_editor(const Ref<Shader> &p_for_shader);
VisualShaderEditor *get_visual_shader_editor(const Ref<Shader> &p_for_shader);