Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable port name auto translation in Visual Shader editor #83233

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions editor/plugins/visual_shader_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -6515,6 +6518,7 @@ class VisualShaderNodePluginDefaultEditor : public VBoxContainer {
} 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);
Expand Down
Loading