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

Document various HUD/CAM natives #933

Closed
wants to merge 12 commits into from
2 changes: 1 addition & 1 deletion HUD/DisableFrontendThisFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ns: HUD
void DISABLE_FRONTEND_THIS_FRAME();
```


Prevents pause menu from listening to controls 199, 200 every frame.
38 changes: 38 additions & 0 deletions HUD/GetMenuLayoutChangedEventDetails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
ns: HUD
aliases: ["0x7E17BE53E1AAABAF", "_GET_PAUSE_MENU_SELECTION_DATA"]
---
## GET_MENU_LAYOUT_CHANGED_EVENT_DETAILS

```c
// 0x7E17BE53E1AAABAF 0x6025AA2F
void GET_MENU_LAYOUT_CHANGED_EVENT_DETAILS(int* oldMenuState, int* currentMenuState, int* selectedItemUniqueId);
```

Returns details of the current layout changed event. Also see the HasMenuLayoutChangedEventOccurred native.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved

oldMenuState: This is the menuID of the last selected item minus 1000 (lastItem.menuID - 1000)
freedy69 marked this conversation as resolved.
Show resolved Hide resolved
currentMenuState: Same as oldMenuState except for the currently selected menu item
selectedItemUniqueId: This is uniqueID of the currently selected menu item
menu state values can be viewed here (or PauseMenuLUT.as in scaleform files): https://pastebin.com/ZiMpN3mN
freedy69 marked this conversation as resolved.
Show resolved Hide resolved

when the pausemenu is closed:
freedy69 marked this conversation as resolved.
Show resolved Hide resolved
oldMenuState = -1
currentMenuState = -1
selectedItemUniqueId = 0

when the header gains focus:
oldMenuState updates as normal or 0 if the pausemenu was just opened
currentMenuState 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:
oldMenuState becomes a unique id for the pausemenu page that focus was moved to (?)
currentMenuState = -1
selectedItemUniqueId updates as normal

## Parameters
* **oldMenuState**:
* **currentMenuState**:
* **selectedItemUniqueId**:

17 changes: 17 additions & 0 deletions HUD/GetMenuTriggerEventDetails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ns: HUD
aliases: ["0x36C1451A88A09630", "_GET_PAUSE_MENU_SELECTION"]
---
## GET_MENU_TRIGGER_EVENT_DETAILS

```c
// 0x36C1451A88A09630 0x8543AAC8
void GET_MENU_TRIGGER_EVENT_DETAILS(cs_type(AnyPtr) int* lastItemMenuId, cs_type(AnyPtr) int* selectedItemUniqueId);
```

Also see HasMenuTriggerEventOccurred native.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved

## Parameters
* **lastItemMenuId**:
* **selectedItemUniqueId**:

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
ns: HUD
aliases: ["0x632B2940C67F4EA9"]
aliases: ["0x632B2940C67F4EA9", "_GET_SCALEFORM_MOVIE_CURSOR_SELECTION"]
---
## _GET_SCALEFORM_MOVIE_CURSOR_SELECTION
## GET_MOUSE_EVENT

```c
// 0x632B2940C67F4EA9
BOOL _GET_SCALEFORM_MOVIE_CURSOR_SELECTION(int scaleformHandle, cs_type(Any*) bool* received, cs_type(Any*) int* selectionType, cs_type(Any*) int* context, int* slotIndex);
BOOL GET_MOUSE_EVENT(int scaleformHandle, cs_type(Any*) bool* received, cs_type(Any*) int* selectionType, cs_type(Any*) int* context, int* slotIndex);
```

Gets mouse selection data from scaleforms with mouse support. Must be checked every frame.
Gets current mouse event details, triggered by a scaleform.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved
Returns item index if using the COLOUR_SWITCHER_02 scaleform.
Selection types, found in MOUSE_EVENTS.as:
MOUSE_DRAG_OUT = 0;
Expand Down
17 changes: 0 additions & 17 deletions HUD/GetPauseMenuCursorPosition.md

This file was deleted.

15 changes: 15 additions & 0 deletions HUD/GetPauseMenuPosition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
ns: HUD
aliases: ['0x5BFF36D6ED83E0AE', "_GET_PAUSE_MENU_CURSOR_POSITION"]
---
## GET_PAUSE_MENU_POSITION

```c
// 0x5BFF36D6ED83E0AE
Vector3 GET_PAUSE_MENU_POSITION();
```


## Return value
Z is always 0.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved
Returns starting position coordinates of the Pause Menu's body component.
15 changes: 0 additions & 15 deletions HUD/GetPauseMenuSelection.md

This file was deleted.

34 changes: 0 additions & 34 deletions HUD/GetPauseMenuSelectionData.md

This file was deleted.

19 changes: 8 additions & 11 deletions HUD/GetPauseMenuState.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ ns: HUD
int GET_PAUSE_MENU_STATE();
```

