diff --git a/Cargo.lock b/Cargo.lock index 5cd3e862..c0101592 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2001,6 +2001,7 @@ dependencies = [ "serde", "strum", "strum_macros", + "unicode-segmentation", "winit", ] @@ -4137,6 +4138,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + [[package]] name = "unicode-width" version = "0.1.10" diff --git a/Cargo.toml b/Cargo.toml index 56745350..2cc5d3af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,6 +64,7 @@ polyanya = "0.2.0" bevy_pathmesh = "0.3.0" bitflags = "1.3.2" iyes_progress = "0.7.1" +unicode-segmentation = "1.10.1" # keep the following in sync with Bevy's dependencies winit = { version = "0.27", default-features = false } diff --git a/assets/dialogs/follower.dlg.ron b/assets/dialogs/follower.dlg.ron index dbfdfa49..57658831 100644 --- a/assets/dialogs/follower.dlg.ron +++ b/assets/dialogs/follower.dlg.ron @@ -54,6 +54,7 @@ ), "page:exit": ( text: "Goodbye.\n*The creature\'s gaze shifts ever so slightly. It now looks just past you into the void.*", + talking_speed: 2., next_page: Exit, ), "page:main-choice-unnest": ( diff --git a/src/ingame_menu.rs b/src/ingame_menu.rs new file mode 100644 index 00000000..41e2cc42 --- /dev/null +++ b/src/ingame_menu.rs @@ -0,0 +1,51 @@ +use crate::player_control::actions::{Actions, ActionsFrozen}; +use crate::GameState; +use bevy::prelude::*; +use bevy_egui::{egui, EguiContext}; + +/// Handles the pause menu accessed while playing the game via ESC. +pub struct IngameMenuPlugin; + +impl Plugin for IngameMenuPlugin { + fn build(&self, app: &mut App) { + { + app.add_system_set(SystemSet::on_update(GameState::Playing).with_system(handle_pause)); + } + } +} + +fn handle_pause( + mut time: ResMut