Commit Graph

154 Commits

Author SHA1 Message Date
Luke
306b7b3670 feat(web/context): disabled buttons 2022-11-06 11:01:39 +01:00
Luke
33b70b6f1c refactor(web/context): cache context option into a variable 2022-11-05 11:20:59 +01:00
Luke
765fff3598 fix(web/menu): show values description without requiring button desc 2022-10-30 10:16:28 +01:00
Luke
00465d2e7a perf(web/menu): memoize button and header components
Drops the render times for a 9 button menu down from 12ms to 1.6ms
2022-10-29 16:15:58 +02:00
Luke
6b8cfa990f fix(web/menu): fix vertical icon alignment 2022-10-29 16:00:35 +02:00
Luke
9cc7b9270e refactor(web/menu)!: pass scrollIndex or checked in the same value
If the button is a scroll button then `isScroll` is passed into args, if a button is a checkbox then `isCheck` is passed into args.

Requires `args` to always be of type `table`
2022-10-29 15:55:08 +02:00
Luke
c227282ce0 refactor(web/menu): update checkbox styling 2022-10-29 15:55:08 +02:00
BerkieBb
5ba1a3b8f9 feat(interface/menu): checkbox
feat(package/interface/menu): checkbox
feat(web/menu/list): checkbox
feat(web/menu/list): checkbox option for ListItem
feat(web/menu/list): custom checkbox
2022-10-29 15:55:08 +02:00
Jag
de23227ea7 fix(web/menu): move firstRengerRef check earlier in the function (#145)
* This fixes a case where, if the first option selected in a menu doesn't have side scroll values, the first time that you *did* side scroll on an item in that menu it would no trigger onSideScroll
2022-10-29 10:11:40 +02:00
Luke
a8fc5caaae fix(web): set color-scheme to normal
fixes an issue with a black screen in game
2022-10-27 23:24:38 +02:00
Luke
a1d2607286 chore(web): update react and chakra versions
hopefully nothing broke that I didn't notice prayge
2022-10-27 16:44:47 +02:00
Luke
8ad04de0bc refactor(web/input): move field components into fields folder 2022-10-27 14:22:15 +02:00
Luke
d4dc68f21e fix(web/input): remove unused isReadOnly property 2022-10-27 13:46:45 +02:00
Luke
a6a0e4905f feat(web/input): description tooltip on fields 2022-10-27 13:45:27 +02:00
Luke
1127108fcd feat(web/menu): add description support on list items 2022-10-27 10:09:48 +02:00
Luke
b354e0836c chore(web): move skill check into dev draw tools 2022-10-27 09:27:54 +02:00
davidxd33
4f69c7c5c1 feat(interface/dialog): disabled row property (#142)
* feat(interface/dialog): readonly, disabled flags

* Update TS prop types

* refactor(web/input): remove read only property

Co-authored-by: davidxd33 <dponce@gmail.com>
2022-10-27 09:17:53 +02:00
Luke
e40331009b fix(web/skillcheck): use proper skill check calculations
Changed the areaSize to use degrees rather than the length of the arch which was causing issues

Co-authored-by: DokaDoka <31368547+DokaDoka@users.noreply.github.com>
2022-10-20 13:31:30 +02:00
Luke
3fcb9941f7 refactor(web/skillcheck): remove unused code and comments 2022-10-18 20:03:00 +02:00
Luke
6264bbcbc9 refactor(skillcheck): move array handling into ui 2022-10-18 20:03:00 +02:00
Luke
61092d7c3c refactor(web/skillcheck): move visibility into it's own state 2022-10-18 20:03:00 +02:00
Luke
d4b331c104 style(web/skillcheck): update appearance 2022-10-18 20:03:00 +02:00
Luke
ed8e804c09 feat(web/skillcheck): add support for custom game difficulty 2022-10-18 20:03:00 +02:00
Luke
a358f1ccad tweak(web/skillcheck): adjust game difficulty
Don't spawn the skillcheck zone in the 1/3rd of the circle and adjust hard difficulty
2022-10-18 20:03:00 +02:00
Luke
e4b3e0186d feat(client/skillcheck): winning/losing promise resolving 2022-10-18 20:03:00 +02:00
Luke
66c16b5843 feat(web): skillcheck minigame 2022-10-18 20:03:00 +02:00
BerkieBb
5c34948528 fix(web/menu): don't call onSideScroll when opening the menu (#123)
* fix(web/features/menu/list): don't call onSideScroll when opening the menu

* refactor(web/menu): use conventional ref naming

Conventional ref variable names contain the word `ref` or `refs` if it's an array

Co-authored-by: Luke <sabolukas03@gmail.com>
2022-10-11 14:26:59 +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
Luke
39f7b6d78a fix(web/dialog): set slider value to min if default is not defined 2022-10-05 16:16:39 +02:00
BerkieBb
16aeed6027 fix(web/features/menu/list): force close menu when using the nui event 2022-09-29 16:08:26 +02:00
Luke
6a8eb35a0a feat(client/interface): close functions for input and alert dialogs 2022-09-29 11:39:30 +02:00
BerkieBb
6579d52c7c feat(web/menu/list): keyPressed on closeMenu 2022-09-25 14:24:45 +02: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
Luke
5d4eff8cd3 fix(web/menu): fix misalignment on the list buttons in the menu 2022-09-09 13:04:31 +02:00
Luke
b638e435ea feat(web/input): allow defining icon for number row field 2022-09-08 12:00:41 +02:00
Luke
473a0f480d feat(web/context): allow hiding arrow by setting it to false 2022-09-08 11:11:27 +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
4a5251b60b chore(web): add prettier and format 2022-08-27 15:58:36 +02:00
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
ANTOND
f3ca6ee504 feat(web/dialog): add slider input type (#69) 2022-08-10 21:05:27 +02: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
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