TomGrobbe / MenuAPI

FiveM C# Menu API. Designed specifically as a replacement of NativeUI for vMenu. Full safezone scaling supported, both left and right aligned menus supported.
https://docs.vespura.com/mapi
61 stars 46 forks source link

[Request/suggestion] Exposing delay variable for user input #16

Closed Shrimpey closed 4 years ago

Shrimpey commented 5 years ago

[Request/suggestion] Hi, it would be nice to have delay variable (used for faster left/right inputs in menu when holding down button) exposed for user to tune. I'm talking about line 484 and 512 of MenuController.cs: if (times > 2) { delay = 150; } I was looking for a way to speed up left/right inputs for sliders/lists (with bigger lists it takes long time to scroll through them) and thought it would be nice to have some sort of public var to tune the delay.

Local9 commented 5 years ago

I get what you're requesting and its not much work to add it in BUT wouldn't it be more user friendly to have larger lists in a vertical list rather than in a slider?

Shrimpey commented 5 years ago

I guess you're right, the feature I needed it for was really specific, I implemented a slider for RGB colors (so 256 values) and wanted to keep it in a slider/list to make it easier to tune (compared to sth like direct keyboard input). I ended up doing it with steps of 5 instead of 1 and adding keyboard input for fine tuning. The only other thing that I can think of rn that would benefit from this would be vMenu's TimeCycles list, it's got around 700 entries and it's painful to manually scroll through.

Local9 commented 5 years ago

Ah RGB... I personally would of shot towards an NUI panel for that, but 700 time cycle entries.... I need to see this. (I am always interested in what people do)

TomGrobbe commented 5 years ago

Yeah I'll have to speed things up either way, because it's really slow currently I do agree. I'll add multiple phases of scrolling, the longer you hold it down, the faster it'll scroll (with a limit of 2 or 3 speed increments total).

No eta for this though.

Shrimpey commented 5 years ago

Yeah I'll have to speed things up either way, because it's really slow currently I do agree. I'll add multiple phases of scrolling, the longer you hold it down, the faster it'll scroll (with a limit of 2 or 3 speed increments total).

No eta for this though.

Yup, that would be perfect.

TomGrobbe commented 4 years ago

Added in https://github.com/TomGrobbe/MenuAPI/commit/45f30260980896803bf2be8fd3f6ca4870bdff15, it'll be in the main release once RedM is ready for a full release.

TomGrobbe commented 4 years ago

Merged.