add frying to min UI command dialog

This commit is contained in:
thrust26 2019-05-04 21:09:35 +02:00
parent ca96f20bc2
commit 95341b9030
2 changed files with 17 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#include "StellaSettingsDialog.hxx" #include "StellaSettingsDialog.hxx"
#include "OptionsDialog.hxx" #include "OptionsDialog.hxx"
#include "TIASurface.hxx" #include "TIASurface.hxx"
#include "MinUICommandDialog.hxx" #include "MinUICommandDialog.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -85,8 +86,6 @@ MinUICommandDialog::MinUICommandDialog(OSystem& osystem, DialogContainer& parent
wid.push_back(myRewindButton); wid.push_back(myRewindButton);
myUnwindButton = ADD_CD_BUTTON("Unwind", kUnwindCmd); myUnwindButton = ADD_CD_BUTTON("Unwind", kUnwindCmd);
wid.push_back(myUnwindButton); wid.push_back(myUnwindButton);
bw = ADD_CD_BUTTON("Close", GuiObject::kCloseCmd);
wid.push_back(bw);
// Column 3 // Column 3
xoffset += buttonWidth + HGAP; xoffset += buttonWidth + HGAP;
@ -100,8 +99,17 @@ MinUICommandDialog::MinUICommandDialog(OSystem& osystem, DialogContainer& parent
wid.push_back(myPhosphorButton); wid.push_back(myPhosphorButton);
bw = ADD_CD_BUTTON("Settings"+ ELLIPSIS, kSettings); bw = ADD_CD_BUTTON("Settings"+ ELLIPSIS, kSettings);
wid.push_back(bw); wid.push_back(bw);
bw = ADD_CD_BUTTON("Fry", kFry);
wid.push_back(bw);
// Bottom row
xoffset = HBORDER + (buttonWidth + HGAP) / 2;
bw = ADD_CD_BUTTON("Exit Game", kExitGameCmd); bw = ADD_CD_BUTTON("Exit Game", kExitGameCmd);
wid.push_back(bw); wid.push_back(bw);
xoffset += buttonWidth + HGAP;
yoffset -= buttonHeight + VGAP;
bw = ADD_CD_BUTTON("Close", GuiObject::kCloseCmd);
wid.push_back(bw);
addToFocusList(wid); addToFocusList(wid);
@ -222,6 +230,7 @@ void MinUICommandDialog::handleCommand(CommandSender* sender, int cmd,
case kStretchCmd: case kStretchCmd:
instance().eventHandler().leaveMenuMode(); instance().eventHandler().leaveMenuMode();
instance().settings().setValue("tia.fs_stretch", !instance().settings().getBool("tia.fs_stretch")); instance().settings().setValue("tia.fs_stretch", !instance().settings().getBool("tia.fs_stretch"));
// Issue a complete framebuffer re-initialization
instance().createFrameBuffer(); instance().createFrameBuffer();
break; break;
@ -234,6 +243,11 @@ void MinUICommandDialog::handleCommand(CommandSender* sender, int cmd,
openSettings(); openSettings();
break; break;
case kFry:
instance().eventHandler().leaveMenuMode();
instance().console().fry();
break;
case kExitGameCmd: case kExitGameCmd:
instance().eventHandler().handleEvent(Event::LauncherMode); instance().eventHandler().handleEvent(Event::LauncherMode);
break; break;

View File

@ -78,6 +78,7 @@ class MinUICommandDialog : public Dialog
kStretchCmd = 'Cstr', kStretchCmd = 'Cstr',
kPhosphorCmd = 'Cpho', kPhosphorCmd = 'Cpho',
kSettings = 'Cscn', kSettings = 'Cscn',
kFry = 'Cfry',
kExitGameCmd = 'Cext', kExitGameCmd = 'Cext',
}; };