mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
b372a492ad
- rename psleep to prs - rename rsleep to nrs - deprecate and hide docs for fsleep, psleep, prsleep, rsleep. - update examples
26 lines
506 B
Rust
26 lines
506 B
Rust
//! based on the proof of concept at ../../src/poc/cjkscroll.c
|
|
|
|
use libnotcurses_sys::*;
|
|
|
|
fn main() -> NcResult<()> {
|
|
let mut nc = Nc::new()?;
|
|
|
|
let plane = nc.stdplane();
|
|
plane.set_scrolling(true);
|
|
|
|
let mut wc = '\u{4e00}'; // 一
|
|
|
|
loop {
|
|
plane.putchar(wc)?;
|
|
wc = core::char::from_u32(wc as u32 + 1).expect("invalid char");
|
|
|
|
// 龣
|
|
if wc == '\u{9fa5}' {
|
|
wc = '\u{4e00}';
|
|
}
|
|
nrs![&mut nc, 0, 0, 30];
|
|
}
|
|
|
|
// nc.stop()?;
|
|
}
|