Skip to content

Multiple links to single menu? #88

Closed Answered by Spirik
DisasterAreaDesigns asked this question in Q&A
Discussion options

You must be logged in to vote

I think I managed to implement something remotely similar to what you would like to achieve.

GEM doesn't support callbacks for entering or exiting menu pages. However similar behavior can be achieved by additional check for GEM_KEY_OK presses in a main loop and subsequent checks for current menu item index GEMPage::getCurrentMenuItemIndex() or title GEMItem::getTitle() (as in the following example).

Consider we would like to have three config menu pages with identical structure of two variables: one int number and one bool flag (this code is loosely based on GEM Basic example with encoder, so thats where test variables come from).

Variables that we would like to edit:

// Create variables
int

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Spirik
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants