1786011156

This commit is contained in:
2026-08-06 12:12:36 +02:00
parent 2a07e79233
commit dbe3f879a2
2 changed files with 21 additions and 24 deletions

View File

@@ -16,22 +16,7 @@ fn main() {
let mut trekstor = Trekstor::new(60, app_state);
trekstor.update(|ctx, state| {
if ctx.input.is_just_released(KeyCode::BTN_TOUCH) {
println!("Released {}x{}", ctx.input.x, ctx.input.y);
state.x = ctx.input.x;
state.y = ctx.input.y;
}
ctx.screen.clear((0, 0, 0, 255).into()).ok();
Rectangle::new(Point::new(state.x - 5, state.y - 5), Size::new(10, 10))
.into_styled(PrimitiveStyle::with_fill((255, 0, 0, 255).into()))
.draw(&mut ctx.screen)
.ok();
true
});
trekstor.update();
// let red = (255, 0, 0, 255);
// let green = (0, 255, 0, 255);