Commit Graph

177 Commits

Author SHA1 Message Date
Dominic
4f71595122 refactor(keybinds): rename module, tweaks (#127) 2022-10-15 10:08:20 +11:00
BerkieBb
115bf702c9 feat(client/textui): open state getter for textUI (#126)
* feat(package/interface/textui): text ui open getter

* feat(resource/interface/textui): text ui open getter
2022-10-14 17:17:57 +02:00
Sam Shanks
2813bb288b feat(interface/context): context menu onBack function (#122)
* feat(interface/context): back button pressed

* fix(context): types
2022-10-11 13:48:59 +02:00
BerkieBb
738296adfb tweak(resource/interface/menu): add cb field 2022-10-08 01:57:51 +02:00
Linden
0e9ad23fb3 fix: types 2022-10-02 20:19:35 +11:00
BerkieBb
6584105e9c fix(resource/interface/client/menu): add close missing field to MenuOptions (#112)
* feat(resource/interface/client/menu): add missing field to MenuOptions

* feat(package/interface/menu) close argument
2022-09-30 09:57:02 +02:00
Luke
6a8eb35a0a feat(client/interface): close functions for input and alert dialogs 2022-09-29 11:39:30 +02:00
BerkieBb
615a3cc073 feat(interface/menu): onClose keyPressed 2022-09-25 14:26:04 +02:00
DokaDoka
52728feb95 fix(interface/menu): getOpenMenu() returns id rather than entire menu 2022-09-25 11:10:19 +10:00
Linden
6254ba9ba2 refactor(resource/interface): formatting and type definitions 2022-09-18 09:06:32 +10:00
Jag
47163748d5 feat(menu): Open Menu with specified item index selected
* Allows a user to pass in a start index to have pre-selected when a menu is opening
* Cleaned up whitespace inconsistencies in menu.lua
2022-09-17 11:03:10 -07:00
Linden
26538b8148 refactor(imports): assign modules directly to lib namespace
Mostly a change for improved intellisense with sumneko lua.
Includes some type fixes and deprecation notices.
2022-09-14 01:20:50 +10:00
Tony Stark
ff7a0b6dea fix(client/interface): fix openMenu getting defined nil (#86)
openMenu gets defined nil even when the options has passed close = false which result in error
2022-09-08 13:17:05 +02:00
Luke
336a16baed feat(web): add ability to not be able to close menu 2022-09-08 10:26:35 +02:00
Luke
adf0994b3f feat(web): ability to not be able to close the context menu 2022-09-08 10:05:44 +02:00
Luke
d494b70506 feat(interface/menu): improve error handling for invalid option override 2022-08-30 21:26:23 +02:00
Linden
1ea4b16c8b fix(client/interface): set openMenu to nil before triggering callbacks
Callbacks may open another menu, which then gets set to nil after
the callback has returned.
2022-08-23 19:12:50 +10:00
Linden
4578d54c5e fix(client/interface): progressbar props not deleted
Somehow, calling DetachEntity before DeleteEntity results in the
entity not being deleted (when oal is enabled).
Fortunately we don't need to detach it before deleting.
2022-08-23 04:30:58 +10:00
Luke
6cf29ac0eb fix(client/interface): cache alert promise
Same as input
2022-08-17 23:47:31 +02:00
Luke
82d052a1bb fix(client/interface): cache input promise
Caching the promise into a variable allows us to set input to nil and resolve the promise after, which fixes an issue with opening 2 input dialogs back to back
2022-08-17 23:42:36 +02:00
Luke
0e7bd1a177 feat(web): onSelect function for options 2022-08-17 21:41:05 +02:00
Jag
c6250b6d5a feat(client/progress): add interrupt options (#70)
Add the ability to specify if an action can be interrupted. Options that I've thought of off the bat are ped going ragdoll or ped being handcuffed.

Co-authored-by: Linden <65407488+thelindat@users.noreply.github.com>
2022-08-16 17:22:05 +10:00
Luke
953673690c fix(web): clear nui focus from input before resolving the promise 2022-08-15 14:50:00 +02:00
Linden
c3726ed924 tweak(interface/menu): SetNuiFocusKeepInput
Default to allow input; disable with "disableInput = true" during registration.
2022-08-09 07:42:20 +10:00
Linden
2e77817c41 refactor(interface/menu): set openMenu to reference menu data, not id
No need to index registeredMenus[openMenu] repeatedly.
2022-08-08 17:54:50 +10:00
Linden
101d94392b refactor(client/interface): micro-optimise menu callbacks
Remove short-lived objects and set local refs to the openMenu to reduce table-lookups.
2022-08-05 00:58:19 +10:00
Luke
ff81bbb434 chore(client/interface): remove debug command 2022-08-04 15:04:49 +02:00
Luke
32a698c043 feat(menu): lib.hideMenu 2022-08-04 15:04:49 +02:00
Luke
cf2c45687a refactor(menu): split side and vertical scroll change handlers
Resolves an issue where changing to the next button while scrolling a horizontal list would not trigger the onChange function for the previous button
2022-08-04 15:04:49 +02:00
Linden
c662368cd4 fix(client/interface): changeSelected args 2022-08-04 15:04:49 +02:00
Luke
37c10f570b feat(client/interface): menu close arg on button 2022-08-04 15:04:49 +02:00
Luke
853cec6049 feat(client/interface): allow replacing specific index in menu options 2022-08-04 15:04:49 +02:00
Luke
a4b25bddf0 feat(web/menu): allow passing default index for horizontal lists 2022-08-04 15:04:49 +02:00
Luke
873b531da7 fix(client/interface): fix indexing registered menu options with table 2022-08-04 15:04:49 +02:00
Luke
ee6baafc0c feat(client/interface): allow separately setting list menu options 2022-08-04 15:04:49 +02:00
Luke
ac7a87cc5b feat(client/interface): list menu error catching 2022-08-04 15:04:49 +02:00
Luke
dde7daddb7 fix(client/interface): allow reregistering list menus 2022-08-04 15:04:49 +02:00
Luke
33bd3ebc77 feat(web/menu): send args in callback function 2022-08-04 15:04:49 +02:00
Luke
7b147b04fc feat(web/menu): tooltip description support 2022-08-04 15:04:49 +02:00
Luke
4236dd2bfd feat(web/menu): exit listener and onClose function 2022-08-04 15:04:49 +02:00
Luke
6ef17e83f5 feat(web/menu): visibility handling 2022-08-04 15:04:49 +02:00
Luke
bde843f803 feat(web/menu): enter callback function 2022-08-04 15:04:49 +02:00
Luke
d48ca25c7b feat(web/menu): initial list menu Lua api 2022-08-04 15:04:49 +02:00
Luke
3034a32955 refactor(dialog/alert): allow defining cancel button
Using the same promise type of API that the input dialog is using, if the user closes the dialog via esc or the cancel button the promise will resolve `cancel` otherwise the promise will resolve `confirm`
2022-06-17 20:30:33 +02:00
PoorLatency
e93981fc95 feat(interface/alert): register net event (#41)
Allow the alert dialog to be called from server.
2022-06-17 10:23:56 +02:00
Luke
186014f95e feat(web/dialog): alert dialog 2022-06-11 11:33:15 +02:00
Luke
780371f644 feat(interface/context): onExit function
Allows defining a function in the menu that must be called onExit which is going to execute every time the user exits the context menu with ESC
2022-06-04 14:42:35 +02:00
DokaDoka
d2178ca258 fix(interface/context): correct id if a float is received
- the array part of a mixed options table registers a '1.0' and so on, this is not how the option is recorded on the lua side
2022-06-04 22:12:04 +10:00
Sam Shanks
4cd53eeb1b feat(web/circleprogress): add optional label (#33)
* feat(circle progress label)

* refactor(circleprogress): wrap in flex
2022-05-31 19:30:54 +02:00
Luke
6108016796 feat(interface/context): ability to forcefully hide the context menu 2022-05-30 16:39:02 +02:00