Lugent's Menu System

[Open Assets] Lugent's Menu System 1

What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
I made sure my file(s) follow the Submissions Guidelines
  1. Yes
I named my file(s) correctly (see Filename Conventions)
  1. Yes
Behold!
A awesome client-side menu system by Lugent (that's me!).

Features:
  • 100% customizable (header, position, color, behaviour and more).
  • Multiple pages on the same menu.
  • Custom functions (handler, ticker and drawer).
  • No netcode dependent.
Here's a list of all the functions and variables exposed to use on your own menu:
Functions and Variables:
-- Exposed Functions:
boolean LM_PressedKey(keyevent_t key, int code) -- checks if a key on keyboard is pressed
boolean LM_ActiveMenu() -- checks if there's an active menu
void LM_GoToPage(int page) -- go to a specific page; works only if there's a menu active
void LM_PrevPage() -- go to the previous menu (if possible); otherwise closes the menu
void LM_OpenMenu(table menu, int page) -- opens a menu with a specified page
void LM_CloseMenu() -- closes the current active menu

-- not mandatory, use this when doing custom rendering for your menus
-- you can actually make your whole item rendering without using these if you wish
void LM_DrawScrollMenu(drawer v, table menu) -- renders the standard menu
void LM_DrawStandardMenu(drawer v, table menu) -- renders the scroll menu

-- Exposed Variables:
lmenu.current -- current menu table; -1 means no menu
lmenu.cursor -- the actual item select
lmenu.page -- the actual page on the menu

-- menu styles
MMT_NORMAL -- SRB2's Vanilla standard menu
MMT_SCROLL -- SRB2's Vanilla scroll menu
MMT_CUSTOM -- User defined rendering menu; makes uses of drawer function

-- item types
MIT_STRING -- normal item
MIT_HEADER -- header item

-- item flags
MIF_DISABLED -- this item is disabled
MIF_FUNCTION -- this item runs a function
MIF_CVAR_STRING -- this item manipulated a cvar; displays it as string
MIF_CVAR_NUMBER -- this item manipulated a cvar; displays it as number

-- keycodes
KEY_UP -- up arrow key
KEY_DOWN -- down arrow key
KEY_LEFT -- left arrow key
KEY_RIGHT -- right arrow key
KEY_ESC -- espace key
KEY_ENTER -- enter key
KEY_CONSOLE -- tilde key

If you need a example about how to make your menu, then you can look at example.lua which is totally filled with comments everywhere to guide through.

srb2win-lugent_5KFofT90aZ.png
Author
Lugent
Downloads
929
Views
5,809
First release
Last update

More resources from Lugent

Share this resource

Latest reviews

It's nice to see a clear and easy-to-use custom menu system available, as the Simple Custom Menu can often actually be complicated, and it apparently causes issues for netplay. However, while this menu system is very useful for server owners, what really kills it's usefulness for me personally is how it is not a Resource, and thus, cannot be applied to users' mods without this mod being loaded first, which can never be guaranteed.

For example, the Rei'sen mod I've been working on uses an edit of the Simple Menu for HUD and Color options. The latter being important, because Rei'sen uses a very different coloring system that is completely incompatible with the existing colors and characters. Her colors are hidden from the game's normal color select, so other characters don't look like a mess trying to use them. The menu allows the user to use these colors in single player as well. But the Simple Menu (alledgedly) messes up netplay, so I need to find an alternative.

I was hoping this mod would be that alternative, but unfortunately, the fact that this is a non-modifyable mod that is not meant to be a resource, means that I can't ensure that such a critical feature is provided to the player. I would have to rely on console commands as a backup, and that will not at all be intuitive for most users, and means I would have no visible presentation of the visual options. If I ever wanted to add more features to the menu, it will get even messier, as while console commands are a good side-option, they would have to step-up to be primary if the mod is ever loaded without this Lua script.

This also means that any future changes you make will mean I would have to potentially follow suit. If I were to ever leave, and your mod updates, and mine becomes incompatible, then the user would have to find the previous version of the file to continue, while having a menu in the base mod package ensures that I have what was originally intended to be in the mod, in one file. this also means that if I wanted to add any element of my own, I would have to rely on you to add a feature to let it happen. When selecting Rei'sen's colors, you have a small preview showing you everything from the full color set, to an example sprite, to what her VFX will be colored like. I don't actually know if this menu does anything beyond text. While being able to add images of your own would be great, it only solves *this* problem. If a user ever wanted to make their menu have any of their own creative presentation values, they are out of luck here, as they can't make their own modifications to make it more their own.

I know it sounds like I'm being selfish, only thinking of my own mod and how I could use it, but I doubt I would be the only one feeling the same way if they needed a menu for their own mod. If Samus, or Mario, or SA-Sonic, or Pointy Sonic & Fluffy Tails relied on an external menu, they can't ensure their own mods will always have that menu available either. If a level pack wanted to use this menu for any features, like perhaps hints or difficulty selection or accessibility features, they could no longer ensure the audience that would need these features will actually have them. It's not like making a map for a custom game mod, where you expect it to not function outside of said game mod, it cuts on the potential usefulness of this menu system by a wide margin by not allowing the users to mess with it and keep their mess to their works.

Perhaps I'm judging too harshly, as I certainly couldn't call this mod useless. Again, I'm sure servers can get a lot of use out of this, as a server could have their own menu for whatever they want, and everyone connecting will get that menu too. This is a good framework for a menu, and it is very easy to understand and make your own. But the potential I see is cut down immensely by the means you have to use it. A nice plant that can only live in its own biome. Very disappointing.
Lugent
Lugent
Understandable, apoligies for my mistake by doing this. This should be Reusable and modified by anyone now.
Upvote 0
Back
Top