mirror of https://github.com/stella-emu/stella.git
define and align TV effect defaults for R77
slightly enlarge options dialog for minimal UI
This commit is contained in:
parent
174b630c99
commit
ae51e9a953
|
@ -40,9 +40,9 @@ class NTSCFilter
|
|||
// Set one of the available preset adjustments (Composite, S-Video, RGB, etc)
|
||||
enum class Preset {
|
||||
OFF,
|
||||
COMPOSITE,
|
||||
SVIDEO,
|
||||
RGB,
|
||||
SVIDEO,
|
||||
COMPOSITE,
|
||||
BAD,
|
||||
CUSTOM
|
||||
};
|
||||
|
|
|
@ -54,24 +54,26 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
|
|||
// do not show basic settings options in debugger
|
||||
bool minSettings = osystem.settings().getBool("minimal_ui") && mode != Menu::AppMode::debugger;
|
||||
const int buttonHeight = _font.getLineHeight() + 6,
|
||||
rowHeight = _font.getLineHeight() + 10;
|
||||
const int VBORDER = 10 + _th;
|
||||
int buttonWidth = _font.getStringWidth("Game Properties" + ELLIPSIS) + 20;
|
||||
GAP = buttonHeight > 26 ? 5 : 4,
|
||||
rowHeight = buttonHeight + GAP;
|
||||
const int VBORDER = GAP * 2 + 2;
|
||||
const int HBORDER = GAP * 2 + 2;
|
||||
int buttonWidth = _font.getStringWidth("Game Properties" + ELLIPSIS) + GAP * 5;
|
||||
|
||||
_w = 2 * buttonWidth + 30;
|
||||
_h = 7 * rowHeight + 15 + _th;
|
||||
_w = 2 * buttonWidth + HBORDER * 3;
|
||||
_h = 7 * rowHeight + VBORDER * 2 - GAP + _th;
|
||||
|
||||
int xoffset = 10, yoffset = VBORDER;
|
||||
int xoffset = HBORDER, yoffset = VBORDER + _th;
|
||||
WidgetArray wid;
|
||||
ButtonWidget* b = nullptr;
|
||||
|
||||
if (minSettings)
|
||||
{
|
||||
ButtonWidget* bw = new ButtonWidget(this, _font, xoffset, yoffset,
|
||||
_w - 10 * 2, buttonHeight, "Switch to Basic Settings" + ELLIPSIS, kBasSetCmd);
|
||||
_w - HBORDER * 2, buttonHeight, "Switch to Basic Settings" + ELLIPSIS, kBasSetCmd);
|
||||
wid.push_back(bw);
|
||||
yoffset += rowHeight + 8;
|
||||
_h += rowHeight + 8;
|
||||
yoffset += rowHeight + GAP * 2;
|
||||
_h += rowHeight + GAP * 2;
|
||||
}
|
||||
|
||||
auto ADD_OD_BUTTON = [&](const string& label, int cmd)
|
||||
|
@ -105,7 +107,8 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
|
|||
wid.push_back(b);
|
||||
|
||||
// Move to second column
|
||||
xoffset += buttonWidth + 10; yoffset = minSettings ? VBORDER + rowHeight + 8 : VBORDER;
|
||||
xoffset += buttonWidth + HBORDER;
|
||||
yoffset = minSettings ? VBORDER + _th + rowHeight + GAP * 2 : VBORDER + _th;
|
||||
|
||||
myGameInfoButton = ADD_OD_BUTTON("Game Properties" + ELLIPSIS, kInfoCmd);
|
||||
wid.push_back(myGameInfoButton);
|
||||
|
@ -128,8 +131,8 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
|
|||
b = ADD_OD_BUTTON("About" + ELLIPSIS, kAboutCmd);
|
||||
wid.push_back(b);
|
||||
|
||||
buttonWidth = _font.getStringWidth(" Close ") + 20;
|
||||
xoffset -= (buttonWidth + 10) / 2;
|
||||
buttonWidth = _font.getStringWidth(" Close ") + GAP * 5;
|
||||
xoffset -= (buttonWidth + HBORDER) / 2;
|
||||
b = ADD_OD_BUTTON("Close", kExitCmd);
|
||||
wid.push_back(b);
|
||||
addCancelWidget(b);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
StellaSettingsDialog::StellaSettingsDialog(OSystem& osystem, DialogContainer& parent,
|
||||
const GUI::Font& font, int max_w, int max_h, Menu::AppMode mode)
|
||||
: Dialog(osystem, parent, font, "Stella settings"),
|
||||
: Dialog(osystem, parent, font, "Basic settings"),
|
||||
myMode(mode)
|
||||
{
|
||||
const int VBORDER = 8;
|
||||
|
@ -271,11 +271,11 @@ void StellaSettingsDialog::setDefaults()
|
|||
myThemePopup->setSelected("standard");
|
||||
|
||||
// TV effects
|
||||
myTVMode->setSelected("0", "0");
|
||||
myTVMode->setSelected("RGB", static_cast<uInt32>(NTSCFilter::Preset::RGB));
|
||||
// TV scanline intensity
|
||||
myTVScanIntense->setValue(0); // = off
|
||||
myTVScanIntense->setValue(3); // 18
|
||||
// TV phosphor blend
|
||||
myTVPhosLevel->setValue(0); // = off
|
||||
myTVPhosLevel->setValue(6); // = 45
|
||||
|
||||
// Load the default game properties
|
||||
Properties defaultProperties;
|
||||
|
|
|
@ -67,10 +67,10 @@ SettingsR77::SettingsR77()
|
|||
setPermanent("threads", "1");
|
||||
|
||||
// all TV effects off by default (aligned to StellaSettingsDialog defaults!)
|
||||
setPermanent("tv.filter", "0");
|
||||
setPermanent("tv.filter", "1"); // RGB
|
||||
setPermanent("tv.phosphor", "always");
|
||||
setPermanent("tv.phosblend", "0");
|
||||
setPermanent("tv.scanlines", "0");
|
||||
setPermanent("tv.phosblend", "45"); // level 6
|
||||
setPermanent("tv.scanlines", "18"); // level 3
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue