Skip to content

Commit

Permalink
Document various text input box natives
Browse files Browse the repository at this point in the history
Added parameters, real names, etc.
  • Loading branch information
freedy69 committed May 9, 2024
1 parent 5999728 commit 080e849
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 90 deletions.
8 changes: 3 additions & 5 deletions HUD/ForceCloseTextInputBox.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
ns: HUD
aliases: ["0x8817605C2BA76200"]
aliases: ["0x8817605C2BA76200", "_FORCE_CLOSE_TEXT_INPUT_BOX"]
---
## _FORCE_CLOSE_TEXT_INPUT_BOX
## FORCE_CLOSE_TEXT_INPUT_BOX

```c
// 0x8817605C2BA76200
void _FORCE_CLOSE_TEXT_INPUT_BOX();
void FORCE_CLOSE_TEXT_INPUT_BOX();
```


17 changes: 0 additions & 17 deletions HUD/N_0x1185a8087587322c.md

This file was deleted.

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

This file was deleted.

16 changes: 16 additions & 0 deletions HUD/SetAllowCommaOnTextInput.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
ns: HUD
aliases: ["0x577599CCED639CA2"]
---
## SET_ALLOW_COMMA_ON_TEXT_INPUT

```c
// 0x577599CCED639CA2
void SET_ALLOW_COMMA_ON_TEXT_INPUT(cs_type(Any) BOOL allow);
```
**NOTE:** This must be called before you open the text input box.
## Parameters
* **allow**: Toggles if the comma can be used in conjuction with the `filename` text input box type.
16 changes: 16 additions & 0 deletions HUD/SetTextInputBoxEnabled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
ns: HUD
aliases: ["0x1185A8087587322C"]
---
## SET_TEXT_INPUT_BOX_ENABLED

