/** * Closes currently opened menu (if any). Used by framework and typically there is no need to call * this manually */ public void closeMenu() { if (currentMenu != null) { currentMenu.deselectButton(); currentMenu.remove(); currentMenu = null; } }
void setCurrentMenu(Menu newMenu) { if (newMenu != null) newMenu.selectButton(); if (currentMenu != null) currentMenu.deselectButton(); currentMenu = newMenu; }