add tab widget navigation for R77

This commit is contained in:
thrust26 2019-05-01 08:23:51 +02:00
parent 3f9ca310c3
commit 5a2c9558f5
3 changed files with 25 additions and 9 deletions

View File

@ -195,8 +195,9 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod
setDefaultKey( KBDK_F1, Event::UINavNext ); // front ("MODE")
setDefaultKey( KBDK_F6, Event::UISelect ); // front ("SKILL P1")
setDefaultKey( KBDK_F8, Event::UICancel ); // front ("SKILL P2")
setDefaultKey( KBDK_F13, Event::UIPgUp ); // back ("4:3","16:9")(redundant)
setDefaultKey( KBDK_BACKSPACE, Event::UIPgDown ); // back (FRY)(redundant)
//setDefaultKey( KBDK_F4, Event::NoType ); // back ("COLOR","B/W")
//setDefaultKey( KBDK_F13, Event::NoType ); // back ("4:3","16:9")
//setDefaultKey( KBDK_BACKSPACE, Event::NoType ); // back (FRY)
#endif
break;

View File

@ -416,6 +416,17 @@ void Dialog::handleKeyDown(StellaKey key, StellaMod mod)
}
}
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
// special keys used for R77
if (key == KBDK_F13 && cycleTab(-1))
return;
if (key == KBDK_BACKSPACE && cycleTab(1))
return;
#endif
// Check the keytable now, since we might get one of the above events,
// which must always be processed before any widget sees it.
if(e == Event::NoType)

View File

@ -455,8 +455,11 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod)
// Control-R (reload ROM listing)
if(StellaModTest::isControl(mod) && key == KBDK_R)
updateListing();
//#ifdef RETRON77 // debugging only, FIX ME!
else if(myUseMinimalUI)
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
else
// handle keys used by R77
switch(key)
{
@ -469,22 +472,23 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod)
break;
case KBDK_F11: // front ("LOAD")
// convert unused previous item key into page-up key
Dialog::handleKeyDown(KBDK_F13, mod);
// convert unused previous item key into page-up event
_focusedWidget->handleEvent(Event::UIPgUp);
break;
case KBDK_F1: // front ("MODE")
// convert unused next item key into page-down key
Dialog::handleKeyDown(KBDK_BACKSPACE, mod);
// convert unused next item key into page-down event
_focusedWidget->handleEvent(Event::UIPgDown);
break;
default:
Dialog::handleKeyDown(key, mod);
break;
}
//#endif // debugging only, FIX ME!
#else
else
Dialog::handleKeyDown(key, mod);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -