mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
Merge pull request #50 from overextended/lib-2.12.0
dialog close functions
This commit is contained in:
2 files changed
+44
No files matched your search
@@ -8,6 +8,8 @@ import TabItem from '@theme/TabItem';
|
||||
Simple alert dialog that can display a message to the player.
|
||||
Returns whether the player pressed the confirm button or canceled the dialog.
|
||||
|
||||
### lib.alertDialog
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
@@ -42,6 +44,27 @@ lib.alertDialog(data)
|
||||
Returns `confirm` if the player pressed the confirm button, otherwise if the player pressed the cancel button
|
||||
or has exited the dialog with ESC the return will be `cancel`.
|
||||
|
||||
### lib.closeAlertDialog
|
||||
|
||||
Force closes the active alert dialog and sets its return data as `nil`
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
lib.closeAlertDialog()
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/client'
|
||||
|
||||
lib.closeAlertDialog()
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
**Example:**
|
||||
|
||||
<Tabs>
|
||||
|
||||
@@ -78,6 +78,27 @@ you can define `options` **ONLY** with type `'select'`.
|
||||
Doing so otherwise ***will*** result in errors.
|
||||
:::
|
||||
|
||||
### lib.closeInputDialog
|
||||
|
||||
Force closes the active input dialog and sets its return data as `nil`
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
lib.closeInputDialog()
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/client'
|
||||
|
||||
lib.closeInputDialog()
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Usage Example
|
||||
|
||||
### Basic
|
||||
|
||||
Reference in new issue
Block a user