mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
dialog close functions
This commit is contained in:
1 parent
15863b8508
commit
c318cdb467
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.
|
Simple alert dialog that can display a message to the player.
|
||||||
Returns whether the player pressed the confirm button or canceled the dialog.
|
Returns whether the player pressed the confirm button or canceled the dialog.
|
||||||
|
|
||||||
|
### lib.alertDialog
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem value='Lua'>
|
<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
|
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`.
|
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:**
|
**Example:**
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
|
|||||||
@@ -78,6 +78,27 @@ you can define `options` **ONLY** with type `'select'`.
|
|||||||
Doing so otherwise ***will*** result in errors.
|
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
|
## Usage Example
|
||||||
|
|
||||||
### Basic
|
### Basic
|
||||||
|
|||||||
Reference in new issue
Block a user