From 7e89f69bf4bdcf882ec0b8374ec316735f0ec5d3 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 22 Sep 2022 16:05:39 +0200 Subject: [PATCH] add menu canClose --- docs/ox_lib/Interface/Client/context.md | 2 ++ docs/ox_lib/Interface/Client/menu.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/ox_lib/Interface/Client/context.md b/docs/ox_lib/Interface/Client/context.md index 117a0fff..72f3672d 100644 --- a/docs/ox_lib/Interface/Client/context.md +++ b/docs/ox_lib/Interface/Client/context.md @@ -31,6 +31,8 @@ lib.registerContext(context) * Title display in the menu. * menu?: `string` * Menu identifier - if defined there will be a back arrow next to the menu title that will take you to the menu you defined. +* canClose: `boolean` + * If set to false the user won't be able to exit the menu without pressing one of the buttons. * onExit?: `function` * Function that will be ran when the user closes their context menu with ESC. * options: `table` (`object` or `array`) diff --git a/docs/ox_lib/Interface/Client/menu.md b/docs/ox_lib/Interface/Client/menu.md index b882869a..27287bd8 100644 --- a/docs/ox_lib/Interface/Client/menu.md +++ b/docs/ox_lib/Interface/Client/menu.md @@ -44,6 +44,8 @@ lib.registerMenu(data, cb) * Default: `'top-left'` * disableInput?: `boolean` * Default: `false` + * canClose: `boolean` + * If set to false the user won't be able to exit the menu without pressing one of the buttons. * onClose: `function` * Function that runs when the menu is exited via ESC/Backspace. * onSelected: `function`(selected: `number`: scrollIndex: `number`: args: `any`)