Skip to content

Feat/list menu#60

Merged
LukeWasTakenn merged 44 commits intomasterfrom
feat/list-menu
Aug 4, 2022
Merged

Feat/list menu#60
LukeWasTakenn merged 44 commits intomasterfrom
feat/list-menu

Conversation

@LukeWasTakenn
Copy link
Copy Markdown
Member

WIP simplistic list menu

Current design (still subject to change):

image

This allows for the header to be visible even when scrolling through the menu items
Fixes and issue where you could click the menu to take away focus and make it non interactable
@thelindat
Copy link
Copy Markdown
Member

thelindat commented Aug 1, 2022

Bugs

  • Debounce prevents onChange callbacks triggering on rapid changes ecd9ff8
    • i.e. changing scrolling index from 1 -> 7, then moving to a different button only triggers a change for the new button
  • Sending an empty table in options renders an empty box 06adc97
  • Sending a string in options renders an empty box, which cannot be selected 06adc97
  • Causing an error with invalid input breaks the component (need to restart ox_lib) c988695
  • Window does not scroll at set increments (i.e. move down one button) 5001193

Enhancements

  • Reset selected or srcollIndex at the end 18c7224
  • Return arguments 15e941c
    • QoL, recommend to register menu and store in the resource; then you can reference any values with index
  • Scrollbar or icon to show more options are available 12aa144
  • Set default scroll index dde94bb
    • sample use case: building a vehicle-modding menu, need current mods to be set as default
    • maybe a way to pass this through without registering the menu again?
  • Edit menus dba5407
    • like mentioned above, a way to pass changes without registering the complete menu?

@ultrahacx
Copy link
Copy Markdown

To
Mr. Luke
Please add a close button.
Regards,
Linden

Resolves an issue where changing to the next button while scrolling a horizontal list would not trigger the onChange function for the previous button
Linden's amazin' index fix
@LukeWasTakenn LukeWasTakenn marked this pull request as ready for review August 4, 2022 13:03
@LukeWasTakenn LukeWasTakenn merged commit ff81bbb into master Aug 4, 2022
@LukeWasTakenn LukeWasTakenn deleted the feat/list-menu branch August 10, 2022 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants