Skip to content
Discussion options

You must be logged in to vote

@scorpion110374: menu.getScreen() returns a pointer to the current screen, so you can just compare your other screen pointers to see if they are the same.

MenuScreen *currentScreen = menu.getScreen();
if(currentScreen == mainScreen) {
  // Screen is currently Main, switch to bulto
  menu.setScreen(bultoScreen);
}else{
  // Screen is currently bulto, switch to main
  menu.setScreen(mainScreen);
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ShishkinDmitriy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #281 on January 04, 2025 11:05.