summaryrefslogtreecommitdiffstats
path: root/editor/plugins/visual_shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2023-10-13 10:52:27 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2023-10-13 11:07:05 +0800
commit56f47cc129a1d9f8fc7afcbf02c0edfd625e06cd (patch)
tree1b6a54287dc012aaf0679613db8ab0bcfa0673c9 /editor/plugins/visual_shader_editor_plugin.cpp
parentee118e7ffd97f478de73f4b344fddc0203ef7cca (diff)
downloadredot-engine-56f47cc129a1d9f8fc7afcbf02c0edfd625e06cd.tar.gz
Disable port name auto translation in Visual Shader editor
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index c706869823..da3bbb84bf 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -572,6 +572,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
String prop_name = dp.name.strip_edges();
if (!prop_name.is_empty()) {
Label *label = memnew(Label);
+ label->set_auto_translate(false); // TODO: Implement proper translation switch.
label->set_text(prop_name + ":");
hbox->add_child(label);
}
@@ -843,6 +844,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
hb->add_child(remove_btn);
} else {
Label *label = memnew(Label);
+ label->set_auto_translate(false); // TODO: Implement proper translation switch.
label->set_text(name_left);
label->add_theme_style_override("normal", editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor"))); //more compact
hb->add_child(label);
@@ -892,6 +894,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
type_box->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_change_output_port_type).bind(p_id, i), CONNECT_DEFERRED);
} else {
Label *label = memnew(Label);
+ label->set_auto_translate(false); // TODO: Implement proper translation switch.
label->set_text(name_right);
label->add_theme_style_override("normal", editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor"))); //more compact
hb->add_child(label);
@@ -6515,6 +6518,7 @@ public:
} else {
prop_name_str = prop_name_str.capitalize() + ":";
}
+ prop_name->set_auto_translate(false); // TODO: Implement proper translation switch.
prop_name->set_text(prop_name_str);
prop_name->set_visible(false);
hbox->add_child(prop_name);