Commit Graph

393 Commits

Author SHA1 Message Date
Luke
cc76d23419 chore(web): fix incorrect notification props spelling 2022-08-27 15:55:05 +02:00
Luke
52ce1c53ae feat(web): support min and max value for number input type 2022-08-27 15:54:43 +02:00
Luke
0bc185ef38 feat(web): developer drawer
Move all debug functions into a single developer drawer,

Not the best implementation as there is focus fighting going on between some elements and the drawer but will do for now without state management
2022-08-27 15:40:41 +02:00
Luke
9bd0b52749 refactor(web): prettier format for input dialog 2022-08-26 18:50:08 +02:00
Luke
ae25d109fc fix(web): move input dialog enter handler
it was causing issues where when confirming a selection in the list menu it would instantly close the input dialog
2022-08-26 18:49:49 +02:00
Jag
3db5ccc86d fix(notification): Notification id now works as documentation states (#78)
* `id` was being checked for but never got set on the toast so you'd continue to get duplicate messages even if `id` was set
2022-08-26 18:37:28 +02:00
Manifest Bumper
4bd0e6936d chore: bump manifest version to v2.10.3 2022-08-25 14:36:40 +00:00
Linden
2a1815c460 tweak(callback): error handling
Errors during callbacks will never respond, so we'll use a protected call
and format the error message with a normal print to keep the thread
alive.
2022-08-25 18:49:07 +10:00
Manifest Bumper
2391ffa8a7 chore: bump manifest version to v2.10.2 2022-08-23 09:31:33 +00:00
Linden
bdb88e74c5 fix(version): properly compare minor/patch semver
Comparing "2.7.4" to "2.10.1" would compare each number, i.e.
2 = 2,
7 < 10,
4 > 1
Instead compare the major (2 v 2), then minor.patch (7.4 v 10.1).
where doka to do my math
2022-08-23 19:29:45 +10: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
Manifest Bumper
f18071f7e1 chore: bump manifest version to v2.10.1 2022-08-22 18:52:48 +00:00
Linden
6fc1efdda1 feat(ci): version bumper 2022-08-23 04:50:52 +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
Linden
f5c5597277 fix(version): compare semver numbers
Values were being compared as whole strings.
2022-08-22 20:53:55 +10:00
Luke
8defbaf78f Revert "chore(manifest): update version"
This reverts commit d63ee24fdb.
2022-08-22 00:39:31 +02:00
Luke
d63ee24fdb chore(manifest): update version 2022-08-22 00:28:24 +02:00
Linden
a0bea87dfa fix(client/vehicleProperties): store neons as an array
People normally complain about the most nonsensical non-issues; yet
this one was completely left alone; or more specifically, one person
attributed the issue to ox_lib but didn't bother to report the issue or
provide a fix, instead just
complaining that "ox_lib is constantly updating".
2022-08-20 12:55:07 +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
Linden
8c8da4b119 refactor(raycast/client)!: use new native (GetWorldCoordFromScreenCoord)
This native got merged days after I pushed the raycast function. This will break
scripts relying on this function (doubt there's many, if any).
2022-08-18 01:58:54 +10:00
Jag
99cab6d072 feat(imports): getClosestVehicle and getNearbyVehicles (#71) 2022-08-16 17:34:49 +10: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
274f2542a8 Update README.md 2022-08-15 20:48:37 +10:00
Linden
46a525e057 fix(zones/client): debug DrawPoly and DrawLine
Debug for boxes broke with the oal fixes, since vectors don't unpack.
Also fixes flicker when entering a debug zone.
2022-08-13 17:08:39 +10:00
ANTOND
f3ca6ee504 feat(web/dialog): add slider input type (#69) 2022-08-10 21:05:27 +02:00
Linden
231ca90b8f fix(zones/client): do not overwrite zone.distance with contains
Manually calling the contains method would overwrite zone distance.
Also move Wait to the end of the thread to prevent race conditions.
2022-08-10 23:45:48 +10:00
ANTOND
0bce238304 feat(locales): Make all language names localised (#65)
* feat(locales): Make all language names localised

* fix(locales): Remove duplicate locale

"cr" is incorrent locale code for Croatian and is in this folder twice. "hr.json" is the correct file.

* fix(locales/et): Language name
2022-08-10 07:54:32 +10:00
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