```c
// 0x1185A8087587322C
void SET_TEXT_INPUT_BOX_ENABLED(BOOL state);
```
Toggles if the text input box can be opened with [`DISPLAY_ONSCREEN_KEYBOARD`](#_0x00DC833F2568DBF6).
## Parameters
* **state**:
15 changes: 7 additions & 8 deletions MISC/CancelOnscreenKeyboard.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
ns: MISC
aliases: ["0x58A39BE597CE99CD"]
aliases: ["0x58A39BE597CE99CD", "_CANCEL_ONSCREEN_KEYBOARD"]
---
## _CANCEL_ONSCREEN_KEYBOARD
## CANCEL_ONSCREEN_KEYBOARD

```c
// 0x58A39BE597CE99CD 0x196444BB
void _CANCEL_ONSCREEN_KEYBOARD();
void CANCEL_ONSCREEN_KEYBOARD();
```

```
DO NOT use this as it doesn't clean up the text input box properly and your script will get stuck in the UPDATE_ONSCREEN_KEYBOARD() loop.
Use _FORCE_CLOSE_TEXT_INPUT_BOX instead.
CANCEL_*
```
Closes the onscreen keyboard on console versions of the game.

**NOTE:** Do not use this native in FiveM/PC, because [`UPDATE_ONSCREEN_KEYBOARD`](#_0x0CF2B696BBF945AE) value doesn't get cleaned up and stays as `0`.
You should use [`FORCE_CLOSE_TEXT_INPUT_BOX`](#_0x8817605C2BA76200) instead.
52 changes: 18 additions & 34 deletions MISC/DisplayOnscreenKeyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,29 @@ ns: MISC

```c
// 0x00DC833F2568DBF6 0xAD99F2CE
void DISPLAY_ONSCREEN_KEYBOARD(int p0, char* windowTitle, char* p2, char* defaultText, char* defaultConcat1, char* defaultConcat2, char* defaultConcat3, int maxInputLength);
void DISPLAY_ONSCREEN_KEYBOARD(int keyboardType, char* windowTitle, char* description, char* defaultText, char* defaultConcat1, char* defaultConcat2, char* defaultConcat3, int maxInputLength);
```
```
windowTitle's
-----------------
CELL_EMAIL_BOD = "Enter your Eyefind message"
CELL_EMAIL_BODE = "Message too long. Try again"
CELL_EMAIL_BODF = "Forbidden message. Try again"
CELL_EMAIL_SOD = "Enter your Eyefind subject"
CELL_EMAIL_SODE = "Subject too long. Try again"
CELL_EMAIL_SODF = "Forbidden text. Try again"
CELL_EMASH_BOD = "Enter your Eyefind message"
CELL_EMASH_BODE = "Message too long. Try again"
CELL_EMASH_BODF = "Forbidden message. Try again"
CELL_EMASH_SOD = "Enter your Eyefind subject"
CELL_EMASH_SODE = "Subject too long. Try again"
CELL_EMASH_SODF = "Forbidden Text. Try again"
FMMC_KEY_TIP10 = "Enter Synopsis"
FMMC_KEY_TIP12 = "Enter Custom Team Name"
FMMC_KEY_TIP12F = "Forbidden Text. Try again"
FMMC_KEY_TIP12N = "Custom Team Name"
FMMC_KEY_TIP8 = "Enter Message"
FMMC_KEY_TIP8F = "Forbidden Text. Try again"
FMMC_KEY_TIP8FS = "Invalid Message. Try again"
FMMC_KEY_TIP8S = "Enter Message"
FMMC_KEY_TIP9 = "Enter Outfit Name"
FMMC_KEY_TIP9F = "Invalid Outfit Name. Try again"
FMMC_KEY_TIP9N = "Outfit Name"
PM_NAME_CHALL = "Enter Challenge Name"
```
Displays a text input box.
`keyboardType` values:
| Name | Value |
| ---- | ----- |
| English | 0 |
| Localised | 1 |
| Password | 2 |
| Gamertag | 3 |
| Email | 4 |
| Basic English | 5 |
| Filename | 6 |
## Parameters
* **p0**:
* **windowTitle**:
* **p2**:
* **defaultText**:
* **keyboardType**: See the list above. Default is `0`.
* **windowTitle**: Text label for the title of the box.
* **description**: Has no use on PC.
* **defaultText**: Default text that is written in the input field.
* **defaultConcat1**:
* **defaultConcat2**:
* **defaultConcat3**:
* **maxInputLength**:
* **maxInputLength**: Max number of characters that can be typed (2 - 256).
14 changes: 8 additions & 6 deletions MISC/DisplayOnscreenKeyboardWithLongerInitialString.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ aliases: ["0xCA78CFA0366592FE","_DISPLAY_ONSCREEN_KEYBOARD_2"]

```c
// 0xCA78CFA0366592FE 0xD2688412
void DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING(int p0, char* windowTitle, Any* p2, char* defaultText, char* defaultConcat1, char* defaultConcat2, char* defaultConcat3, char* defaultConcat4, char* defaultConcat5, char* defaultConcat6, char* defaultConcat7, int maxInputLength);
void DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING(int keyboardType, char* windowTitle, cs_type(Any*) char* description, char* defaultText, char* defaultConcat1, char* defaultConcat2, char* defaultConcat3, char* defaultConcat4, char* defaultConcat5, char* defaultConcat6, char* defaultConcat7, int maxInputLength);
```
Displays the text input box with support for input with 500 characters.
## Parameters
* **p0**:
* **windowTitle**:
* **p2**:
* **defaultText**:
* **keyboardType**: See [`DISPLAY_ONSCREEN_KEYBOARD`](#_0x00DC833F2568DBF6)
* **windowTitle**: Text label of the window title.
* **description**: Unused on PC.
* **defaultText**: Default text that is written in the input field.
* **defaultConcat1**:
* **defaultConcat2**:
* **defaultConcat3**:
* **defaultConcat4**:
* **defaultConcat5**:
* **defaultConcat6**:
* **defaultConcat7**:
* **maxInputLength**:
* **maxInputLength**: Value between 2 - 500.
20 changes: 14 additions & 6 deletions MISC/NextOnscreenKeyboardResultWillDisplayUsingTheseFonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ aliases: ["0x3ED1438C1F5C6612"]

```c
// 0x3ED1438C1F5C6612 0x3301EA47
void NEXT_ONSCREEN_KEYBOARD_RESULT_WILL_DISPLAY_USING_THESE_FONTS(int p0);
void NEXT_ONSCREEN_KEYBOARD_RESULT_WILL_DISPLAY_USING_THESE_FONTS(int fontBitField);
```
```
p0 was always 2 in R* scripts.
Called before calling DISPLAY_ONSCREEN_KEYBOARD if the input needs to be saved.
```
`fontBitField` values:
| Name | Value |
| ----- | ----- |
| Standard | 1 |
| Cursive | 2 |
| Rockstar Tag | 4 |
| Leaderboard | 8 |
| Condensed | 16 |
| Fixed Width Numbers | 32 |
| Condensed Not Gamer Name | 64 |
| Pricedown | 128 |
## Parameters
* **p0**:
* **fontBitField**: See the list above.

0 comments on commit 080e849

Please sign in to comment.