// Copyright (c) 2026 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT /** * Input action bindings (see duskrpg's input/inputbind.h). Values are the * native inputbind_t enum ordinals. */ declare const InputBind: { readonly UP: number; readonly DOWN: number; readonly LEFT: number; readonly RIGHT: number; readonly ACCEPT: number; readonly CANCEL: number; readonly PAUSE: number; readonly RAGEQUIT: number; readonly CONSOLE: number; readonly POINTERX: number; readonly POINTERY: number; }; /** * Every named physical button registered in the compiled platform's * INPUT_BUTTON_DATA table (see e.g. src/duskpsp/input/inputpsp.c). The * exact set of keys varies per platform -- e.g. InputButton.SELECT exists * on PSP, InputButton.GAMEPAD_BACK on Linux/SDL2. Each value is just the * button's own name string, suitable for passing straight to Input.bind(). */ declare const InputButton: { readonly [name: string]: string; }; /** * Live input state, keyed by InputBind action (not by InputButton). */ declare const Input: { /** Binds a named physical button (see InputButton) to an action. */ bind(button: string, action: number): void; /** Current value of an action (0.0-1.0, or -1.0-1.0 for pointer axes). */ value(bind: number): number; /** Value of an action as of the previous update. */ lastValue(bind: number): number; /** True if the action is currently held down. */ isDown(bind: number): boolean; /** True if the action was held down as of the previous update. */ wasDown(bind: number): boolean; /** True if the action was just pressed this update (down now, not before). */ pressed(bind: number): boolean; /** True if the action was just released this update (up now, down before). */ released(bind: number): boolean; };