summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 9de811e584..c4fda0231c 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -351,6 +351,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
if (!graph_plugin) {
return;
}
+ Shader::Mode mode = visual_shader->get_mode();
Control *offset;
@@ -707,9 +708,9 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
label->add_theme_style_override("normal", label_style); //more compact
hb->add_child(label);
- if (vsnode->get_input_port_default_hint(i) != "" && !port_left_used) {
+ if (vsnode->is_input_port_default(i, mode) && !port_left_used) {
Label *hint_label = memnew(Label);
- hint_label->set_text("[" + vsnode->get_input_port_default_hint(i) + "]");
+ hint_label->set_text(TTR("[default]"));
hint_label->add_theme_color_override("font_color", editor->get_theme_color(SNAME("font_readonly_color"), SNAME("TextEdit")));
hint_label->add_theme_style_override("normal", label_style);
hb->add_child(hint_label);
@@ -840,7 +841,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
offset->set_custom_minimum_size(Size2(0, 4 * EDSCALE));
node->add_child(offset);
- String error = vsnode->get_warning(visual_shader->get_mode(), p_type);
+ String error = vsnode->get_warning(mode, p_type);
if (!error.is_empty()) {
Label *error_label = memnew(Label);
error_label->add_theme_color_override("font_color", editor->get_theme_color(SNAME("error_color"), SNAME("Editor")));