2019-04-11 07:46:30 +10:00
|
|
|
use crossterm_screen::AlternateScreen;
|
2019-01-28 07:16:14 +11:00
|
|
|
|
|
|
|
/// print wait screen on alternate screen, then switch back.
|
2019-09-14 07:29:56 +10:00
|
|
|
#[allow(unused_variables)]
|
|
|
|
fn main() {
|
2019-06-22 02:10:46 +10:00
|
|
|
// move to the alternate screen, 'false' determines if the alternate screen should be in raw mode.
|
2019-04-11 07:46:30 +10:00
|
|
|
if let Ok(alternate) = AlternateScreen::to_alternate(false) {
|
2019-01-28 07:16:14 +11:00
|
|
|
// do some stuff on the alternate screen.
|
|
|
|
} // <- alternate screen will be disabled when dropped.
|
|
|
|
}
|