```
Returns:
0
5
10
15
20
25
30
35
```
Return values:
freedy69 marked this conversation as resolved.
Show resolved Hide resolved
0 - Pause menu isn't open
5 - Pause menu is starting
10 - Pause menu is switching
15 - Pause menu is ready for control
25 - Social club menu or online policies menu is open
30 - Pause menu is exiting
35 - Rockstar editor is active

## Return value
15 changes: 15 additions & 0 deletions HUD/HasMenuLayoutChangedEventOccurred.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
ns: HUD
aliases: ["0x2E22FEFA0100275E"]
---
## HAS_MENU_LAYOUT_CHANGED_EVENT_OCCURRED

```c
// 0x2E22FEFA0100275E 0x96863460
BOOL HAS_MENU_LAYOUT_CHANGED_EVENT_OCCURRED();
```

Returns true per frame when pause menu is navigated.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved
Note: This can only be used by one script at a time.

## Return value
15 changes: 15 additions & 0 deletions HUD/HasMenuTriggerEventOccurred.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
ns: HUD
aliases: ["0xF284AC67940C6812"]
---
## HAS_MENU_TRIGGER_EVENT_OCCURRED

```c
// 0xF284AC67940C6812 0x7D95AFFF
cs_type(Any) BOOL HAS_MENU_TRIGGER_EVENT_OCCURRED();
```

Returns true if a pause menu Trigger Event has occured this frame.
Trigger event becomes active whenever currently highlighted menu item in pause menu is either clicked on by the cursor or enter (control 201) is pressed.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved

## Return value
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
ns: HUD
aliases: ["0x3D9ACB1EB139E702"]
aliases: ["0x3D9ACB1EB139E702", "_IS_MOUSE_CURSOR_ABOVE_INSTRUCTIONAL_BUTTONS"]
---
## _IS_MOUSE_CURSOR_ABOVE_INSTRUCTIONAL_BUTTONS
## IS_MOUSE_ROLLED_OVER_INSTRUCTIONAL_BUTTONS

```c
// 0x3D9ACB1EB139E702
cs_type(Any) BOOL _IS_MOUSE_CURSOR_ABOVE_INSTRUCTIONAL_BUTTONS();
cs_type(Any) BOOL IS_MOUSE_ROLLED_OVER_INSTRUCTIONAL_BUTTONS();
```

Returns true if the cursor is hovering above instructional buttons.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
16 changes: 0 additions & 16 deletions HUD/IsWarningMessageActive_2.md

This file was deleted.

13 changes: 13 additions & 0 deletions HUD/IsWarningMessageReadyForControl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
ns: HUD
aliases: ["0xAF42195A42C63BBA", "_IS_WARNING_MESSAGE_ACTIVE_2"]
---
## IS_WARNING_MESSAGE_READY_FOR_CONTROL

```c
// 0xAF42195A42C63BBA
BOOL IS_WARNING_MESSAGE_READY_FOR_CONTROL();
```

## Return value
Returns if the warning message scaleform (popup_warning) is loaded.
12 changes: 0 additions & 12 deletions HUD/N_0x2e22fefa0100275e.md

This file was deleted.

12 changes: 0 additions & 12 deletions HUD/N_0xf284ac67940c6812.md

This file was deleted.

14 changes: 0 additions & 14 deletions HUD/PauseMenuGetIndexOfMouseHoveredSlot.md

This file was deleted.

14 changes: 14 additions & 0 deletions HUD/PauseMenuGetMouseHoverIndex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ns: HUD
aliases: ["0x359AF31A4B52F5ED", "_PAUSE_MENU_GET_INDEX_OF_MOUSE_HOVERED_SLOT"]
---
## PAUSE_MENU_GET_MOUSE_HOVER_INDEX

```c
// 0x359AF31A4B52F5ED
int PAUSE_MENU_GET_MOUSE_HOVER_INDEX();
```

If mouse is hovering on a slot, it returns the slot's index, else it returns -1.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved

## Return value
15 changes: 15 additions & 0 deletions HUD/PauseMenuGetMouseHoverUniqueId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
ns: HUD
aliases: ["0x13C4B962653A5280", "_PAUSE_MENU_GET_UNIQUE_ID_OF_MOUSE_HOVERED_SLOT"]
---
## PAUSE_MENU_GET_MOUSE_HOVER_UNIQUE_ID

```c
// 0x13C4B962653A5280
int PAUSE_MENU_GET_MOUSE_HOVER_UNIQUE_ID();
```

If mouse is hovering on a slot, it returns uniqueid of that slot, else it returns -1.
freedy69 marked this conversation as resolved.
Show resolved Hide resolved

## Return value

15 changes: 0 additions & 15 deletions HUD/PauseMenuGetUniqueIdOfMouseHoveredSlot.md

This file was deleted.

Loading