updated some dialogs, replaced binary option popups with check boxes and radio buttons

renamed "FAST SC/AR BIOS"
This commit is contained in:
thrust26 2018-01-27 20:31:03 +01:00
parent 8c346a469a
commit 28b31bd3bf
10 changed files with 138 additions and 179 deletions

View File

@ -77,7 +77,7 @@ CommandDialog::CommandDialog(OSystem& osystem, DialogContainer& parent)
// Row 5
xoffset = 10; yoffset += buttonHeight + 8;
b[12] = ADD_CD_BUTTON("NTSC/PAL", kFormatCmd);
b[12] = ADD_CD_BUTTON("TV Format", kFormatCmd);
b[13] = ADD_CD_BUTTON("Palette", kPaletteCmd);
b[14] = ADD_CD_BUTTON("Reload ROM", kReloadRomCmd);

View File

@ -21,6 +21,7 @@
#include "SaveKey.hxx"
#include "Dialog.hxx"
#include "EditTextWidget.hxx"
#include "RadioButtonWidget.hxx"
#include "Launcher.hxx"
#include "OSystem.hxx"
#include "PopUpWidget.hxx"
@ -52,7 +53,7 @@ GameInfoDialog::GameInfoDialog(
const int hBorder = 8;
const int hSpace = 10;
const int vGap = 4;
const int VGAP = 4;
int xpos, ypos, lwidth, fwidth, pwidth, tabID;
WidgetArray wid;
@ -60,8 +61,8 @@ GameInfoDialog::GameInfoDialog(
StaticTextWidget* t;
// Set real dimensions
_w = 52 * fontWidth + 8;
_h = 9 * (lineHeight + vGap) + vBorder * 2 + _th + buttonHeight + fontHeight + ifont.getLineHeight() + 20;
_w = 53 * fontWidth + 8;
_h = 9 * (lineHeight + VGAP) + vBorder * 2 + _th + buttonHeight + fontHeight + ifont.getLineHeight() + 20;
// The tab widget
xpos = hBorder; ypos = vBorder;
@ -69,125 +70,115 @@ GameInfoDialog::GameInfoDialog(
_h - (_th + buttonHeight + fontHeight + ifont.getLineHeight() + 20));
addTabWidget(myTab);
//////////////////////////////////////////////////////////////////////////////
// 1) Cartridge properties
tabID = myTab->addTab("Cartridge");
xpos = hSpace;
lwidth = font.getStringWidth("Manufacturer ");
fwidth = _w - xpos - lwidth - hSpace - hBorder * 2;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Name", TextAlign::Left);
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Name");
myName = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, "");
wid.push_back(myName);
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"MD5", TextAlign::Left);
ypos += lineHeight + VGAP;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "MD5");
myMD5 = new EditTextWidget(myTab, font, xpos + lwidth, ypos-1,
fwidth, lineHeight, "");
myMD5->setEditable(false);
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Manufacturer", TextAlign::Left);
ypos += lineHeight + VGAP;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Manufacturer");
myManufacturer = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, "");
wid.push_back(myManufacturer);
ypos += lineHeight + vGap;
ypos += lineHeight + VGAP;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Model", TextAlign::Left);
myModelNo = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, "");
wid.push_back(myModelNo);
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Rarity", TextAlign::Left);
ypos += lineHeight + VGAP;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Rarity");
myRarity = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, "");
wid.push_back(myRarity);
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Note", TextAlign::Left);
ypos += lineHeight + VGAP;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Note");
myNote = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, "");
wid.push_back(myNote);
ypos += lineHeight + VGAP;
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Sound", TextAlign::Left);
pwidth = font.getStringWidth("Stereo");
items.clear();
VarList::push_back(items, "Mono", "MONO");
VarList::push_back(items, "Stereo", "STEREO");
mySound = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, items, "", 0, 0);
wid.push_back(mySound);
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Type", TextAlign::Left);
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, "Type");
pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)");
items.clear();
for(int i = 0; i < int(BSType::NumSchemes); ++i)
VarList::push_back(items, BSList[i].desc, BSList[i].name);
myType = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, items, "", 0, 0);
pwidth, lineHeight, items, "");
wid.push_back(myType);
ypos += lineHeight + VGAP;
mySound = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Stereo sound");
wid.push_back(mySound);
// Add items for tab 0
addToFocusList(wid, myTab, tabID);
//////////////////////////////////////////////////////////////////////////////
// 2) Console properties
wid.clear();
tabID = myTab->addTab("Console");
xpos = hSpace; ypos = vBorder;
lwidth = font.getStringWidth("Right Difficulty ");
pwidth = font.getStringWidth("B & W");
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Left Difficulty", TextAlign::Left);
items.clear();
VarList::push_back(items, "B", "B");
VarList::push_back(items, "A", "A");
myLeftDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, items, "", 0, 0);
wid.push_back(myLeftDiff);
StaticTextWidget* s = new StaticTextWidget(myTab, font, xpos, ypos+1, "Left difficulty ");
myLeftDiffGroup = new RadioButtonGroup();
RadioButtonWidget* r = new RadioButtonWidget(myTab, font, s->getRight(), ypos + 1,
"A", myLeftDiffGroup);
wid.push_back(r);
ypos += lineHeight;
r = new RadioButtonWidget(myTab, font, s->getRight(), ypos + 1,
"B", myLeftDiffGroup);
wid.push_back(r);
ypos += lineHeight + VGAP * 2;
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Right Difficulty", TextAlign::Left);
// ... use same items as above
myRightDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, items, "", 0, 0);
wid.push_back(myRightDiff);
s = new StaticTextWidget(myTab, font, xpos, ypos+1, "Right difficulty ");
myRightDiffGroup = new RadioButtonGroup();
r = new RadioButtonWidget(myTab, font, s->getRight(), ypos + 1,
"A", myRightDiffGroup);
wid.push_back(r);
ypos += lineHeight;
r = new RadioButtonWidget(myTab, font, s->getRight(), ypos + 1,
"B", myRightDiffGroup);
wid.push_back(r);
ypos += lineHeight + VGAP * 2;
ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"TV Type", TextAlign::Left);
items.clear();
VarList::push_back(items, "Color", "COLOR");
VarList::push_back(items, "B & W", "BW");
myTVType = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, items, "", 0, 0);
wid.push_back(myTVType);
s = new StaticTextWidget(myTab, font, xpos, ypos+1, "TV type ");
myTVTypeGroup = new RadioButtonGroup();
r = new RadioButtonWidget(myTab, font, s->getRight(), ypos + 1,
"Color", myTVTypeGroup);
wid.push_back(r);
ypos += lineHeight;
r = new RadioButtonWidget(myTab, font, s->getRight(), ypos + 1,
"B/W", myTVTypeGroup);
wid.push_back(r);
// Add items for tab 1
addToFocusList(wid, myTab, tabID);
//////////////////////////////////////////////////////////////////////////////
// 3) Controller properties
wid.clear();
tabID = myTab->addTab("Controller");
ypos = vBorder;
pwidth = font.getStringWidth("Paddles_IAxis");
myP0Label = new StaticTextWidget(myTab, font, hSpace, ypos+1,
"P0 Controller ", TextAlign::Left);
myP0Label = new StaticTextWidget(myTab, font, hSpace, ypos+1, "P0 Controller ");
ctrls.clear();
VarList::push_back(ctrls, "Joystick", "JOYSTICK" );
VarList::push_back(ctrls, "Paddles", "PADDLES" );
@ -210,41 +201,34 @@ GameInfoDialog::GameInfoDialog(
pwidth, lineHeight, ctrls, "", 0, kLeftCChanged);
wid.push_back(myP0Controller);
ypos += lineHeight + vGap;
ypos += lineHeight + VGAP;
pwidth = font.getStringWidth("Paddles_IAxis");
myP1Label = new StaticTextWidget(myTab, font, hSpace, ypos+1,
"P1 Controller ", TextAlign::Left);
myP1Label = new StaticTextWidget(myTab, font, hSpace, ypos+1, "P1 Controller ");
myP1Controller = new PopUpWidget(myTab, font, myP1Label->getRight(), myP1Label->getTop()-1,
pwidth, lineHeight, ctrls, "", 0, kRightCChanged);
wid.push_back(myP1Controller);
//ypos += lineHeight + vGap;
mySwapPorts = new CheckboxWidget(myTab, font, myP0Controller->getRight() + fontWidth*5, myP0Controller->getTop()+1,
//ypos += lineHeight + VGAP;
mySwapPorts = new CheckboxWidget(myTab, font, myP0Controller->getRight() + fontWidth*4, myP0Controller->getTop()+1,
"Swap Ports");
wid.push_back(mySwapPorts);
//ypos += lineHeight + vGap;
mySwapPaddles = new CheckboxWidget(myTab, font, myP1Controller->getRight() + fontWidth*5, myP1Controller->getTop()+1,
//ypos += lineHeight + VGAP;
mySwapPaddles = new CheckboxWidget(myTab, font, myP1Controller->getRight() + fontWidth*4, myP1Controller->getTop()+1,
"Swap Paddles");
wid.push_back(mySwapPaddles);
// EEPROM erase button for P0
ypos += lineHeight + vGap + 4;
// EEPROM erase button for P0/P1
ypos += lineHeight + VGAP + 4;
pwidth = myP1Controller->getWidth(); //font.getStringWidth("Erase EEPROM ") + 23;
myEraseEEPROMLabel = new StaticTextWidget(myTab, font, hSpace, ypos, "AtariVox/SaveKey ");
myEraseEEPROMButton = new ButtonWidget(myTab, font, myEraseEEPROMLabel->getRight(), ypos - 4,
"Erase EEPROM", kEEButtonPressed);
pwidth, buttonHeight, "Erase EEPROM", kEEButtonPressed);
wid.push_back(myEraseEEPROMButton);
myEraseEEPROMInfo = new StaticTextWidget(myTab, ifont, myEraseEEPROMButton->getRight() + 4, myEraseEEPROMLabel->getTop() + 3,
"(for this game only)");
myEraseEEPROMInfo = new StaticTextWidget(myTab, ifont, myEraseEEPROMButton->getRight() + 4,
myEraseEEPROMLabel->getTop() + 3, "(for this game only)");
ypos += lineHeight + vGap * 4;
lwidth = font.getStringWidth("Mouse axis mode ");
pwidth = font.getStringWidth("Specific axis");
items.clear();
VarList::push_back(items, "Automatic", "AUTO");
VarList::push_back(items, "Specific axis", "specific");
myMouseControl =
new PopUpWidget(myTab, font, hSpace, ypos, pwidth, lineHeight, items,
"Mouse axis mode ", lwidth, kMCtrlChanged);
ypos += lineHeight + VGAP * 4;
myMouseControl = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Specific mouse axes", kMCtrlChanged);
wid.push_back(myMouseControl);
// Mouse controller specific axis
@ -260,41 +244,36 @@ GameInfoDialog::GameInfoDialog(
VarList::push_back(items, "MindLink 0", MouseControl::MindLink0);
VarList::push_back(items, "MindLink 1", MouseControl::MindLink1);
xpos = hSpace + lwidth;
lwidth = font.getStringWidth("X-Axis is ");
xpos -= lwidth;
ypos += lineHeight + vGap;
xpos += 20;
ypos += lineHeight + VGAP;
myMouseX = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items,
"X-Axis is ");
wid.push_back(myMouseX);
ypos += lineHeight + vGap;
ypos += lineHeight + VGAP;
myMouseY = new PopUpWidget(myTab, font, myMouseX->getLeft(), ypos, pwidth, lineHeight, items,
"Y-Axis is ");
wid.push_back(myMouseY);
xpos = hSpace; ypos += lineHeight + vGap;
xpos = hSpace; ypos += lineHeight + VGAP;
lwidth = font.getStringWidth("Mouse axis range ");
myMouseRange = new SliderWidget(myTab, font, hSpace, ypos,
"Mouse axis range ", lwidth, kMRangeChanged);
"Mouse axis range ", lwidth, 0, fontWidth * 3);
myMouseRange->setMinValue(1); myMouseRange->setMaxValue(100);
wid.push_back(myMouseRange);
myMouseRangeLabel = new StaticTextWidget(myTab, font,
myMouseRange->getRight() + 4, myMouseRange->getTop()+1,
" ", TextAlign::Left);
// Add items for tab 2
addToFocusList(wid, myTab, tabID);
//////////////////////////////////////////////////////////////////////////////
// 4) Display properties
wid.clear();
tabID = myTab->addTab("Display");
ypos = vBorder;
pwidth = font.getStringWidth("Auto-detect");
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Format ", TextAlign::Left);
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Format ");
items.clear();
VarList::push_back(items, "Auto-detect", "AUTO");
VarList::push_back(items, "NTSC", "NTSC");
@ -307,28 +286,28 @@ GameInfoDialog::GameInfoDialog(
pwidth, lineHeight, items, "", 0, 0);
wid.push_back(myFormat);
ypos += lineHeight + vGap;
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "YStart ", TextAlign::Left);
ypos += lineHeight + VGAP;
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "YStart ");
myYStart = new SliderWidget(myTab, font, t->getRight(), ypos,
"", 0, kYStartChanged);
myYStart->setMinValue(TIAConstants::minYStart-1);
myYStart->setMaxValue(TIAConstants::maxYStart);
wid.push_back(myYStart);
myYStartLabel = new StaticTextWidget(myTab, font, myYStart->getRight() + 4,
ypos+1, 5*fontWidth, fontHeight, "", TextAlign::Left);
ypos+1, 5*fontWidth, fontHeight);
ypos += lineHeight + vGap;
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Height ", TextAlign::Left);
ypos += lineHeight + VGAP;
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Height ");
myHeight = new SliderWidget(myTab, font, t->getRight(), ypos,
"", 0, kHeightChanged);
myHeight->setMinValue(TIAConstants::minViewableHeight-1);
myHeight->setMaxValue(TIAConstants::maxViewableHeight);
wid.push_back(myHeight);
myHeightLabel = new StaticTextWidget(myTab, font, myHeight->getRight() + 4,
ypos+1, 5*fontWidth, fontHeight, "", TextAlign::Left);
ypos+1, 5*fontWidth, fontHeight);
// Phosphor
ypos += lineHeight + vGap*4;
ypos += lineHeight + VGAP*4;
myPhosphor = new CheckboxWidget(myTab, font, hSpace, ypos+1, "Phosphor", kPhosphorChanged);
wid.push_back(myPhosphor);
@ -339,8 +318,7 @@ GameInfoDialog::GameInfoDialog(
wid.push_back(myPPBlend);
myPPBlendLabel = new StaticTextWidget(myTab, font,
myPPBlend->getRight() + 4, myPhosphor->getTop(),
5*fontWidth, fontHeight, "", TextAlign::Left);
myPPBlend->getRight() + 4, myPhosphor->getTop(), " ");
// Add items for tab 3
addToFocusList(wid, myTab, tabID);
@ -352,9 +330,7 @@ GameInfoDialog::GameInfoDialog(
// Add message concerning usage
lwidth = ifont.getStringWidth("(*) Changes to properties require a ROM reload");
new StaticTextWidget(this, ifont, hSpace, _h - (buttonHeight + fontHeight + 20),
lwidth, fontHeight,
"(*) Changes to properties require a ROM reload",
TextAlign::Left);
"(*) Changes to properties require a ROM reload");
// Add Defaults, OK and Cancel buttons
wid.clear();
@ -401,13 +377,13 @@ void GameInfoDialog::loadView()
myModelNo->setText(myGameProperties.get(Cartridge_ModelNo));
myRarity->setText(myGameProperties.get(Cartridge_Rarity));
myNote->setText(myGameProperties.get(Cartridge_Note));
mySound->setSelected(myGameProperties.get(Cartridge_Sound), "MONO");
mySound->setState(myGameProperties.get(Cartridge_Sound) == "STEREO");
myType->setSelected(myGameProperties.get(Cartridge_Type), "AUTO");
// Console properties
myLeftDiff->setSelected(myGameProperties.get(Console_LeftDifficulty), "B");
myRightDiff->setSelected(myGameProperties.get(Console_RightDifficulty), "B");
myTVType->setSelected(myGameProperties.get(Console_TelevisionType), "COLOR");
myLeftDiffGroup->setSelected(myGameProperties.get(Console_LeftDifficulty) == "A" ? 0 : 1);
myRightDiffGroup->setSelected(myGameProperties.get(Console_RightDifficulty) == "A" ? 0 : 1);
myTVTypeGroup->setSelected(myGameProperties.get(Console_TelevisionType) == "BW" ? 1 : 0);
// Controller properties
myP0Controller->setSelected(myGameProperties.get(Controller_Left), "JOYSTICK");
@ -420,15 +396,16 @@ void GameInfoDialog::loadView()
string m_control, m_range;
m_axis >> m_control;
bool autoAxis = BSPF::equalsIgnoreCase(m_control, "AUTO");
myMouseControl->setState(!autoAxis);
if(autoAxis)
{
myMouseControl->setSelectedIndex(0);
//myMouseControl->setSelectedIndex(0);
myMouseX->setSelectedIndex(0);
myMouseY->setSelectedIndex(0);
}
else
{
myMouseControl->setSelectedIndex(1);
//myMouseControl->setSelectedIndex(1);
myMouseX->setSelected(m_control[0] - '0');
myMouseY->setSelected(m_control[1] - '0');
}
@ -437,12 +414,10 @@ void GameInfoDialog::loadView()
if(m_axis >> m_range)
{
myMouseRange->setValue(atoi(m_range.c_str()));
myMouseRangeLabel->setLabel(m_range);
}
else
{
myMouseRange->setValue(100);
myMouseRangeLabel->setLabel("100");
}
// Display properties
@ -480,13 +455,13 @@ void GameInfoDialog::saveConfig()
myGameProperties.set(Cartridge_ModelNo, myModelNo->getText());
myGameProperties.set(Cartridge_Rarity, myRarity->getText());
myGameProperties.set(Cartridge_Note, myNote->getText());
myGameProperties.set(Cartridge_Sound, mySound->getSelectedTag().toString());
myGameProperties.set(Cartridge_Sound, mySound->getState() ? "STEREO" : "MONO");
myGameProperties.set(Cartridge_Type, myType->getSelectedTag().toString());
// Console properties
myGameProperties.set(Console_LeftDifficulty, myLeftDiff->getSelectedTag().toString());
myGameProperties.set(Console_RightDifficulty, myRightDiff->getSelectedTag().toString());
myGameProperties.set(Console_TelevisionType, myTVType->getSelectedTag().toString());
myGameProperties.set(Console_LeftDifficulty, myLeftDiffGroup->getSelected() ? "B" : "A");
myGameProperties.set(Console_RightDifficulty, myRightDiffGroup->getSelected() ? "B" : "A");
myGameProperties.set(Console_TelevisionType, myTVTypeGroup->getSelected() ? "BW" : "COLOR");
// Controller properties
myGameProperties.set(Controller_Left, myP0Controller->getSelectedTag().toString());
@ -495,11 +470,11 @@ void GameInfoDialog::saveConfig()
myGameProperties.set(Controller_SwapPaddles, (mySwapPaddles->isEnabled() && mySwapPaddles->getState()) ? "YES" : "NO");
// MouseAxis property (potentially contains 'range' information)
string mcontrol = myMouseControl->getSelectedTag().toString();
if(mcontrol != "AUTO")
string mcontrol = "AUTO";
if(myMouseControl->getState())
mcontrol = myMouseX->getSelectedTag().toString() +
myMouseY->getSelectedTag().toString();
string range = myMouseRangeLabel->getLabel();
string range = myMouseRange->getValueLabel();
if(range != "100")
mcontrol += " " + range;
myGameProperties.set(Controller_MouseAxis, mcontrol);
@ -659,13 +634,10 @@ void GameInfoDialog::handleCommand(CommandSender* sender, int cmd,
myPPBlendLabel->setValue(myPPBlend->getValue());
break;
case kMRangeChanged:
myMouseRangeLabel->setValue(myMouseRange->getValue());
break;
case kMCtrlChanged:
{
bool state = myMouseControl->getSelectedTag() != "AUTO";
//bool state = myMouseControl->getSelectedTag() != "AUTO";
bool state = myMouseControl->getState();
myMouseX->setEnabled(state);
myMouseY->setEnabled(state);
break;

View File

@ -23,6 +23,7 @@ class GuiObject;
class EditTextWidget;
class PopUpWidget;
class StaticTextWidget;
class RadioButtonGroup;
class TabWidget;
class SliderWidget;
@ -58,13 +59,13 @@ class GameInfoDialog : public Dialog, public CommandSender
EditTextWidget* myModelNo;
EditTextWidget* myRarity;
EditTextWidget* myNote;
PopUpWidget* mySound;
PopUpWidget* myType;
CheckboxWidget* mySound;
// Console properties
PopUpWidget* myLeftDiff;
PopUpWidget* myRightDiff;
PopUpWidget* myTVType;
RadioButtonGroup* myLeftDiffGroup;
RadioButtonGroup* myRightDiffGroup;
RadioButtonGroup* myTVTypeGroup;
// Controller properties
StaticTextWidget* myP0Label;
@ -76,11 +77,10 @@ class GameInfoDialog : public Dialog, public CommandSender
StaticTextWidget* myEraseEEPROMLabel;
ButtonWidget* myEraseEEPROMButton;
StaticTextWidget* myEraseEEPROMInfo;
PopUpWidget* myMouseControl;
CheckboxWidget* myMouseControl;
PopUpWidget* myMouseX;
PopUpWidget* myMouseY;
SliderWidget* myMouseRange;
StaticTextWidget* myMouseRangeLabel;
// Display properties
PopUpWidget* myFormat;
@ -95,7 +95,6 @@ class GameInfoDialog : public Dialog, public CommandSender
enum {
kLeftCChanged = 'LCch',
kRightCChanged = 'RCch',
kMRangeChanged = 'MRch',
kYStartChanged = 'YSch',
kHeightChanged = 'HTch',
kPhosphorChanged = 'PPch',

View File

@ -108,25 +108,17 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
WidgetArray wid;
VariantList items;
const int VGAP = 4;
const int VBORDER = 8;
const int VBORDER = 9;
const int HBORDER = 8;
// Devices/ports
tabID = myTab->addTab("Devices & Ports");
// Stelladaptor mappings
ypos = VBORDER;
lwidth = font.getStringWidth("Digital paddle sensitivity "); // was: "Use mouse as a controller "
pwidth = font.getStringWidth("-UI, -Emulation");
VarList::push_back(items, "Left / Right", "lr");
VarList::push_back(items, "Right / Left", "rl");
mySAPort = new PopUpWidget(myTab, font, HBORDER, ypos, pwidth, lineHeight, items,
"Stelladaptor port order ", lwidth);
wid.push_back(mySAPort);
// Use mouse as controller
ypos += lineHeight + VGAP;
items.clear();
VarList::push_back(items, "Always", "always");
VarList::push_back(items, "Analog devices", "analog");
@ -211,6 +203,12 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
myCtrlCombo = new CheckboxWidget(myTab, font, HBORDER, ypos,
"Use Control key combos");
wid.push_back(myCtrlCombo);
ypos += lineHeight + VGAP;
// Stelladaptor mappings
mySAPort = new CheckboxWidget(myTab, font, HBORDER, ypos,
"Swap Stelladaptor ports");
wid.push_back(mySAPort);
int fwidth;
@ -251,7 +249,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
void InputDialog::loadConfig()
{
// Left & right ports
mySAPort->setSelected(instance().settings().getString("saport"), "lr");
mySAPort->setState(instance().settings().getString("saport") == "rl");
// Use mouse as a controller
myMouseControl->setSelected(
@ -305,7 +303,7 @@ void InputDialog::loadConfig()
void InputDialog::saveConfig()
{
// Left & right ports
instance().eventHandler().mapStelladaptors(mySAPort->getSelectedTag().toString());
instance().eventHandler().mapStelladaptors(mySAPort->getState() ? "rl": "lr");
// Use mouse as a controller
const string& usemouse = myMouseControl->getSelectedTag().toString();
@ -364,7 +362,7 @@ void InputDialog::setDefaults()
case 2: // Virtual devices
{
// Left & right ports
mySAPort->setSelected("lr");
mySAPort->setState(false);
// Use mouse as a controller
myMouseControl->setSelected("analog");

View File

@ -73,7 +73,7 @@ class InputDialog : public Dialog
EventMappingWidget* myEmulEventMapper;
EventMappingWidget* myMenuEventMapper;
PopUpWidget* mySAPort;
CheckboxWidget* mySAPort;
PopUpWidget* myMouseControl;
PopUpWidget* myCursorState;

View File

@ -33,7 +33,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
{
const int VBORDER = 10;
const int HBORDER = 10;
const int INDENT = 20;
const int INDENT = 16;
const int V_GAP = 4;
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
@ -69,16 +69,10 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(mySnapLoadPath);
// Snapshot naming
lwidth = font.getStringWidth("Continuous snapshot interval ");
fwidth = font.getStringWidth("internal database");
VariantList items;
VarList::push_back(items, "actual ROM name", "rom");
VarList::push_back(items, "internal database", "int");
xpos = HBORDER; ypos += buttonHeight + V_GAP * 4;
mySnapName =
new PopUpWidget(this, font, xpos, ypos, fwidth, lineHeight, items,
"Save snapshots according to ", lwidth);
wid.push_back(mySnapName);
VariantList items;
lwidth = font.getStringWidth("Continuous snapshot interval ");
fwidth = font.getStringWidth("10 seconds");
// Snapshot interval (continuous mode)
items.clear();
@ -92,7 +86,6 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
VarList::push_back(items, "8 seconds", "8");
VarList::push_back(items, "9 seconds", "9");
VarList::push_back(items, "10 seconds", "10");
ypos += buttonHeight;
mySnapInterval =
new PopUpWidget(this, font, xpos, ypos, fwidth, lineHeight, items,
"Continuous snapshot interval ", lwidth);
@ -106,6 +99,10 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
// Snapshot single or multiple saves
xpos += INDENT; ypos += lineHeight + V_GAP;
mySnapName = new CheckboxWidget(this, font, xpos, ypos, "Use actualy ROM name");
wid.push_back(mySnapName);
ypos += lineHeight + V_GAP;
mySnapSingle = new CheckboxWidget(this, font, xpos, ypos,
"Overwrite existing files");
wid.push_back(mySnapSingle);
@ -133,7 +130,7 @@ void SnapshotDialog::loadConfig()
const Settings& settings = instance().settings();
mySnapSavePath->setText(settings.getString("snapsavedir"));
mySnapLoadPath->setText(settings.getString("snaploaddir"));
mySnapName->setSelected(instance().settings().getString("snapname"), "int");
mySnapName->setState(instance().settings().getString("snapname") == "rom");
mySnapInterval->setSelected(instance().settings().getString("ssinterval"), "2");
mySnapSingle->setState(settings.getBool("sssingle"));
mySnap1x->setState(settings.getBool("ss1x"));
@ -144,8 +141,7 @@ void SnapshotDialog::saveConfig()
{
instance().settings().setValue("snapsavedir", mySnapSavePath->getText());
instance().settings().setValue("snaploaddir", mySnapLoadPath->getText());
instance().settings().setValue("snapname",
mySnapName->getSelectedTag().toString());
instance().settings().setValue("snapname", mySnapName->getState() ? "rom" : "int");
instance().settings().setValue("sssingle", mySnapSingle->getState());
instance().settings().setValue("ss1x", mySnap1x->getState());
instance().settings().setValue("ssinterval",

View File

@ -60,7 +60,8 @@ class SnapshotDialog : public Dialog
EditTextWidget* mySnapSavePath;
EditTextWidget* mySnapLoadPath;
PopUpWidget* mySnapName;
//PopUpWidget* mySnapName;
CheckboxWidget* mySnapName;
PopUpWidget* mySnapInterval;
CheckboxWidget* mySnapSingle;

View File

@ -127,7 +127,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
// 2) Launcher options
wid.clear();
tabID = myTab->addTab(" Launcher ");
lwidth = font.getStringWidth("Exit to Launcher ");
lwidth = font.getStringWidth("Launcher Height ");
xpos = HBORDER; ypos = VBORDER;
// Launcher width and height
@ -179,14 +179,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
ypos += lineHeight + 4*4;
// Exit to Launcher
pwidth = font.getStringWidth("If in use");
items.clear();
VarList::push_back(items, "If in use", "0");
VarList::push_back(items, "Always", "1");
myLauncherExitPopup =
new PopUpWidget(myTab, font, xpos, ypos + 1, pwidth, lineHeight, items,
"Exit to Launcher ", lwidth);
wid.push_back(myLauncherExitPopup);
myLauncherExitWidget = new CheckboxWidget(myTab, font, xpos + 1, ypos, "Always exit to Launcher");
wid.push_back(myLauncherExitWidget);
// Add message concerning usage
xpos = HBORDER;
@ -235,7 +229,7 @@ void UIDialog::loadConfig()
// Exit to launcher
bool exitlauncher = instance().settings().getBool("exitlauncher");
myLauncherExitPopup->setSelected(exitlauncher ? "1" : "0", "0");
myLauncherExitWidget->setState(exitlauncher);
// UI palette
const string& pal = instance().settings().getString("uipalette");
@ -269,8 +263,7 @@ void UIDialog::saveConfig()
myRomViewerPopup->getSelectedTag().toString());
// Exit to Launcher
instance().settings().setValue("exitlauncher",
myLauncherExitPopup->getSelectedTag().toString());
instance().settings().setValue("exitlauncher", myLauncherExitWidget->getState());
// UI palette
instance().settings().setValue("uipalette",
@ -302,7 +295,7 @@ void UIDialog::setDefaults()
myLauncherHeightLabel->setValue(h);
myLauncherFontPopup->setSelected("medium", "");
myRomViewerPopup->setSelected("1", "");
myLauncherExitPopup->setSelected("0", "");
myLauncherExitWidget->setState(false);
break;
}

View File

@ -51,7 +51,7 @@ class UIDialog : public Dialog
StaticTextWidget* myLauncherWidthLabel;
SliderWidget* myLauncherHeightSlider;
StaticTextWidget* myLauncherHeightLabel;
PopUpWidget* myLauncherExitPopup;
CheckboxWidget* myLauncherExitWidget;
PopUpWidget* myLauncherFontPopup;
PopUpWidget* myRomViewerPopup;

View File

@ -155,7 +155,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
// Skip progress load bars for SuperCharger ROMs
// Doesn't really belong here, but I couldn't find a better place for it
myFastSCBios = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Fast SC/AR BIOS");
myFastSCBios = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Fast SuperCharger load");
wid.push_back(myFastSCBios);
ypos += lineHeight + VGAP;