benilla-re systems structs docs

GetCursorPositionLua

function · ui · primitive

Address
0x48b820 · 135 bytes, up to 0x48b8a6
Signature
int __fastcall (lua_State *L)
Meaning
Pushes the cursor x and y in interface units, 768·a·x and 768·y for the top frame dwords x and y
Confidence
verified, proof two
Finding
ui/methods#screen-size-and-cursor-globals
Test
ui::ui_cursor_position_whole

Finding: Screen size and cursor globals in ui: the Frame and Region methods

With s_U the layout scale of UIParent (+0x7c, 1.0 when it does not exist), fx and fy the cursor dwords the screen root keeps at +0x1118 and +0x111c:

functionanswers
game GetScreenWidth, GetScreenHeightG(RN24(K1/s_U)), G(RN24(K2/s_U))
glue GetScreenWidth, GetScreenHeightG(K1), G(K2)
GetCursorPosition, game and glueG(RN24(K1·fx)), G(RN24(K2·fy))

At a = RN24(4/3) the height is 767.9999427795418 in glue and in the game with s_U 1; uiScale enters only through s_U.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 4

Calls and jumps by a bare address, from tables/calls.tsv.