From c318cdb467e9785f2ac4006d82a67f4e6c22e971 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 29 Sep 2022 11:50:25 +0200 Subject: [PATCH] dialog close functions --- docs/ox_lib/Interface/Client/alert.md | 23 +++++++++++++++++++++++ docs/ox_lib/Interface/Client/input.md | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/docs/ox_lib/Interface/Client/alert.md b/docs/ox_lib/Interface/Client/alert.md index f38f63ea..4f4c54aa 100644 --- a/docs/ox_lib/Interface/Client/alert.md +++ b/docs/ox_lib/Interface/Client/alert.md @@ -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 + @@ -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` + + + + +```lua +lib.closeAlertDialog() +``` + + + +```ts +import lib from '@overextended/ox_lib/client' + +lib.closeAlertDialog() +``` + + + **Example:** diff --git a/docs/ox_lib/Interface/Client/input.md b/docs/ox_lib/Interface/Client/input.md index e3e5dfff..b94e3252 100644 --- a/docs/ox_lib/Interface/Client/input.md +++ b/docs/ox_lib/Interface/Client/input.md @@ -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` + + + + +```lua +lib.closeInputDialog() +``` + + + +```ts +import lib from '@overextended/ox_lib/client' + +lib.closeInputDialog() +``` + + + ## Usage Example ### Basic