MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / Back

Method Back

netgames/dmfc/dmfcmenu.cpp:362–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360 return false;
361}
362bool MenuItem::Back(void) {
363 // We need to look ahead and see if the next submenu has input focus
364 // if it does have focus, than we need to make it lose focus, and make this one have focus
365 if (SubMenuCount > 0) {
366 if (CurrSubMenu != -1) {
367 if (SubMenus[CurrSubMenu]->GetFocus()) {
368 // The next submenu has focus so we can remove it and set this guy to have focus
369 SubMenus[CurrSubMenu]->LoseInputFocus();
370 HasInputFocus = true;
371 return true;
372 }
373 // The next submenu doesn't have focus, but one of it's submenus might (they better),
374 // so move on to the next submenu and call Back()
375 return SubMenus[CurrSubMenu]->Back();
376 }
377 }
378 return false;
379}
380bool MenuItem::Up(void) {
381 // See if this MenuItem has focus, if it does, and we can move up, then move up
382 if (HasInputFocus) {

Callers 3

DrawMethod · 0.80
OnKeypressMethod · 0.80

Calls 2

LoseInputFocusMethod · 0.80
GetFocusMethod · 0.45

Tested by

no test coverage detected