I've been trying to figure out how to make custom menus for my project, and while I think I'm getting the hang of it, I can't figure out how to make generic menus accessible in-game.
I know that custom list and option menus need to be backed by a MENUDEF entry, but as far as I know, that's not the case with generic menus. But if they're not defined in MENUDEF, how do you link them to other menus that are?
I've been trying to pick apart Doom Delta's code to figure out how their menus work, but I can't seem to find anything about how the generic menus are actually called onscreen.
How to use generic menus
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 14
- Joined: Sat Dec 23, 2023 4:04 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 7
-
- Posts: 854
- Joined: Mon May 10, 2021 8:08 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): EndeavorOS (basically Arch)
- Graphics Processor: Intel with Vulkan/Metal Support
Re: How to use generic menus
The ZDoom Wiki wrote: Submenu "<label>", "<menu block reference>" [, <param>] [, <centered>]
Opens the listed submenu.
Code: Select all
OptionMenu "TestMenu"
{
Control "Example Label", "whereisini" // this is an example
Submenu "Mouse Options (Submenu method)", "MouseOptions" // go to the "Mouse Options" menu.
ConsoleCommand "Mouse Options (dedicated command method), "menu_mouse" // Uses the "menu_mouse" command to open the Mouse Options menu.
ConsoleCommand "Mouse Options (openmenu method), "openmenu mouseoptions" // Uses the "openmenu mouseoptions" command to open the Mouse Options menu.
}
*Not that I'm a ZScript god anyway.
-
- Posts: 14
- Joined: Sat Dec 23, 2023 4:04 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 7
Re: How to use generic menus
Well I'll be damned, it works. Thanks. That's really the one thing I was hung up on. No matter where I looked, I couldn't find any documentation that explained this about generic menus.
The weird thing is, Doom Delta doesn't seem to use any of the methods you showed me. Their MENUDEF doesn't list any submenus or commands, so I still have no idea how their menus work.
The weird thing is, Doom Delta doesn't seem to use any of the methods you showed me. Their MENUDEF doesn't list any submenus or commands, so I still have no idea how their menus work.
-
- Posts: 854
- Joined: Mon May 10, 2021 8:08 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): EndeavorOS (basically Arch)
- Graphics Processor: Intel with Vulkan/Metal Support
Re: How to use generic menus
Like I said, it's in the ZScript. Maybe ask the author?
Those methods I showed you are MENUDEF exclusive, so obviously Doom Delta is not using them.
See https://zdoom.org/wiki/Classes:Menu/.
Good luck, and have fun!
Those methods I showed you are MENUDEF exclusive, so obviously Doom Delta is not using them.
See https://zdoom.org/wiki/Classes:Menu/.
Good luck, and have fun!