mirror of https://github.com/stella-emu/stella.git
minor changes to UIDialog and VideoDialog
This commit is contained in:
parent
a7308b4c0d
commit
2eaa62c87c
|
@ -62,9 +62,73 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
addTabWidget(myTab);
|
addTabWidget(myTab);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
// 1) Launcher options
|
// 1) Misc. options
|
||||||
|
wid.clear();
|
||||||
|
tabID = myTab->addTab(" Look & Feel ");
|
||||||
|
lwidth = font.getStringWidth("Mouse wheel scroll ");
|
||||||
|
pwidth = font.getStringWidth("Standard");
|
||||||
|
xpos = HBORDER; ypos = VBORDER;
|
||||||
|
|
||||||
|
// UI Palette
|
||||||
|
ypos += 1;
|
||||||
|
items.clear();
|
||||||
|
VarList::push_back(items, "Standard", "standard");
|
||||||
|
VarList::push_back(items, "Classic", "classic");
|
||||||
|
VarList::push_back(items, "Light", "light");
|
||||||
|
myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
||||||
|
items, "Theme (*) ", lwidth);
|
||||||
|
wid.push_back(myPalettePopup);
|
||||||
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
|
// Delay between quick-selecting characters in ListWidget
|
||||||
|
items.clear();
|
||||||
|
VarList::push_back(items, "Disabled", "0");
|
||||||
|
VarList::push_back(items, "300 ms", "300");
|
||||||
|
VarList::push_back(items, "400 ms", "400");
|
||||||
|
VarList::push_back(items, "500 ms", "500");
|
||||||
|
VarList::push_back(items, "600 ms", "600");
|
||||||
|
VarList::push_back(items, "700 ms", "700");
|
||||||
|
VarList::push_back(items, "800 ms", "800");
|
||||||
|
VarList::push_back(items, "900 ms", "900");
|
||||||
|
VarList::push_back(items, "1 second", "1000");
|
||||||
|
myListDelayPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
||||||
|
items, "List input delay ", lwidth);
|
||||||
|
wid.push_back(myListDelayPopup);
|
||||||
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
|
// Number of lines a mouse wheel will scroll
|
||||||
|
items.clear();
|
||||||
|
VarList::push_back(items, "1 line", "1");
|
||||||
|
VarList::push_back(items, "2 lines", "2");
|
||||||
|
VarList::push_back(items, "3 lines", "3");
|
||||||
|
VarList::push_back(items, "4 lines", "4");
|
||||||
|
VarList::push_back(items, "5 lines", "5");
|
||||||
|
VarList::push_back(items, "6 lines", "6");
|
||||||
|
VarList::push_back(items, "7 lines", "7");
|
||||||
|
VarList::push_back(items, "8 lines", "8");
|
||||||
|
VarList::push_back(items, "9 lines", "9");
|
||||||
|
VarList::push_back(items, "10 lines", "10");
|
||||||
|
myWheelLinesPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
||||||
|
items, "Mouse wheel scroll ", lwidth);
|
||||||
|
wid.push_back(myWheelLinesPopup);
|
||||||
|
|
||||||
|
// Add message concerning usage
|
||||||
|
xpos = HBORDER;
|
||||||
|
ypos = myTab->getHeight() - 5 - fontHeight - ifont.getFontHeight() - 10;
|
||||||
|
lwidth = ifont.getStringWidth("(*) Requires application restart");
|
||||||
|
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
|
||||||
|
"(*) Requires application restart",
|
||||||
|
TextAlign::Left);
|
||||||
|
|
||||||
|
// Add items for tab 0
|
||||||
|
addToFocusList(wid, myTab, tabID);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////
|
||||||
|
// 2) Launcher options
|
||||||
|
wid.clear();
|
||||||
tabID = myTab->addTab(" Launcher ");
|
tabID = myTab->addTab(" Launcher ");
|
||||||
lwidth = font.getStringWidth("Exit to Launcher ");
|
lwidth = font.getStringWidth("Exit to Launcher ");
|
||||||
|
xpos = HBORDER; ypos = VBORDER;
|
||||||
|
|
||||||
// Launcher width and height
|
// Launcher width and height
|
||||||
myLauncherWidthSlider = new SliderWidget(myTab, font, xpos, ypos, "Launcher Width ",
|
myLauncherWidthSlider = new SliderWidget(myTab, font, xpos, ypos, "Launcher Width ",
|
||||||
|
@ -112,7 +176,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
new PopUpWidget(myTab, font, xpos, ypos + 1, pwidth, lineHeight, items,
|
new PopUpWidget(myTab, font, xpos, ypos + 1, pwidth, lineHeight, items,
|
||||||
"ROM Info viewer ", lwidth);
|
"ROM Info viewer ", lwidth);
|
||||||
wid.push_back(myRomViewerPopup);
|
wid.push_back(myRomViewerPopup);
|
||||||
ypos += lineHeight + 4;
|
ypos += lineHeight + 4*4;
|
||||||
|
|
||||||
// Exit to Launcher
|
// Exit to Launcher
|
||||||
pwidth = font.getStringWidth("If in use");
|
pwidth = font.getStringWidth("If in use");
|
||||||
|
@ -123,78 +187,16 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
new PopUpWidget(myTab, font, xpos, ypos + 1, pwidth, lineHeight, items,
|
new PopUpWidget(myTab, font, xpos, ypos + 1, pwidth, lineHeight, items,
|
||||||
"Exit to Launcher ", lwidth);
|
"Exit to Launcher ", lwidth);
|
||||||
wid.push_back(myLauncherExitPopup);
|
wid.push_back(myLauncherExitPopup);
|
||||||
ypos += lineHeight + 4;
|
|
||||||
|
|
||||||
// Add message concerning usage
|
// Add message concerning usage
|
||||||
xpos = HBORDER; ypos += 1*(lineHeight + 4);
|
xpos = HBORDER;
|
||||||
|
ypos = myTab->getHeight() - 5 - fontHeight - ifont.getFontHeight() - 10;
|
||||||
lwidth = ifont.getStringWidth("(*) Changes require application restart");
|
lwidth = ifont.getStringWidth("(*) Changes require application restart");
|
||||||
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w - 20), fontHeight,
|
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w - 20), fontHeight,
|
||||||
"(*) Changes require application restart",
|
"(*) Changes require application restart",
|
||||||
TextAlign::Left);
|
TextAlign::Left);
|
||||||
|
|
||||||
// Add items for tab 0
|
// Add items for tab 1
|
||||||
addToFocusList(wid, myTab, tabID);
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
|
||||||
// 3) Misc. options
|
|
||||||
wid.clear();
|
|
||||||
tabID = myTab->addTab(" Misc. ");
|
|
||||||
lwidth = font.getStringWidth("Interface Palette (*) ");
|
|
||||||
pwidth = font.getStringWidth("Standard");
|
|
||||||
xpos = HBORDER; ypos = VBORDER;
|
|
||||||
|
|
||||||
// UI Palette
|
|
||||||
ypos += 1;
|
|
||||||
items.clear();
|
|
||||||
VarList::push_back(items, "Standard", "standard");
|
|
||||||
VarList::push_back(items, "Classic", "classic");
|
|
||||||
VarList::push_back(items, "Light", "light");
|
|
||||||
myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
|
||||||
items, "Interface Palette (*) ", lwidth);
|
|
||||||
wid.push_back(myPalettePopup);
|
|
||||||
ypos += lineHeight + 4;
|
|
||||||
|
|
||||||
// Delay between quick-selecting characters in ListWidget
|
|
||||||
items.clear();
|
|
||||||
VarList::push_back(items, "Disabled", "0");
|
|
||||||
VarList::push_back(items, "300 ms", "300");
|
|
||||||
VarList::push_back(items, "400 ms", "400");
|
|
||||||
VarList::push_back(items, "500 ms", "500");
|
|
||||||
VarList::push_back(items, "600 ms", "600");
|
|
||||||
VarList::push_back(items, "700 ms", "700");
|
|
||||||
VarList::push_back(items, "800 ms", "800");
|
|
||||||
VarList::push_back(items, "900 ms", "900");
|
|
||||||
VarList::push_back(items, "1 second", "1000");
|
|
||||||
myListDelayPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
|
||||||
items, "List quick delay ", lwidth);
|
|
||||||
wid.push_back(myListDelayPopup);
|
|
||||||
ypos += lineHeight + 4;
|
|
||||||
|
|
||||||
// Number of lines a mouse wheel will scroll
|
|
||||||
items.clear();
|
|
||||||
VarList::push_back(items, "1 line", "1");
|
|
||||||
VarList::push_back(items, "2 lines", "2");
|
|
||||||
VarList::push_back(items, "3 lines", "3");
|
|
||||||
VarList::push_back(items, "4 lines", "4");
|
|
||||||
VarList::push_back(items, "5 lines", "5");
|
|
||||||
VarList::push_back(items, "6 lines", "6");
|
|
||||||
VarList::push_back(items, "7 lines", "7");
|
|
||||||
VarList::push_back(items, "8 lines", "8");
|
|
||||||
VarList::push_back(items, "9 lines", "9");
|
|
||||||
VarList::push_back(items, "10 lines", "10");
|
|
||||||
myWheelLinesPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
|
||||||
items, "Mouse wheel scroll ", lwidth);
|
|
||||||
wid.push_back(myWheelLinesPopup);
|
|
||||||
ypos += lineHeight + 4;
|
|
||||||
|
|
||||||
// Add message concerning usage
|
|
||||||
xpos = HBORDER; ypos += 1*(lineHeight + 4);
|
|
||||||
lwidth = ifont.getStringWidth("(*) Requires application restart");
|
|
||||||
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
|
|
||||||
"(*) Requires application restart",
|
|
||||||
TextAlign::Left);
|
|
||||||
|
|
||||||
// Add items for tab 2
|
|
||||||
addToFocusList(wid, myTab, tabID);
|
addToFocusList(wid, myTab, tabID);
|
||||||
|
|
||||||
// Activate the first tab
|
// Activate the first tab
|
||||||
|
|
|
@ -47,15 +47,15 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
buttonWidth = font.getStringWidth("Defaults") + 20,
|
buttonWidth = font.getStringWidth("Defaults") + 20,
|
||||||
buttonHeight = font.getLineHeight() + 4;
|
buttonHeight = font.getLineHeight() + 4;
|
||||||
int xpos, ypos, tabID;
|
int xpos, ypos, tabID;
|
||||||
int lwidth = font.getStringWidth("NTSC Aspect "),
|
int lwidth = font.getStringWidth("Interpolation "),
|
||||||
pwidth = font.getStringWidth("XXXXxXXXX"),
|
pwidth = font.getStringWidth("XXXXxXXXX"),
|
||||||
swidth = font.getMaxCharWidth() * 9 - 3;
|
swidth = font.getMaxCharWidth() * 10 - 2;
|
||||||
|
|
||||||
WidgetArray wid;
|
WidgetArray wid;
|
||||||
VariantList items;
|
VariantList items;
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
_w = std::min((52+4*0) * fontWidth + HBORDER * 2, max_w);
|
_w = std::min(53 * fontWidth + HBORDER * 2, max_w);
|
||||||
_h = std::min((16-2) * (lineHeight + VGAP) + 14 + _th, max_h);
|
_h = std::min((16-2) * (lineHeight + VGAP) + 14 + _th, max_h);
|
||||||
|
|
||||||
// The tab widget
|
// The tab widget
|
||||||
|
@ -93,10 +93,10 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// TIA interpolation
|
// TIA interpolation
|
||||||
items.clear();
|
items.clear();
|
||||||
VarList::push_back(items, "Linear", "linear");
|
VarList::push_back(items, "On", "linear");
|
||||||
VarList::push_back(items, "Nearest", "nearest");
|
VarList::push_back(items, "Off", "nearest");
|
||||||
myTIAInterpolate = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
myTIAInterpolate = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
||||||
items, "TIA Inter ", lwidth);
|
items, "Interpolation ", lwidth);
|
||||||
wid.push_back(myTIAInterpolate);
|
wid.push_back(myTIAInterpolate);
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Aspect ratio (NTSC mode)
|
// Aspect ratio (NTSC mode)
|
||||||
myNAspectRatio =
|
myNAspectRatio =
|
||||||
new SliderWidget(myTab, font, xpos, ypos-1,
|
new SliderWidget(myTab, font, xpos, ypos-1, swidth, lineHeight,
|
||||||
"NTSC Aspect ", lwidth, kNAspectRatioChanged);
|
"NTSC Aspect ", lwidth, kNAspectRatioChanged);
|
||||||
myNAspectRatio->setMinValue(80); myNAspectRatio->setMaxValue(120);
|
myNAspectRatio->setMinValue(80); myNAspectRatio->setMaxValue(120);
|
||||||
wid.push_back(myNAspectRatio);
|
wid.push_back(myNAspectRatio);
|
||||||
|
@ -122,7 +122,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Aspect ratio (PAL mode)
|
// Aspect ratio (PAL mode)
|
||||||
myPAspectRatio =
|
myPAspectRatio =
|
||||||
new SliderWidget(myTab, font, xpos, ypos-1,
|
new SliderWidget(myTab, font, xpos, ypos-1, swidth, lineHeight,
|
||||||
"PAL Aspect ", lwidth, kPAspectRatioChanged);
|
"PAL Aspect ", lwidth, kPAspectRatioChanged);
|
||||||
myPAspectRatio->setMinValue(80); myPAspectRatio->setMaxValue(120);
|
myPAspectRatio->setMinValue(80); myPAspectRatio->setMaxValue(120);
|
||||||
wid.push_back(myPAspectRatio);
|
wid.push_back(myPAspectRatio);
|
||||||
|
@ -133,7 +133,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Framerate
|
// Framerate
|
||||||
myFrameRate =
|
myFrameRate =
|
||||||
new SliderWidget(myTab, font, xpos, ypos-1,
|
new SliderWidget(myTab, font, xpos, ypos-1, swidth, lineHeight,
|
||||||
"Framerate ", lwidth, kFrameRateChanged);
|
"Framerate ", lwidth, kFrameRateChanged);
|
||||||
myFrameRate->setMinValue(0); myFrameRate->setMaxValue(900);
|
myFrameRate->setMinValue(0); myFrameRate->setMaxValue(900);
|
||||||
myFrameRate->setStepValue(10);
|
myFrameRate->setStepValue(10);
|
||||||
|
@ -154,7 +154,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
ypos = VBORDER;
|
ypos = VBORDER;
|
||||||
|
|
||||||
// Fullscreen
|
// Fullscreen
|
||||||
myFullscreen = new CheckboxWidget(myTab, font, xpos, ypos, "Fullscreen");
|
myFullscreen = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Fullscreen");
|
||||||
wid.push_back(myFullscreen);
|
wid.push_back(myFullscreen);
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
@ -165,33 +165,33 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
ypos += lineHeight + VGAP;*/
|
ypos += lineHeight + VGAP;*/
|
||||||
|
|
||||||
// FS stretch
|
// FS stretch
|
||||||
myUseStretch = new CheckboxWidget(myTab, font, xpos, ypos, "Fullscreen Fill");
|
myUseStretch = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Fullscreen Fill");
|
||||||
wid.push_back(myUseStretch);
|
wid.push_back(myUseStretch);
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// Use sync to vblank
|
// Use sync to vblank
|
||||||
myUseVSync = new CheckboxWidget(myTab, font, xpos, ypos, "VSync");
|
myUseVSync = new CheckboxWidget(myTab, font, xpos, ypos + 1, "VSync");
|
||||||
wid.push_back(myUseVSync);
|
wid.push_back(myUseVSync);
|
||||||
ypos += (lineHeight + VGAP) * 2;
|
ypos += (lineHeight + VGAP) * 2;
|
||||||
|
|
||||||
// Skip progress load bars for SuperCharger ROMs
|
// Skip progress load bars for SuperCharger ROMs
|
||||||
// Doesn't really belong here, but I couldn't find a better place for it
|
// Doesn't really belong here, but I couldn't find a better place for it
|
||||||
myFastSCBios = new CheckboxWidget(myTab, font, xpos, ypos, "Fast SC/AR BIOS");
|
myFastSCBios = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Fast SC/AR BIOS");
|
||||||
wid.push_back(myFastSCBios);
|
wid.push_back(myFastSCBios);
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// Show UI messages onscreen
|
// Show UI messages onscreen
|
||||||
myUIMessages = new CheckboxWidget(myTab, font, xpos, ypos, "Show UI messages");
|
myUIMessages = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Show UI messages");
|
||||||
wid.push_back(myUIMessages);
|
wid.push_back(myUIMessages);
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// Center window (in windowed mode)
|
// Center window (in windowed mode)
|
||||||
myCenter = new CheckboxWidget(myTab, font, xpos, ypos, "Center window");
|
myCenter = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Center window");
|
||||||
wid.push_back(myCenter);
|
wid.push_back(myCenter);
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// Use multi-threading
|
// Use multi-threading
|
||||||
myUseThreads = new CheckboxWidget(myTab, font, xpos, ypos, "Use multi-threading");
|
myUseThreads = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Use multi-threading");
|
||||||
wid.push_back(myUseThreads);
|
wid.push_back(myUseThreads);
|
||||||
|
|
||||||
// Add items for tab 0
|
// Add items for tab 0
|
||||||
|
@ -203,6 +203,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
tabID = myTab->addTab(" TV Effects ");
|
tabID = myTab->addTab(" TV Effects ");
|
||||||
xpos = HBORDER;
|
xpos = HBORDER;
|
||||||
ypos = VBORDER;
|
ypos = VBORDER;
|
||||||
|
swidth = font.getMaxCharWidth() * 9 - 4;
|
||||||
|
|
||||||
// TV Mode
|
// TV Mode
|
||||||
items.clear();
|
items.clear();
|
||||||
|
@ -221,7 +222,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// Custom adjustables (using macro voodoo)
|
// Custom adjustables (using macro voodoo)
|
||||||
xpos += 8+1; ypos += 0;
|
xpos += fontWidth * 2; ypos += 0;
|
||||||
pwidth = lwidth;
|
pwidth = lwidth;
|
||||||
lwidth = font.getStringWidth("Saturation ");
|
lwidth = font.getStringWidth("Saturation ");
|
||||||
|
|
||||||
|
@ -248,7 +249,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
CREATE_CUSTOM_SLIDERS(Fringe, "Fringing ");
|
CREATE_CUSTOM_SLIDERS(Fringe, "Fringing ");
|
||||||
CREATE_CUSTOM_SLIDERS(Bleed, "Bleeding ");
|
CREATE_CUSTOM_SLIDERS(Bleed, "Bleeding ");
|
||||||
|
|
||||||
xpos += myTVContrast->getWidth() + 4 + myTVContrastLabel->getWidth() + 28;
|
xpos += myTVContrast->getWidth() + 4 + myTVContrastLabel->getWidth() + 32;
|
||||||
ypos = VBORDER;
|
ypos = VBORDER;
|
||||||
|
|
||||||
lwidth = font.getStringWidth("Intensity ");
|
lwidth = font.getStringWidth("Intensity ");
|
||||||
|
|
Loading…
Reference in New Issue