Skip to content

Add Inputs.SetCursorShape to Lua scripting - #853

Merged
adriengivry merged 1 commit into
Overload-Technologies:mainfrom
AADITYA007x:feature/lua-cursor-shape
Sep 19, 2026
Merged

adriengivry merged 1 commit into
Overload-Technologies:mainfrom
AADITYA007x:feature/lua-cursor-shape

Conversation

@AADITYA007x

Copy link
Copy Markdown
Contributor

Description

Adds Inputs.SetCursorShape(shape) and a CursorShape enum (ARROW, IBEAM, CROSSHAIR, HAND, HRESIZE, VRESIZE) to the Lua bindings, plus Lua annotation files for editor autocomplete. Tested in the editor by switching shapes from a script at runtime.

Related Issue(s)

Closes #849

Review Guidance

Changes are small: one new binding in LuaGlobalBindings.cpp (the CursorShape enum and Inputs.SetCursorShape, which calls the existing Window::SetCursorShape), plus Lua annotations in Inputs.lua and a new CursorShape.lua.

To test: attach a script to an actor that calls Inputs.SetCursorShape(CursorShape.HAND) (or IBEAM, CROSSHAIR, ARROW) from OnUpdate on a key press, then press Play and check that the cursor changes over the Game View.

Screenshots/GIFs

image Console output while playing a test script that calls `Inputs.SetCursorShape(...)`: both `Inputs.SetCursorShape` and `CursorShape` are available to Lua. The cursor changed to HAND / IBEAM / CROSSHAIR / ARROW when the matching key was pressed in the Game View.

AI Usage Disclosure

I used Claude to help with the implementation and testing steps

Checklist

  • My code follows the project's code style guidelines
  • When applicable, I have commented my code, particularly in hard-to-understand areas
  • When applicable, I have updated the documentation accordingly
  • My changes don't generate new warnings or errors
  • I have reviewed and take responsibility for all code in this PR (including any AI-assisted contributions)

@adriengivry
adriengivry merged commit e4b9a7b into Overload-Technologies:main Sep 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Let scripts change the mouse cursor shape

2 participants