an attempt to map F1 (Select) to StellaSettingsDialog

This commit is contained in:
thrust26 2019-04-06 21:01:32 +02:00
parent fe398360fb
commit 25cbc2db3a
4 changed files with 24 additions and 0 deletions

View File

@ -176,6 +176,9 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod
setDefaultKey( KBDK_ESCAPE, Event::UICancel ); setDefaultKey( KBDK_ESCAPE, Event::UICancel );
setDefaultKey( KBDK_BACKSPACE, Event::UIPrevDir ); setDefaultKey( KBDK_BACKSPACE, Event::UIPrevDir );
#ifdef RETRON77
setDefaultKey( KBDK_F1, Event::CmdMenuMode);
#endif
break; break;
default: default:

View File

@ -27,6 +27,9 @@
#include "MD5.hxx" #include "MD5.hxx"
#include "OptionsDialog.hxx" #include "OptionsDialog.hxx"
#include "GlobalPropsDialog.hxx" #include "GlobalPropsDialog.hxx"
#ifdef RETRON77
#include "StellaSettingsDialog.hxx"
#endif
#include "MessageBox.hxx" #include "MessageBox.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
@ -223,6 +226,9 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
// Create global props dialog, which is used to temporarily overrride // Create global props dialog, which is used to temporarily overrride
// ROM properties // ROM properties
myGlobalProps = make_unique<GlobalPropsDialog>(this, osystem.frameBuffer().font()); myGlobalProps = make_unique<GlobalPropsDialog>(this, osystem.frameBuffer().font());
#ifdef RETRON77
myStellaSettingsDialog = make_unique<StellaSettingsDialog>(osystem, parent, _font, w, h);
#endif
// Do we show only ROMs or all files? // Do we show only ROMs or all files?
bool onlyROMs = instance().settings().getBool("launcherroms"); bool onlyROMs = instance().settings().getBool("launcherroms");
@ -456,6 +462,12 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod)
// Control-R (reload ROM listing) // Control-R (reload ROM listing)
if(StellaModTest::isControl(mod) && key == KBDK_R) if(StellaModTest::isControl(mod) && key == KBDK_R)
updateListing(); updateListing();
#ifdef RETRON77
else if(key == KBDK_F1)
{
myStellaSettingsDialog->open();
}
#endif
else else
Dialog::handleKeyDown(key, mod); Dialog::handleKeyDown(key, mod);
} }

View File

@ -26,6 +26,9 @@ class GameList;
class BrowserDialog; class BrowserDialog;
class OptionsDialog; class OptionsDialog;
class GlobalPropsDialog; class GlobalPropsDialog;
#ifdef RETRON77
class StellaSettingsDialog;
#endif
class OSystem; class OSystem;
class Properties; class Properties;
class EditTextWidget; class EditTextWidget;
@ -102,6 +105,9 @@ class LauncherDialog : public Dialog
unique_ptr<GameList> myGameList; unique_ptr<GameList> myGameList;
unique_ptr<ContextMenu> myMenu; unique_ptr<ContextMenu> myMenu;
unique_ptr<GlobalPropsDialog> myGlobalProps; unique_ptr<GlobalPropsDialog> myGlobalProps;
#ifdef RETRON77
unique_ptr<StellaSettingsDialog> myStellaSettingsDialog;
#endif
unique_ptr<BrowserDialog> myRomDir; unique_ptr<BrowserDialog> myRomDir;
ButtonWidget* myStartButton; ButtonWidget* myStartButton;

View File

@ -20,6 +20,9 @@
class PopUpWidget; class PopUpWidget;
#ifdef RETRON77
#include "Props.hxx"
#endif
#include "Dialog.hxx" #include "Dialog.hxx"
namespace GUI { namespace GUI {