Skip to content

Commit 59039a5

Browse files
Fix file override confirmation dialog from being overflown with text when exporting
Fixes #1477
1 parent 6adbea9 commit 59039a5

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

src/UI/Dialogs/ExportDialog.gd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ func open_path_validation_alert_popup(path_or_name: int = -1) -> void:
281281

282282

283283
func open_file_exists_alert_popup(text: String) -> void:
284-
file_exists_alert_popup.dialog_text = text
284+
var file_exists_label := file_exists_alert_popup.get_node(^"ScrollContainer/Label") as Label
285+
file_exists_label.text = text
285286
file_exists_alert_popup.popup_centered_clamped()
286287

287288

@@ -454,15 +455,17 @@ func _on_file_format_item_selected(index: int) -> void:
454455

455456
## Overwrite existing file
456457
func _on_file_exists_alert_confirmed() -> void:
457-
file_exists_alert_popup.dialog_text = Export.file_exists_alert
458+
var file_exists_label := file_exists_alert_popup.get_node(^"ScrollContainer/Label") as Label
459+
file_exists_label.text = Export.file_exists_alert
458460
Export.stop_export = false
459461
resume_export_function.emit()
460462

461463

462464
func _on_file_exists_alert_custom_action(action: StringName) -> void:
463465
if action == &"cancel":
464466
# Cancel export
465-
file_exists_alert_popup.dialog_text = Export.file_exists_alert
467+
var file_exists_label := file_exists_alert_popup.get_node(^"ScrollContainer/Label") as Label
468+
file_exists_label.text = Export.file_exists_alert
466469
Export.stop_export = true
467470
resume_export_function.emit()
468471
file_exists_alert_popup.hide()

src/UI/Dialogs/ExportDialog.tscn

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,18 @@ access = 2
349349
dialog_text = "DirAccess path and file name are not valid!"
350350

351351
[node name="FileExistsAlert" type="AcceptDialog" parent="." unique_id=2050038451]
352-
dialog_text = "File %s already exists. Overwrite?"
352+
oversampling_override = 1.0
353+
size = Vector2i(400, 300)
354+
355+
[node name="ScrollContainer" type="ScrollContainer" parent="FileExistsAlert" unique_id=1400960240]
356+
offset_left = 8.0
357+
offset_top = 8.0
358+
offset_right = 392.0
359+
offset_bottom = 251.0
360+
361+
[node name="Label" type="Label" parent="FileExistsAlert/ScrollContainer" unique_id=1256306510]
362+
layout_mode = 2
363+
text = "File %s already exists. Overwrite?"
353364

354365
[node name="ExportProgressBar" type="Window" parent="." unique_id=438204898]
355366
title = "Export Progress"

0 commit comments

Comments
 (0)