Commit Graph

213 Commits

Author SHA1 Message Date
DokaDoka
38dbc2ac34 refactor(zones): create data.triangles even if the polygon is convex 2022-05-11 13:34:06 +10:00
DokaDoka
9b5ac35ab3 refactior(zones): make makeTriangles available outside of getTriangles 2022-05-11 13:29:18 +10:00
Luke
9c7d9c44b7 fix(web/progressbar): fix progressbar getting stuck on screen
Chakra's ScaleFade transition was causing the progress bar not to rerender properly
2022-05-10 16:39:05 +02:00
Linden
bc6a6c7a0a fix: include locales in release workflow 2022-05-10 17:48:44 +10:00
Linden
7a4745c0da chore(zones): adjust debug rgba 2022-05-10 15:29:07 +10:00
Luke
a784726267 feat(web/context): allow custom metadata order 2022-05-08 13:18:09 +02:00
Luke
62d4812f24 feat(web/context): allow manually sorting the options
In order to have the options in the same order as defined, you need to not use keys, instead a normal index table and define the title for the option
2022-05-08 13:00:23 +02:00
DokaDoka
1080efb0cf fix(vehicleProperties): wait until entity exists before setting vehicle properties 2022-05-08 17:36:17 +10:00
Linden
55bfa7ca3d refactor(zones): global Zones 2022-05-07 11:47:39 +10:00
Linden
ce3f916c42 refactor(zones): centroid -> coords
While centroid is a more accurate term, coords is a little simpler when
writing it a million times.
Prefer to use a single term (sphere was using coords) to simplify API.
2022-05-07 11:19:27 +10:00
Linden
91f52d12c1 refactor(client/locale): send GlobalState.locales to ui 2022-05-06 16:38:36 +10:00
Linden
d4b5e0402c refactor(server/locale): get array of valid locales 2022-05-06 16:37:36 +10:00
Linden
f6b2df0e75 refactor(locale): default locale 2022-05-06 16:00:40 +10:00
Linden
5f80c55c31 tweak(web/textui): change box style 2022-05-06 15:33:11 +10:00
Linden
d3718622cf feat(zones): sphere zone
It's just a distance check and works exactly like lib.points, with some
minor API changes for consistency.
2022-05-06 14:28:45 +10:00
Linden
4555fa0a22 refactor(zones): call zone:contains instead of zone.polygon:contains
Added this function earlier but forgot to include thickness, so
it didn't work.
2022-05-06 14:26:56 +10:00
Linden
96eabf5592 refactor(imports/getCore): set constants and use new import files 2022-05-04 06:33:32 +10:00
Linden
c5bdaaafe8 refactor(imports/getCore): create import files for esx and qb 2022-05-04 06:33:32 +10:00
Luke
712a6763e8 fix(client): Missing event for defaultNotify 2022-05-03 21:57:41 +02:00
Luke
48dae99cc0 refactor(web/dialog): Separate fields into individual components 2022-05-03 15:08:28 +02:00
Luke
64a1ad9343 feat(web/dialog): Add option for left icon on input field 2022-05-03 14:36:33 +02:00
Luke
cdad4ea45b Merge pull request #18 from antond15/input-tweaks
feat(web/dialog): Add password option to input
2022-05-03 01:07:24 +02:00
ANTOND
6b7d24c71b refactor(web/dialog): Use conventional naming 2022-05-03 01:03:02 +02:00
ANTOND
5c6b08445a fix(web/dialog): Handle multiple password states 2022-05-03 00:19:02 +02:00
ANTOND
1cb407903f feat(web/dialog): Add password option to input 2022-05-02 23:14:27 +02:00
Luke
56f178af79 feat(web/dialog): Add Select input type 2022-05-02 20:18:16 +02:00
Luke
adafbce79f fix(web/dialog): Use locales for buttons 2022-05-02 14:45:06 +02:00
Luke
0259de8dfe feat(web/dialog): Add checkbox type 2022-05-02 13:51:08 +02:00
Linden
a3f38723e3 refactor(getCore): rename loadFramework, tweaks
ESX imports are limited to an event and getSharedObject export.
In the future I want to introduce some generic functions to simplify
cross-framework compatibility
when working with player, accounts, inventories, and groups (jobs/gangs).
2022-05-01 22:51:59 +10:00
Linden
8bcae1937b tweak(init): store service and name in lib
lib.name for 'ox_lib', and service or 'client' or 'server'.
2022-05-01 22:47:34 +10:00
Luke
40a1c15339 chore(web): Fix eslint warnings 2022-05-01 11:09:25 +02:00
Luke
fdb330a38f fix(client): Move loadLocale function out of init
Setting a locale causes the whole application to be rerendered, meaning that the fetch for init would also run every time when locale is set
2022-05-01 11:07:44 +02:00
DokaDoka
18f55ffefe refactor(zones): handle multiple points in the same horizontal line
- new intersection points are generated per vertical coord present in the original polygon rather than per vertex and are grouped together rather than associated directly with the parent
- hopefully better code structure and organisation for the entire triangle generating section
2022-05-01 12:49:56 +10:00
Luke
4db4c79d8a feat(web): Settings modal, locale state provider 2022-04-30 14:49:49 +02:00
Linden
48728f0241 feat(locales): include some locales
Partial, and google translated just for the sake of setting an example.
Also renamed many of the language codes where the extra characters are
redundant (i.e. fr-FR, de-DE).
2022-04-30 05:04:15 +10:00
Linden
031cccd886 fix(locale): server hotload and "external" kvp
External kvp's don't exist for the server, so we have to export the proper language.
2022-04-29 16:53:24 +10:00
Linden
8af19bae42 feat: locale system 2022-04-29 05:56:41 +10:00
Linden
fee2950a35 feat(resource): throw an error if the UI is not built 2022-04-29 03:02:28 +10:00
Linden
f6216af1ae refactor: rename lualib variable and move clipboard export 2022-04-29 03:02:06 +10:00
Linden
c7bab9b47f fix(zones): debug functions should not be global 2022-04-29 02:01:51 +10:00
Linden
634dd747b7 refactor(zones): assign X directly and store triangles as matrices 2022-04-29 02:01:17 +10:00
Linden
754ae1bd8d refactor(zones): use array table structure when creating triangles 2022-04-29 01:50:31 +10:00
Linden
247b9916e1 refactor(zones): rename variables and minor perf
Set box vertices and poly triangles once during creation (with debug).
2022-04-29 01:38:01 +10:00
DokaDoka
65787d3b6d fix(zones): draw complex polygons properly
convex polygons are split into triangles more simply
complex polygons are split into trapezoids and then triangles to be drawn
2022-04-29 00:41:21 +10:00
Linden
cfffcee577 feat(zones): debugBox draw lines on edges
It's an abomination until Doka works his magic.
2022-04-27 17:13:26 +10:00
Linden
5dce90682f refactor(zones): reduce value reassignments 2022-04-27 17:11:36 +10:00
Linden
fc3e5d6339 feat(zones): add contains method to zones
Reduces number of table lookups for micro-optimisation.
zone:contains(coords) is also a bit nicer than zone.polygon:contains(coords).
2022-04-27 17:09:32 +10:00
Linden
a340c83e1a perf(zones): assign inside count and index to local
Reduce number of times the inside table needs to be indexed or have length checked.
Also assign debug zones to table without having to be inside the zone.
2022-04-27 17:07:24 +10:00
Linden
cc770ada64 refactor(zones): change new to poly, default box rotation 2022-04-27 10:33:18 +10:00
DokaDoka
de201dcf03 feat(zones): box
streamlined rectangle polygon creation for the lazy, with rotation
2022-04-26 23:06:23 +10:00