From ae51e9a953e41f3cf290d7b08beb84519d0d3621 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Wed, 1 May 2019 08:49:17 +0200 Subject: [PATCH] define and align TV effect defaults for R77 slightly enlarge options dialog for minimal UI --- src/common/tv_filters/NTSCFilter.hxx | 4 ++-- src/gui/OptionsDialog.cxx | 27 +++++++++++++++------------ src/gui/StellaSettingsDialog.cxx | 8 ++++---- src/unix/r77/SettingsR77.cxx | 6 +++--- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/common/tv_filters/NTSCFilter.hxx b/src/common/tv_filters/NTSCFilter.hxx index 901eeb233..a1e26b2bf 100644 --- a/src/common/tv_filters/NTSCFilter.hxx +++ b/src/common/tv_filters/NTSCFilter.hxx @@ -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 }; diff --git a/src/gui/OptionsDialog.cxx b/src/gui/OptionsDialog.cxx index 55375bb10..e7c37a243 100644 --- a/src/gui/OptionsDialog.cxx +++ b/src/gui/OptionsDialog.cxx @@ -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); diff --git a/src/gui/StellaSettingsDialog.cxx b/src/gui/StellaSettingsDialog.cxx index 88dedd1e6..0bdff77aa 100644 --- a/src/gui/StellaSettingsDialog.cxx +++ b/src/gui/StellaSettingsDialog.cxx @@ -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(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; diff --git a/src/unix/r77/SettingsR77.cxx b/src/unix/r77/SettingsR77.cxx index e8653dcb9..b8e65d939 100644 --- a/src/unix/r77/SettingsR77.cxx +++ b/src/unix/r77/SettingsR77.cxx @@ -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 } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -