ANTOND
cb5dac6151
refactor(web/dialog): split interfaces ( #68 )
...
* tweak(interface/menu): SetNuiFocusKeepInput
Default to allow input; disable with "disableInput = false" during registration.
* refactor(web/dialog): Split interfaces
for better typing of row options for different input types
* fix(web/dialog): Use proper type for onChange event
Co-authored-by: Linden <65407488+thelindat@users.noreply.github.com >
2022-08-09 23:50:14 +02:00
ANTOND
de8fb447a9
fix(web/dialog): setting non-selectable placeholder ( #67 )
...
* tweak(interface/menu): SetNuiFocusKeepInput
Default to allow input; disable with "disableInput = false" during registration.
* fix(web/dialog): Setting non-selectable placeholder
React doesn't like the 'selected' attribute (causing a warning in web console - not in-game).
'defaultValue' should be used instead so there is no need to create placeholder option if 'defaultValue' is already defined by row options.
* fix(web/dialog): Use proper type for onChange event
Co-authored-by: Linden <65407488+thelindat@users.noreply.github.com >
2022-08-09 23:37:31 +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
245af3df41
refactor(callback): types
2022-08-08 17:16:57 +10:00
Luke
c3687d6874
chore(manifest): bump version
2022-08-06 21:12:42 +02:00
ANTOND
1990e3792f
feat(web/input): support default values ( #66 )
...
* feat(web/dialog): Support placeholders
* feat(web/dialog): Support default values
* feat(web/dialog): Support default state of checkbox
* feat(web/dialog): Support placeholder for number input
* feat(web/dialog): Support default value for select
2022-08-05 15:10:37 +02:00
Luke
14a04c4b68
fix(web/menu): fix border radius not applying when there is 6 options
2022-08-05 14:00:44 +02: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
Linden
f122c6e3ea
feat(imports): getNearbyPlayers
2022-08-05 00:45:10 +10:00
Luke
ff81bbb434
chore(client/interface): remove debug command
2022-08-04 15:04:49 +02:00
Luke
4490b4476c
fix(web/menu): offset default index
...
Linden's amazin' index fix
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
34fe33000f
feat(web/menu): display arrow when menu is scrollable
2022-08-04 15:04:49 +02:00
Luke
dcce65d472
feat(web/menu): reset indexes on next last item
2022-08-04 15:04:49 +02:00
Luke
95201aba1d
fix(web/menu): use same font for tooltip
2022-08-04 15:04:49 +02:00
Luke
2def3ba7b3
fix(web/menu): don't render no label buttons
2022-08-04 15:04:49 +02:00
Luke
fd8b3c9862
fix(web/menu): fix scrolling clipping menu items
2022-08-04 15:04:49 +02:00
Luke
ed3e7ac733
feat(web/menu): include backspace in close keys
2022-08-04 15:04:49 +02:00
Luke
ce0bea3259
fix(web/menu): set selected index to 0 on menu open
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
e97bd98726
fix(web/menu): fix selected value focus getting stuck on another menu
2022-08-04 15:04:49 +02:00
Luke
31d582df9c
fix(web/menu): fix not being able to press enter on first button index
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
aa9b1334f2
fix(web/menu): debounce menu item selected callback
2022-08-04 15:04:49 +02:00
Luke
a2b5ccb354
feat(web/menu): confirm on enter callback
2022-08-04 15:04:49 +02:00
Luke
6d52ecf985
feat(web/menu): fetchnui on item change
2022-08-04 15:04:49 +02:00
Luke
4744df337f
feat(web/menu): add current and max option count into the list button
2022-08-04 15:04:49 +02:00
Luke
fd45418a5d
style(web/menu): change menu header font and weight
2022-08-04 15:04:49 +02:00
Luke
e81a05aa2d
fix(web/menu): set pointer events to none on body div
...
Fixes and issue where you could click the menu to take away focus and make it non interactable
2022-08-04 15:04:49 +02:00
Luke
700fdbc3fe
refactor(web/menu): separate header and body divs
...
This allows for the header to be visible even when scrolling through the menu items
2022-08-04 15:04:49 +02:00
Luke
a43b5eee04
feat(web/menu): list menu icon support
2022-08-04 15:04:49 +02:00
Luke
43ffa86387
refactor(web/menu): improve list menu text alignment
2022-08-04 15:04:49 +02:00
Luke
3f33b690e1
feat(web/menu): array side scrolling
2022-08-04 15:04:49 +02:00
Luke
3b9c8c5534
fix(web/menu): focus on first menu item on load
2022-08-04 15:04:49 +02:00
Luke
196d400c56
feat(web/menu): menu list focus trapping
2022-08-04 15:04:49 +02:00
Luke
98b9e224ef
refactor(web/menu): list menu component split
2022-08-04 15:04:49 +02:00