Just passing it along since Diablo 4 is coming out soon. This isn't anyway the best menu base. It has issues and needs cleaning, but it does work and can be ported to any game title.
Hopefully I labeled everything correctly for the admins.
Features:
-
shaders
- toggle
- sub menu
- color
- resize hud
-
text
- options <- duh
- slider arrays <- strtok or array()
The feature elements classified as option_left and option_right.
- issue
- if self.menu.toggle ~ toggle shader
- if self.menu.shader ~ color shader
- if self.menu.function == new_menu ~ submenu shader
- if self.menu.slider ~ slider option
does have support for infinity toggles but the why the scrolling is done it won't work.
could be some unknow issues also, report any and I'll fix it in the year 2038
this does work very well and I haven't had any issues with it but it isn't the best way to do it.
this can be improved by migrating from a store text system to a set menu text system.
if you ever worked with the aio structure the code will be very similar except one was bullied by me. I haven't seen a menu base that uses toggle shaders that is publicly available so do enjoy. If you make any improvements, please share and don't look at the update_scroller().
If you're just using it for mods, the explanation on how to add menus and option types is good enough for you.
If you're editing, self.menu.cursor[ self.menu.current_menu ] or cursor = get_cursor() will be your friend same as menu = get_menu();
PPS the menu isn't good the curse is now yours
have a cute snake picture from my collection