import { VectorEngine, Button, DisplayString, playSFX } from 'vectorengine'; export { VectorEngineExports } from 'vectorengine'; VectorEngine.init(); @inline function clickSound(): void { playSFX(4, 698, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3112, 0, 0, 0, 0.01, 1, 0, 0, 0, 0, 1, 7, 44, 0); } const blue: u32 = 0x99_99_ff_ff; const yellow: u32 = 0xff_ff_00_ff; const white: u32 = 0xff_ff_ff_ff; const text = new DisplayString("mouse up or down", 0.0, 0.3, 0.05, white); const button = new Button("button test", 0.0, 0.0, 0.05, white, yellow, blue, (): void => { // on mouse down text.overwrite("mouse down"); clickSound(); }, (): void => { // on mouse up text.overwrite("mouse up"); } ); let time_count: i32 = 0; export function gameLogic(delta: i32): void { time_count += delta; }