mirror of https://github.com/stella-emu/stella.git
enabled FLAT_UI (Windows only, TODO: enable for other OS or remove old code)
refactored Default/OK/Cancel buttons refined AudioDialog
This commit is contained in:
parent
a8b3c0d74d
commit
d115e3238e
|
@ -50,7 +50,7 @@ AboutDialog::AboutDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myPrevButton->clearFlags(WIDGET_ENABLED);
|
||||
wid.push_back(myPrevButton);
|
||||
|
||||
xpos += buttonWidth + 7;
|
||||
xpos += buttonWidth + 8;
|
||||
myNextButton =
|
||||
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
|
||||
"Next", GuiObject::kNextCmd);
|
||||
|
|
|
@ -37,6 +37,9 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
const GUI::Font& font)
|
||||
: Dialog(osystem, parent)
|
||||
{
|
||||
const int VBORDER = 10;
|
||||
const int HBORDER = 10;
|
||||
const int INDENT = 20;
|
||||
const int lineHeight = font.getLineHeight(),
|
||||
fontWidth = font.getMaxCharWidth(),
|
||||
fontHeight = font.getFontHeight(),
|
||||
|
@ -49,13 +52,21 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
VariantList items;
|
||||
|
||||
// Set real dimensions
|
||||
_w = 35 * fontWidth + 10;
|
||||
_h = 7 * (lineHeight + 4) + 10;
|
||||
_w = 35 * fontWidth + HBORDER * 2;
|
||||
_h = 7 * (lineHeight + 4) + VBORDER;
|
||||
|
||||
xpos = HBORDER; ypos = VBORDER;
|
||||
|
||||
// Enable sound
|
||||
xpos = HBORDER;
|
||||
mySoundEnableCheckbox = new CheckboxWidget(this, font, xpos, ypos,
|
||||
"Enable sound", kSoundEnableChanged);
|
||||
wid.push_back(mySoundEnableCheckbox);
|
||||
ypos += lineHeight + 4;
|
||||
xpos += INDENT;
|
||||
|
||||
// Volume
|
||||
xpos = 3 * fontWidth; ypos = 10;
|
||||
|
||||
myVolumeSlider = new SliderWidget(this, font, xpos, ypos, 6*fontWidth, lineHeight,
|
||||
myVolumeSlider = new SliderWidget(this, font, xpos, ypos, 8*fontWidth, lineHeight,
|
||||
"Volume ", lwidth, kVolumeChanged);
|
||||
myVolumeSlider->setMinValue(1); myVolumeSlider->setMaxValue(100);
|
||||
wid.push_back(myVolumeSlider);
|
||||
|
@ -75,7 +86,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
VarList::push_back(items, "2 KB", "2048");
|
||||
VarList::push_back(items, "4 KB", "4096");
|
||||
myFragsizePopup = new PopUpWidget(this, font, xpos, ypos,
|
||||
pwidth + myVolumeLabel->getWidth() - 4, lineHeight,
|
||||
pwidth, lineHeight,
|
||||
items, "Sample size (*) ", lwidth);
|
||||
wid.push_back(myFragsizePopup);
|
||||
ypos += lineHeight + 4;
|
||||
|
@ -88,31 +99,19 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
VarList::push_back(items, "44100 Hz", "44100");
|
||||
VarList::push_back(items, "48000 Hz", "48000");
|
||||
myFreqPopup = new PopUpWidget(this, font, xpos, ypos,
|
||||
pwidth + myVolumeLabel->getWidth() - 4, lineHeight,
|
||||
pwidth, lineHeight,
|
||||
items, "Frequency (*) ", lwidth);
|
||||
wid.push_back(myFreqPopup);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
// Enable sound
|
||||
xpos = (_w - (font.getStringWidth("Enable sound") + 10)) / 2;
|
||||
ypos += 4;
|
||||
mySoundEnableCheckbox = new CheckboxWidget(this, font, xpos, ypos,
|
||||
"Enable sound", kSoundEnableChanged);
|
||||
wid.push_back(mySoundEnableCheckbox);
|
||||
|
||||
// Add message concerning usage
|
||||
ypos += lineHeight + 12;
|
||||
ypos = _h - fontHeight * 2 - 24;
|
||||
const GUI::Font& infofont = instance().frameBuffer().infoFont();
|
||||
new StaticTextWidget(this, infofont, 10, ypos,
|
||||
new StaticTextWidget(this, infofont, HBORDER, ypos,
|
||||
font.getStringWidth("(*) Requires application restart"), fontHeight,
|
||||
"(*) Requires application restart", TextAlign::Left);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
|
||||
addToFocusList(wid);
|
||||
}
|
||||
|
|
|
@ -75,11 +75,7 @@ ComboDialog::ComboDialog(GuiObject* boss, const GUI::Font& font,
|
|||
myEvents[7] = nullptr; ADD_EVENT_POPUP(7, "Event 8 ");
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
|
||||
addToFocusList(wid);
|
||||
}
|
||||
|
|
|
@ -112,11 +112,7 @@ ConfigPathDialog::ConfigPathDialog(
|
|||
wid.push_back(myNVRamPath);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
font.getStringWidth("Defaults") + 20, buttonHeight,
|
||||
"Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
|
||||
addToFocusList(wid);
|
||||
|
||||
|
|
|
@ -66,7 +66,10 @@ DeveloperDialog::DeveloperDialog(OSystem& osystem, DialogContainer& parent,
|
|||
addVideoTab(font);
|
||||
addTimeMachineTab(font);
|
||||
addDebuggerTab(font);
|
||||
addDefaultOKCancelButtons(font);
|
||||
|
||||
WidgetArray wid;
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
addBGroupToFocusList(wid);
|
||||
|
||||
// Activate the first tab
|
||||
myTab->setActiveTab(0);
|
||||
|
@ -486,21 +489,6 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
|||
addToFocusList(wid, myTab, tabID);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DeveloperDialog::addDefaultOKCancelButtons(const GUI::Font& font)
|
||||
{
|
||||
const int buttonWidth = font.getStringWidth("Defaults") + 20,
|
||||
buttonHeight = font.getLineHeight() + 4;
|
||||
WidgetArray wid;
|
||||
|
||||
wid.clear();
|
||||
ButtonWidget* btn = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(btn);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addBGroupToFocusList(wid);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DeveloperDialog::loadSettings(SettingsSet set)
|
||||
{
|
||||
|
|
|
@ -164,8 +164,6 @@ class DeveloperDialog : public Dialog
|
|||
void addTimeMachineTab(const GUI::Font& font);
|
||||
void addVideoTab(const GUI::Font& font);
|
||||
void addDebuggerTab(const GUI::Font& font);
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
void addDefaultOKCancelButtons(const GUI::Font& font);
|
||||
|
||||
void loadSettings(SettingsSet set);
|
||||
void saveSettings(SettingsSet set);
|
||||
|
|
|
@ -664,23 +664,28 @@ Widget* Dialog::findWidget(int x, int y) const
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::addOKCancelBGroup(WidgetArray& wid, const GUI::Font& font,
|
||||
const string& okText, const string& cancelText,
|
||||
bool focusOKButton)
|
||||
bool focusOKButton, int buttonWidth)
|
||||
{
|
||||
int buttonWidth = std::max(font.getStringWidth("Cancel"),
|
||||
std::max(font.getStringWidth(okText),
|
||||
font.getStringWidth(okText))) + 15;
|
||||
const int HBORDER = 10;
|
||||
const int VBORDER = 10;
|
||||
const int BTN_BORDER = 20;
|
||||
const int BUTTON_GAP = 8;
|
||||
buttonWidth = std::max(buttonWidth,
|
||||
std::max(font.getStringWidth("Defaults"),
|
||||
std::max(font.getStringWidth(okText),
|
||||
font.getStringWidth(cancelText))) + BTN_BORDER);
|
||||
int buttonHeight = font.getLineHeight() + 4;
|
||||
|
||||
#ifndef BSPF_MAC_OSX
|
||||
addOKWidget(new ButtonWidget(this, font, _w - 2 * (buttonWidth + 7),
|
||||
_h - buttonHeight - 10, buttonWidth, buttonHeight, okText, GuiObject::kOKCmd));
|
||||
addCancelWidget(new ButtonWidget(this, font, _w - (buttonWidth + 10),
|
||||
_h - buttonHeight - 10, buttonWidth, buttonHeight, cancelText, GuiObject::kCloseCmd));
|
||||
addOKWidget(new ButtonWidget(this, font, _w - 2 * buttonWidth - HBORDER - BUTTON_GAP,
|
||||
_h - buttonHeight - VBORDER, buttonWidth, buttonHeight, okText, GuiObject::kOKCmd));
|
||||
addCancelWidget(new ButtonWidget(this, font, _w - (buttonWidth + HBORDER),
|
||||
_h - buttonHeight - VBORDER, buttonWidth, buttonHeight, cancelText, GuiObject::kCloseCmd));
|
||||
#else
|
||||
addCancelWidget(new ButtonWidget(this, font, _w - 2 * (buttonWidth + 7),
|
||||
_h - buttonHeight - 10, buttonWidth, buttonHeight, cancelText, GuiObject::kCloseCmd));
|
||||
addOKWidget(new ButtonWidget(this, font, _w - (buttonWidth + 10),
|
||||
_h - buttonHeight - 10, buttonWidth, buttonHeight, okText, GuiObject::kOKCmd));
|
||||
addCancelWidget(new ButtonWidget(this, font, _w - 2 * buttonWidth - HBORDER - BUTTON_GAP,
|
||||
_h - buttonHeight - VBORDER, buttonWidth, buttonHeight, cancelText, GuiObject::kCloseCmd));
|
||||
addOKWidget(new ButtonWidget(this, font, _w - (buttonWidth + HBORDER),
|
||||
_h - buttonHeight - VBORDER, buttonWidth, buttonHeight, okText, GuiObject::kOKCmd));
|
||||
#endif
|
||||
|
||||
// Note that 'focusOKButton' only takes effect when there are no other UI
|
||||
|
@ -699,6 +704,25 @@ void Dialog::addOKCancelBGroup(WidgetArray& wid, const GUI::Font& font,
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::addDefaultsOKCancelBGroup(WidgetArray& wid, const GUI::Font& font,
|
||||
const string& okText, const string& cancelText,
|
||||
const string& defaultsText,
|
||||
bool focusOKButton)
|
||||
{
|
||||
const int HBORDER = 10;
|
||||
const int VBORDER = 10;
|
||||
const int BTN_BORDER = 20;
|
||||
int buttonWidth = font.getStringWidth(defaultsText) + BTN_BORDER;
|
||||
int buttonHeight = font.getLineHeight() + 4;
|
||||
|
||||
addDefaultWidget(new ButtonWidget(this, font, HBORDER, _h - buttonHeight - VBORDER,
|
||||
buttonWidth, buttonHeight, defaultsText, GuiObject::kDefaultsCmd));
|
||||
wid.push_back(_defaultWidget);
|
||||
|
||||
addOKCancelBGroup(wid, font, okText, cancelText, focusOKButton, buttonWidth);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::TabFocus::appendFocusList(WidgetArray& list)
|
||||
{
|
||||
|
|
|
@ -65,6 +65,7 @@ class Dialog : public GuiObject
|
|||
void addToFocusList(WidgetArray& list, TabWidget* w, int tabId);
|
||||
void addBGroupToFocusList(WidgetArray& list) { _buttonGroup = list; }
|
||||
void addTabWidget(TabWidget* w);
|
||||
void addDefaultWidget(Widget* w) { _defaultWidget = w; }
|
||||
void addOKWidget(Widget* w) { _okWidget = w; }
|
||||
void addCancelWidget(Widget* w) { _cancelWidget = w; }
|
||||
void setFocus(Widget* w);
|
||||
|
@ -106,7 +107,14 @@ class Dialog : public GuiObject
|
|||
void addOKCancelBGroup(WidgetArray& wid, const GUI::Font& font,
|
||||
const string& okText = "OK",
|
||||
const string& cancelText = "Cancel",
|
||||
bool focusOKButton = true);
|
||||
bool focusOKButton = true,
|
||||
int buttonWidth = 0);
|
||||
|
||||
void addDefaultsOKCancelBGroup(WidgetArray& wid, const GUI::Font& font,
|
||||
const string& okText = "OK",
|
||||
const string& cancelText = "Cancel",
|
||||
const string& defaultsText = "Defaults",
|
||||
bool focusOKButton = true);
|
||||
|
||||
void processCancelWithoutWidget(bool state) { _processCancel = state; }
|
||||
|
||||
|
@ -125,6 +133,7 @@ class Dialog : public GuiObject
|
|||
Widget* _mouseWidget;
|
||||
Widget* _focusedWidget;
|
||||
Widget* _dragWidget;
|
||||
Widget* _defaultWidget;
|
||||
Widget* _okWidget;
|
||||
Widget* _cancelWidget;
|
||||
bool _visible;
|
||||
|
|
|
@ -359,11 +359,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
wid.clear();
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
addBGroupToFocusList(wid);
|
||||
}
|
||||
|
||||
|
|
|
@ -133,11 +133,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
|||
" further ROMs until clicking 'Defaults'", TextAlign::Left);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font, "Load ROM", "Close");
|
||||
addDefaultsOKCancelBGroup(wid, font, "Load ROM", "Close");
|
||||
|
||||
addToFocusList(wid);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ HelpDialog::HelpDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myPrevButton->clearFlags(WIDGET_ENABLED);
|
||||
wid.push_back(myPrevButton);
|
||||
|
||||
xpos += buttonWidth + 7;
|
||||
xpos += buttonWidth + 8;
|
||||
myNextButton =
|
||||
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
|
||||
"Next", GuiObject::kNextCmd);
|
||||
|
|
|
@ -90,11 +90,7 @@ InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent,
|
|||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
WidgetArray wid;
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
addBGroupToFocusList(wid);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,11 +70,7 @@ LauncherFilterDialog::LauncherFilterDialog(GuiObject* boss, const GUI::Font& fon
|
|||
_h = ypos + buttonHeight + 20;
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
|
||||
addToFocusList(wid);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ LoggerDialog::LoggerDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myLogToConsole = new CheckboxWidget(this, font, xpos, ypos, "Print to console");
|
||||
wid.push_back(myLogToConsole);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
// Add Save, OK and Cancel buttons
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Save log to disk",
|
||||
|
|
|
@ -114,11 +114,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
|
|||
wid.push_back(mySnap1x);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
font.getStringWidth("Defaults") + 20, buttonHeight,
|
||||
"Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
|
||||
addToFocusList(wid);
|
||||
}
|
||||
|
|
|
@ -203,10 +203,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
|||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
wid.clear();
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
addBGroupToFocusList(wid);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
{
|
||||
const int VGAP = 4;
|
||||
const int VBORDER = 8;
|
||||
const int HBORDER = 8;
|
||||
const int HBORDER = 10;
|
||||
const int INDENT = 18;
|
||||
const int lineHeight = font.getLineHeight(),
|
||||
fontWidth = font.getMaxCharWidth(),
|
||||
fontHeight = font.getFontHeight(),
|
||||
|
@ -54,8 +55,8 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
VariantList items;
|
||||
|
||||
// Set real dimensions
|
||||
_w = std::min(52 * fontWidth + 10, max_w);
|
||||
_h = std::min(16 * (lineHeight + VGAP) + 14, max_h);
|
||||
_w = std::min((52+4) * fontWidth + HBORDER * 2, max_w);
|
||||
_h = std::min((16-2) * (lineHeight + VGAP) + 14, max_h);
|
||||
|
||||
// The tab widget
|
||||
xpos = 2; ypos = 4;
|
||||
|
@ -157,6 +158,12 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
wid.push_back(myFullscreen);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
pwidth = font.getStringWidth("0: 3840x2860@120Hz");
|
||||
myFullScreenMode = new PopUpWidget(myTab, font, xpos + INDENT + 2, ypos, pwidth, lineHeight,
|
||||
instance().frameBuffer().supportedScreenModes(), "Mode ");
|
||||
wid.push_back(myFullScreenMode);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
// FS stretch
|
||||
myUseStretch = new CheckboxWidget(myTab, font, xpos, ypos, "Fullscreen Fill");
|
||||
wid.push_back(myUseStretch);
|
||||
|
@ -257,19 +264,19 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
ypos += lineHeight + VGAP;
|
||||
|
||||
// TV Phosphor default level
|
||||
xpos += 8-8+16;
|
||||
xpos += INDENT;
|
||||
pwidth = swidth;
|
||||
CREATE_CUSTOM_SLIDERS(PhosLevel, "Default ");
|
||||
ypos += 6;
|
||||
|
||||
// Scanline intensity and interpolation
|
||||
xpos -= 8+8;
|
||||
xpos -= INDENT;
|
||||
myTVScanLabel =
|
||||
new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings"),
|
||||
fontHeight, "Scanline settings", TextAlign::Left);
|
||||
ypos += lineHeight;
|
||||
|
||||
xpos += 8+8;
|
||||
xpos += INDENT;
|
||||
CREATE_CUSTOM_SLIDERS(ScanIntense, "Intensity ");
|
||||
|
||||
myTVScanInterpolate = new CheckboxWidget(myTab, font, xpos, ypos,
|
||||
|
@ -278,7 +285,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
ypos += lineHeight + 6;
|
||||
|
||||
// Adjustable presets
|
||||
xpos -= 8+8;
|
||||
xpos -= INDENT;
|
||||
int cloneWidth = font.getStringWidth("Clone Bad Adjust") + 20;
|
||||
#define CREATE_CLONE_BUTTON(obj, desc) \
|
||||
myClone ## obj = \
|
||||
|
@ -302,11 +309,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
wid.clear();
|
||||
ButtonWidget* b;
|
||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||
buttonWidth, buttonHeight, "Defaults", GuiObject::kDefaultsCmd);
|
||||
wid.push_back(b);
|
||||
addOKCancelBGroup(wid, font);
|
||||
addDefaultsOKCancelBGroup(wid, font);
|
||||
addBGroupToFocusList(wid);
|
||||
|
||||
// Disable certain functions when we know they aren't present
|
||||
|
@ -356,6 +359,8 @@ void VideoDialog::loadConfig()
|
|||
|
||||
// Fullscreen
|
||||
myFullscreen->setState(instance().settings().getBool("fullscreen"));
|
||||
string mode = instance().settings().getString("fullscreenmode");
|
||||
myFullScreenMode->setSelected(mode);
|
||||
|
||||
// Fullscreen stretch setting
|
||||
myUseStretch->setState(instance().settings().getBool("tia.fsfill"));
|
||||
|
@ -440,7 +445,8 @@ void VideoDialog::saveConfig()
|
|||
|
||||
// Fullscreen
|
||||
instance().settings().setValue("fullscreen", myFullscreen->getState());
|
||||
|
||||
instance().settings().setValue("fullscreenmode",
|
||||
myFullScreenMode->getSelectedTag().toString());
|
||||
// Fullscreen stretch setting
|
||||
instance().settings().setValue("tia.fsfill", myUseStretch->getState());
|
||||
|
||||
|
@ -515,6 +521,7 @@ void VideoDialog::setDefaults()
|
|||
myFrameRateLabel->setLabel("Auto");
|
||||
|
||||
myFullscreen->setState(false);
|
||||
myFullScreenMode->setSelectedIndex(0);
|
||||
myUseStretch->setState(true);
|
||||
myUseVSync->setState(true);
|
||||
myUIMessages->setState(true);
|
||||
|
|
|
@ -64,6 +64,7 @@ class VideoDialog : public Dialog
|
|||
SliderWidget* myFrameRate;
|
||||
StaticTextWidget* myFrameRateLabel;
|
||||
CheckboxWidget* myFullscreen;
|
||||
PopUpWidget* myFullScreenMode;
|
||||
CheckboxWidget* myUseStretch;
|
||||
CheckboxWidget* myUseVSync;
|
||||
CheckboxWidget* myUIMessages;
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
|
@ -142,7 +142,7 @@
|
|||
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
|
@ -171,7 +171,7 @@
|
|||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
|
|
Loading…
Reference in New Issue