[TOOL][WIP][C++/SHV] Lightweight Menu Library
Lightweight menu library
Left: Interaction menu, Right: Native Menu
Speed comparison between interaction menu and this native menu.
Native Menu is going to be a C++ library to get Rockstar-like menus in your ScriptHookV mods.
- Simple fast menu
- Simple nesting model
- Native controls
- Custom rebindable keyboard controls
- Incremental navigation speed
- Item descriptions with word wrap
- Visually similar to GTA V's menus (WIP)
- Custom banners
- Mouse/cursor support
- Safe zone adaption (current base: smallest)
- Aspect ratio adaption (current base: 16:9)
- Library usage
A few months ago, I wanted a menu for some of my mods, since none NativeUI-like menu was available. It looked and worked quite differently when I first got my hands on the original source code - since then I've added, removed, refactored a bunch of things, making it look and feel like it does now.
Usage and release
Right now, I'm not sure what release approach should be taken here. During the development I used it in my own mods by just building the source files along with the mod project, but now I'm getting to a phase where I actually want to distribute it, I'm wondering about the implementation preferences of possible users. There are basically two options:
- Full source code. This means the project can be cloned/copied from Git, where you actually build the source along with your project. This gives control over what menu version you're using and might prevent incompatibilities from happening. It will also allow you to change some implementation details if desired. Every change in the menus you wish to incorporate, will need a recompilation of your project though.
- As a library. This means you'll be linking against NativeMenu.lib, and the user has a NativeMenu.dll - just like ScriptHookV.lib/ScriptHookV.dll. This puts me in control of distributing menus, but for the off chance of me messing with the API, you'll need to update your mod, or me having to distribute it as another library name to prevent incompatibilities.
Are there any preferences under SHV mod developers? Please let me know.
No official releases yet, as it's still rather WIP. I'd like to add AR and safe zone adaption and make a final decision on the menu usage.
The menu's still in development, so I'll still be adding/changing features. Beware of this if you choose to use it now already. The final goal would be to have a featureset similar to NativeUI.
So I have an indication of how/what the preference is. In case it'd be a library like NativeUI, I'll probably need to work longer on it.
But why does everybody like the default menu style so much?
@ikt Amazing work, A substitute for NativeUI was indeed very much needed. Any FPS hit while accessing these mod menu in game screen?
Thanks! Default aesthetics work probably.
None, but beware that it's for SHV, not SHVDN sadly.
@ikt ah yeah, right, as the title reads, my bad, I missed it. Anyways, good work.
I wonder if any one would be making new menu plugin available for C#, AFAIR, LeeC was working on some similar thing for C#, I am unsure though. Thanks anyways.
@ashishcw What's wrong with NativeUI?
Eats ~30 FPS when opened.
@ikt the 1 / 4 should place next to C++ MENU SHOWCASE
and the blue bar between menu items and item description should only show when item is more than 10
@ikt Is good to see modders interested in enhance the menu experiences.
Other guys like LecLee or Rarefacer are developing good menu styles with not performance issues: