Refactored the frontend to work with static widgets #11
This commit is contained in:
+5
-2
@@ -2,11 +2,14 @@ use osui::prelude::*;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let screen = Screen::new();
|
||||
screen.extension(VelocityExtension);
|
||||
|
||||
let count = use_state(0);
|
||||
|
||||
rsx! {
|
||||
%count // Dependency of count
|
||||
"Count: {count}"
|
||||
@Velocity(20, 0);
|
||||
@Transform::new();
|
||||
static "Count: {count}"
|
||||
}
|
||||
.draw(&screen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user