View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000289||GZDoom (All)||[All Projects] Feature||public||2017-02-17 11:30||2017-02-25 09:22|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Status||closed||Resolution||no change required|
|Summary||0000289: Scripted way to open menus|
|Description||Currently, the only way to open a menu is by user intervention (like binding a key to "openmenu MyCustomMenu", or just using the openmenu command in the console).|
I'd like to request a scripted way that a modder can control when exactly a specific menu opens.
Very legitimate use cases:
- A custom dialogue/speech menu, user walks up to an NPC, presses +use and the custom menu will appear
- A "keypad password" menu for opening locked doors, the custom menu will only appear if the player actually uses the door
- A "level up" screen that should automatically appear when the player levels up, to distribute his new skill points
The above just wouldn't make sense if the user can simply call them out of context.
|Tags||No tags attached.|
You can do this with Menu.SetMenu() function:
|Alright, but how do I get information about what actually activated the menu? In the use case of the "keypad menu", the menu needs to know WHAT exactly to unlock...|
I don't know how menu system will look like in the next release.
However I crafted some lame sample in a few minutes.
I'm not aware of better way to do so at the moment.
menupistol.pk3 (432 bytes)
|The main problem here is that all the requested use cases require custom network protocol handling and that's unfortunately not that easy to do. Having a menu open is a one-liner function but it's an open invitation to use it wrong.|
Graf, you can close this. Case 1 and 3 is already possible with current engine mechanics, and about that keypad thing, I may decide to ditch the idea for my game (too many UIs may be too cumbersome for the player).
|2017-02-17 11:30||Nash||New Issue|
|2017-02-24 02:56||_mental_||Note Added: 0000734|
|2017-02-24 03:27||Nash||Note Added: 0000735|
|2017-02-24 04:36||_mental_||File Added: menupistol.pk3|
|2017-02-24 04:36||_mental_||Note Added: 0000736|
|2017-02-24 04:36||_mental_||Note Edited: 0000736||View Revisions|
|2017-02-24 11:31||Graf Zahl||Note Added: 0000749|
|2017-02-25 09:11||Nash||Note Added: 0000765|
|2017-02-25 09:11||Nash||Note Edited: 0000765||View Revisions|
|2017-02-25 09:22||_mental_||Status||new => closed|
|2017-02-25 09:22||_mental_||Resolution||open => no change required|