summaryrefslogtreecommitdiffstats
path: root/editor/plugins/text_shader_editor.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2024-07-12 11:56:49 -0700
committerAaron Franke <arnfranke@yahoo.com>2024-08-15 15:12:39 -0700
commit99e997ae15dae35de9f8b320d03796b75c852d5f (patch)
treef078a8e1563e0363899dd61932095e14b4336acf /editor/plugins/text_shader_editor.cpp
parentee363af0ed65f6ca9a906f6065d0bd9c19dcf9e4 (diff)
downloadredot-engine-99e997ae15dae35de9f8b320d03796b75c852d5f.tar.gz
Make shader language editors inherit the same base class
Diffstat (limited to 'editor/plugins/text_shader_editor.cpp')
-rw-r--r--editor/plugins/text_shader_editor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
index 276c57533f..6cd92bdf57 100644
--- a/editor/plugins/text_shader_editor.cpp
+++ b/editor/plugins/text_shader_editor.cpp
@@ -895,7 +895,7 @@ void TextShaderEditor::_reload() {
}
}
-void TextShaderEditor::edit(const Ref<Shader> &p_shader) {
+void TextShaderEditor::edit_shader(const Ref<Shader> &p_shader) {
if (p_shader.is_null() || !p_shader->is_text_shader()) {
return;
}
@@ -910,7 +910,7 @@ void TextShaderEditor::edit(const Ref<Shader> &p_shader) {
code_editor->set_edited_shader(shader);
}
-void TextShaderEditor::edit(const Ref<ShaderInclude> &p_shader_inc) {
+void TextShaderEditor::edit_shader_include(const Ref<ShaderInclude> &p_shader_inc) {
if (p_shader_inc.is_null()) {
return;
}
@@ -1141,6 +1141,7 @@ TextShaderEditor::TextShaderEditor() {
context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
VBoxContainer *main_container = memnew(VBoxContainer);
+ main_container->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
HBoxContainer *hbc = memnew(HBoxContainer);
edit_menu = memnew(MenuButton);