Skip to content

Commit

Permalink
use ribbons unwrap in goto_current_page
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamby777 committed Jan 30, 2024
1 parent 65c044a commit c34abdc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pets-lib/src/dialogue/dbox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ impl DialogBox {
self.tween_txt_visibility();
}

/// Start tweening a text's visible characters from
/// 0% to 100% visible...
/// Start tweening a text's visible characters from 0% to 100% visible...
/// See <https://github.com/Lamby777/PETS-G/issues/50>
pub fn tween_txt_visibility(&mut self) {
let tw = tween(
Expand Down Expand Up @@ -119,9 +118,8 @@ impl DialogBox {

if let Some(ix) = ix {
let ix = ix.clone();
let Some(page) = ix.pages.get(pageno) else {
panic!("Page number {} out of range!", pageno);
};
let page = ix.pages.get(pageno);
let page = unwrap_fmt!(page, "Page #{} out of range!", pageno);

self.update_meta(&page.metadata);
self.spk_txt = spk_display(&self.speaker.temporary).into();
Expand Down

0 comments on commit c34abdc

Please sign in to comment.