From e6c0d896d692c6a5868febda289184d47d8a95ed Mon Sep 17 00:00:00 2001 From: Liam Bigelow <40188355+bglw@users.noreply.github.com> Date: Mon, 17 Feb 2025 09:42:31 +1300 Subject: [PATCH 1/2] Add events for rule screen outgoings --- truncate_client/src/regions/rules.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/truncate_client/src/regions/rules.rs b/truncate_client/src/regions/rules.rs index 882fe45..a3176c0 100644 --- a/truncate_client/src/regions/rules.rs +++ b/truncate_client/src/regions/rules.rs @@ -398,6 +398,8 @@ impl RulesState { .centered_button(theme.button_emphasis, theme.text, &self.map_texture, ui) .clicked() { + self.event_dispatcher + .event(format!("tutorial_core_rules_go_puzzle")); action = Some(RuleCardAction::DailyPuzzle); } ui.add_space(text_padding * 2.0); @@ -407,6 +409,8 @@ impl RulesState { .centered_button(theme.water.lighten(), theme.text, &self.map_texture, ui) .clicked() { + self.event_dispatcher + .event(format!("tutorial_core_rules_go_tutorial")); action = Some(RuleCardAction::Tutorial); } @@ -415,6 +419,8 @@ impl RulesState { .centered_button(theme.water.lighten(), theme.text, &self.map_texture, ui) .clicked() { + self.event_dispatcher + .event(format!("tutorial_core_rules_go_menu")); back_to_menu(); } ui.add_space(text_padding); From 52d46dc9997cc6571ed0783dc62d4c7c40768e07 Mon Sep 17 00:00:00 2001 From: Liam Bigelow <40188355+bglw@users.noreply.github.com> Date: Mon, 17 Feb 2025 09:51:39 +1300 Subject: [PATCH 2/2] Add back the multi-tutorial menu --- web_client/src/_includes/page.html | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/web_client/src/_includes/page.html b/web_client/src/_includes/page.html index d3b716d..f146cc3 100644 --- a/web_client/src/_includes/page.html +++ b/web_client/src/_includes/page.html @@ -560,27 +560,23 @@

Many thanks to the word data sources:

}); if (has_played_tut) { - this.button("Learn To Play", () => { - localStorage.setItem("tutorial_played", "true"); - truncate_runner.join_game('RULE_CARD'); + this.button("Tutorials", () => { + this.learnStage(); }); - // Uncomment if adding back a second tutorial - // this.button("Tutorials", () => { - // this.learnStage(); - // }); } } learnStage() { this.reset(); - this.button("Learn To Play", () => { + this.button("Quick Start", () => { localStorage.setItem("tutorial_played", "true"); - truncate_runner.join_game('TUTORIAL_RULES'); + truncate_runner.join_game('RULE_CARD'); }); - this.button("Example Game", () => { - truncate_runner.join_game('TUTORIAL_EXAMPLE'); + this.button("Interactive Tutorial", () => { + localStorage.setItem("tutorial_played", "true"); + truncate_runner.join_game('TUTORIAL_RULES'); }); this.backButton();