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

View File

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