mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Set auto translate mode for drag previews
- Controls - `LineEdit`, `TextEdit`: Always disabled since it's dragging user input. - `TabBar`: Use the same auto translate mode as the node. - `RichTextLabel`: Always disable since auto translation is done differently from other controls (selection text you get programmatically is always after auto translation). - Editor - Disable drag preview auto translation if the text is user input, filename, or class name. - Also disabled unexpected auto translation for audio bus effect names.
This commit is contained in:
parent
694d3c2930
commit
14321b8ed5
18 changed files with 22 additions and 1 deletions
|
@ -5994,6 +5994,7 @@ Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
|
|||
|
||||
Label *label = memnew(Label);
|
||||
label->set_text(it->get_text(0));
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
set_drag_preview(label);
|
||||
return d;
|
||||
}
|
||||
|
@ -6560,6 +6561,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
parameters->set_hide_folding(false);
|
||||
parameters->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
parameters->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
parameters->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
parameters->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_param_selected));
|
||||
parameters->connect("nothing_selected", callable_mp(this, &VisualShaderEditor::_param_unselected));
|
||||
sc->add_child(parameters);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue