From af9f717870597a8476563b25c614a8c04ee888f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=A1ez?= Date: Thu, 5 Sep 2024 10:32:30 -0300 Subject: [PATCH] fix: remove lies about setCursor (#390) --- src/types.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index b6ae271e..f83075d0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2277,15 +2277,24 @@ export interface KAPLAYCtx< */ getGamepads(): KGamepad[]; /** - * Set cursor style (check Cursor type for possible values). Cursor will be reset to "default" every frame so use this in an per-frame action. + * Set cursor style. * * @since v3000.0 * * @example * ```js + * // Change between cursor styles + * + * // Reset cursor to default at start of every frame + * onUpdate(() => setCursor("default")); + * * button.onHover((c) => { + * // change cursor to pointer when hovering over button * setCursor("pointer") * }) + * + * // Hide the only cursor at start (useful for fakeMouse) + * setCursor("none"); * ``` * * @group Info