Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove lies about setCursor [cherry-pick] #393

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2252,15 +2252,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
Expand Down