fixed issues with Input API

This commit is contained in:
2026-03-24 13:40:30 +00:00
parent 0a087d51fb
commit 2592b1a1d1
17 changed files with 457 additions and 90 deletions
@@ -1,5 +1,5 @@
import { Color, Gfx } from "@sdk:gfx";
import { Input } from "@sdk:input";
import { Pad, Touch } from "@sdk:input";
declare struct Vec2(x: int, y: int)
[
@@ -51,8 +51,10 @@ fn frame(): void {
}
// 4. Input Snapshot & Nested Member Access
let p = Input.pad();
if p.a.down {
let pad = Pad.a();
let touch = Touch.finger();
let is_pressed = pad.down || touch.down;
if is_pressed {
Gfx.clear(Color.BLUE);
}
}