Add make help, Enter key validation, Android/macOS/web/ChromeOS exports (0.9.0)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Denis Defolie
2026-10-12 12:49:25 +02:00
parent bf180eea01
commit 87919826ef
14 changed files with 268 additions and 27 deletions
+2
View File
@@ -30,6 +30,8 @@ func _ready() -> void:
_replay_button.pressed.connect(_on_replay_pressed)
_validate_button.pressed.connect(_on_validate_pressed)
# La touche Entree valide comme le bouton.
_text_edit.text_submitted.connect(func(_text: String) -> void: _on_validate_pressed())
func load_exercise(dictation: Dictionary) -> void:
+7
View File
@@ -24,6 +24,7 @@ var _attempt_number := 1
var _completed_count := 0
var _seen_exercise_ids: Array[String] = []
var _outcomes: Array[String] = []
var _feedback_open := false
var _pending_outcome := ""
@onready var _exercise_container: Control = %ExerciseContainer
@@ -155,6 +156,10 @@ func _on_dictation_submitted(submitted_text: String) -> void:
func _handle_result(result: CorrectionResult) -> void:
# La touche Entree peut re-valider une saisie encore focalisee derriere le
# panneau de retour : une seule reponse est comptee par essai.
if _feedback_open:
return
var support_level := AttemptFlow.SupportLevel.EXPLANATION
var is_terminal := result.is_correct
@@ -183,6 +188,7 @@ func _show_feedback(
result: CorrectionResult, support_level: AttemptFlow.SupportLevel, is_terminal: bool
) -> void:
var feedback: Control = preload("res://scenes/ui/feedback_panel.tscn").instantiate()
_feedback_open = true
_overlay_container.add_child(feedback)
feedback.show_result(result, support_level)
feedback.continue_pressed.connect(_on_feedback_continued.bind(feedback, is_terminal))
@@ -190,6 +196,7 @@ func _show_feedback(
func _on_feedback_continued(feedback: Control, is_terminal: bool) -> void:
feedback.queue_free()
_feedback_open = false
if not is_terminal:
_attempt_number += 1
+2
View File
@@ -45,6 +45,8 @@ func _on_token_toggled(pressed: bool, index: int) -> void:
if not _correction_edits.has(index):
var edit := LineEdit.new()
edit.placeholder_text = UIText.get_text("sentence_correction.correction_placeholder")
# La touche Entree valide comme le bouton.
edit.text_submitted.connect(func(_text: String) -> void: _on_validate_pressed())
_corrections_box.add_child(edit)
_correction_edits[index] = edit
elif _correction_edits.has(index):