I'd like three new features in the native menu implementation:
- cursor control: an option to emit an event (e.g. from the player.draw handler) to control which option the cursor is pointing at
- cursor detection: an event emitted by the menu when moving the cursor between options, indicating which option is currently selected by the cursor
- dismiss detection: an event emitted by the menu when either the root or a submenu is dismissed without selecting an option
1. Describe your reason for requesting this feature. What problems are you running into?
- cursor control: this would enable code to let users control a menu using the crank. it would also allow developers to record the "most recently used" menu item and to pre-select that item. these are convenience features to make a game with complex menus more enjoyable
- cursor detection: this would enable custom animations or other draw events to run alongside the menu. e.g. to display a large multitile sprite representing the currently selected option
- dismiss detection: this would allow for custom draw scripts running alongside the menu to be closed appropriately when the menu is dismissed (selecting an option, rather than dismissing, could set a flag to indicate this - but we can't currently detect when a menu is dismissed instead)
2. How would this request improve your experience with using Pulp?
- I currently have to create my own menu-like widgets using windows, labels, and control logic in order to approach functionality as described above. This is made even more difficult when the player uses the d-pad and the character moves around the screen behind my custom menu. In this case I need to undo those movements - a custom menu cannot trap and redirect user input to prevent this. Undesired movements may spring traps/etc in the game, which therefore require additional control logic to check "should this movement be ignored"?
- Native implementation would allow for more time spent developing the game itself, and less time spent trying to make a complex menu structure usable by the player.
3. Include any other details you have relating to this request.
I'll admit that advanced features might be best suited to the SDK. Still, I suspect that Pulp devs might make good use of these features if they were available.