mirror of
https://github.com/danbulant/cushy
synced 2026-05-24 20:32:28 +00:00
10 lines
324 B
Rust
10 lines
324 B
Rust
use gooey::dynamic::Dynamic;
|
|
use gooey::widgets::Button;
|
|
use gooey::{EventLoopError, Run};
|
|
|
|
fn main() -> Result<(), EventLoopError> {
|
|
let count = Dynamic::new(0_usize);
|
|
Button::new(count.map_each(ToString::to_string))
|
|
.on_click(count.with_clone(|count| move |_| count.set(count.get() + 1)))
|
|
.run()
|
|
}
|