IsHidden() Virtual Menu Function

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

IsHidden() Virtual Menu Function

Post by Major Cooke »

Here's an image of a predicament I'm facing.

While it's possible to make items unselectable, what I would like is the ability to not draw them at all and simply make them not appear. However this has proven to be quite an arduous task that I keep running into walls with.

This would benefit all current options and what not including list menu items and option menu items. When this is returned true, it is not drawn and not even activated, and all hidden items are simply 'collapsed' - hidden away as if they're not even there and NOT leaving any gaps behind.

As they are virtual, modders will be able to override them. In my case for the image above, as an example:

Code: Select all

override bool IsHidden()
{
	let plr = players[consoleplayer].mo;
	return (!plr || !plr.CountInv("D4Chaingun"));
}
That would allow the option to not be shown.

This is also useful for drawing 'menu tips' that I plan on implementing where they show up at the side with a description of what each thing does.

Return to “Feature Suggestions [GZDoom]”