getMenuLayoutChangedEventDetails
GET_MENU_LAYOUT_CHANGED_EVENT_DETAILS0x7E17BE53E1AAABAFThe GTA V native GET_MENU_LAYOUT_CHANGED_EVENT_DETAILS of the HUD namespace, as LS:MP client scripts call it: the global function getMenuLayoutChangedEventDetails, in JavaScript and in Lua.
getMenuLayoutChangedEventDetails(): [
lastItemMenuId: number,
selectedItemMenuId: number,
selectedItemUniqueId: number
]getMenuLayoutChangedEventDetails(): integer, integer, integerUsage
const [lastItemMenuId, selectedItemMenuId, selectedItemUniqueId] =
getMenuLayoutChangedEventDetails();local lastItemMenuId, selectedItemMenuId, selectedItemUniqueId =
getMenuLayoutChangedEventDetails()Parameters
None. The game writes the outputs: they are handed back, not passed in.
Returns
3 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | lastItemMenuId | int | number | integer | this is the menuID of the last selected item minus 1000 (lastItem.menuID - 1000) output |
| 2 | selectedItemMenuId | int | number | integer | same as lastItemMenuId except for the currently selected menu item output |
| 3 | selectedItemUniqueId | int | number | integer | this is uniqueID of the currently selected menu item output |
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
when the pausemenu is closed:
lastItemMenuId = -1
selectedItemMenuId = -1
selectedItemUniqueId = 0
when the header gains focus:
lastItemMenuId updates as normal or 0 if the pausemenu was just opened
selectedItemMenuId becomes a unique id for the pausemenu page that focus was taken from (?) or 0 if the pausemenu was just opened
selectedItemUniqueId = -1
when focus is moved from the header to a pausemenu page:
lastItemMenuId becomes a unique id for the pausemenu page that focus was moved to (?)
selectedItemMenuId = -1
selectedItemUniqueId updates as normal
Reference
- Namespace
- HUD HUD
- In the game
void GET_MENU_LAYOUT_CHANGED_EVENT_DETAILS(int* lastItemMenuId, int* selectedItemMenuId, int* selectedItemUniqueId)- Hash
0x7E17BE53E1AAABAF- Formerly
_GET_PAUSE_MENU_SELECTION_DATA