reveal

Function reveal 

Source
pub fn reveal(str: &str, time_between: f64, skip: Option<(Key, f64)>)
Expand description

Reveals a string gradually, printing one character at a time with a specified time interval.

Useful for typing effects or slow reveals. Can be sped up with the optional skip key and time.

ยงArguments

  • str - The string to reveal gradually. Include \n for new lines.
  • time_between - The time interval (in seconds) between each revealed character.
  • skip - If Some((key, faster_time_between)), pressing this key will temporarily speed up the reveal rate by the faster_time_between. The speed-up lasts briefly after the last press (a grace period of 120 milliseconds) before returning to the normal pace. Holding or repeatedly pressing the key will extend the fast-forward window. If None, the reveal speed cannot be changed.