diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-06-04 12:24:08 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-08-07 21:02:13 +0300 |
commit | 5e5cd2495d8ec8bc0685dbf3b98dc251c3c7bddb (patch) | |
tree | 1f039810d2dc0308bde14d75afc6d6dcd971c14a /editor/editor_resource_picker.h | |
parent | 3177da1d053a6132668e12a8d8af82366f5c4ac9 (diff) |
Added editor dialog for easily creating shaders.
Diffstat (limited to 'editor/editor_resource_picker.h')
-rw-r--r-- | editor/editor_resource_picker.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h index a4c3006c02..d77c31f831 100644 --- a/editor/editor_resource_picker.h +++ b/editor/editor_resource_picker.h @@ -144,4 +144,23 @@ public: EditorScriptPicker(); }; +class EditorShaderPicker : public EditorResourcePicker { + GDCLASS(EditorShaderPicker, EditorResourcePicker); + + enum ExtraMenuOption { + OBJ_MENU_NEW_SHADER = 10, + }; + + ShaderMaterial *edited_material = nullptr; + +public: + virtual void set_create_options(Object *p_menu_node) override; + virtual bool handle_menu_selected(int p_which) override; + + void set_edited_material(ShaderMaterial *p_material); + ShaderMaterial *get_edited_material() const; + + EditorShaderPicker(); +}; + #endif // EDITOR_RESOURCE_PICKER_H |