ilitirit
Posts: 2
Joined: Thu Oct 20, 2016 3:16 pm

A few questions about menu handling

I'd like to mod the input configuration menu so that after an input is registered, it immediately jumps to the next menu item and selects that one to poll for the next input. The issue is though I'm not quite sure how to:

1. Get to the next menu item
In the handle() method of the input menu, the seqchangeditem->next item doesn't necessarily point to the next menu item in the sort order. How would I get the "next" item by sort order? Would I need to save a reference to the itemlist elsewhere iterate over that?

2. "Click" a menu item programmatically
I can select the item using the set_selection method, but how do I trigger the event that "clicks" it to start the polling?

Also, is there an easy way to remove the [root:] menu item?


EDIT:
I've figured out how to get to the next item (I iterate over a saved reference to the itemlist) and how to "remove" the [root:] menu item (I don't set an owner_name on the item). So the only outstanding thing is "clicking" the selected item.
ilitirit
Posts: 2
Joined: Thu Oct 20, 2016 3:16 pm

Re: A few questions about menu handling

I've figured out a way to do it. I set a flag on the menu class and load the info into a member structure that gets read the next time handle() is called.

Return to “MAME Discussion”