added ellipsis to buttons which open another dialog

added ellipsis character to large, medium and small fonts
This commit is contained in:
thrust26 2017-10-04 10:42:37 +02:00
parent d99d3a16f5
commit af30b05734
12 changed files with 337 additions and 94 deletions

View File

@ -57,13 +57,13 @@ CheatCodeDialog::CheatCodeDialog(OSystem& osystem, DialogContainer& parent,
xpos += myCheatList->getWidth() + 5; ypos = 15; xpos += myCheatList->getWidth() + 5; ypos = 15;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Add", kAddCheatCmd); "Add" + ELLIPSIS, kAddCheatCmd);
wid.push_back(b); wid.push_back(b);
ypos += lineHeight + 10; ypos += lineHeight + 10;
myEditButton = myEditButton =
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Edit", kEditCheatCmd); "Edit" + ELLIPSIS, kEditCheatCmd);
wid.push_back(myEditButton); wid.push_back(myEditButton);
ypos += lineHeight + 10; ypos += lineHeight + 10;
@ -74,7 +74,7 @@ CheatCodeDialog::CheatCodeDialog(OSystem& osystem, DialogContainer& parent,
ypos += lineHeight + 10; ypos += lineHeight + 10;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"One shot", kAddOneShotCmd); "One shot" + ELLIPSIS, kAddOneShotCmd);
wid.push_back(b); wid.push_back(b);
// Inputbox which will pop up when adding/editing a cheat // Inputbox which will pop up when adding/editing a cheat

View File

@ -41,6 +41,7 @@ ConfigPathDialog::ConfigPathDialog(
buttonWidth = font.getStringWidth("Properties file") + 20, buttonWidth = font.getStringWidth("Properties file") + 20,
buttonHeight = font.getLineHeight() + 4; buttonHeight = font.getLineHeight() + 4;
const int vBorder = 8; const int vBorder = 8;
const int hBorder = 10;
int xpos, ypos; int xpos, ypos;
WidgetArray wid; WidgetArray wid;
ButtonWidget* b; ButtonWidget* b;
@ -49,12 +50,12 @@ ConfigPathDialog::ConfigPathDialog(
_w = 56 * fontWidth + 8; _w = 56 * fontWidth + 8;
_h = 9 * (lineHeight + 4) + 10; _h = 9 * (lineHeight + 4) + 10;
xpos = vBorder; ypos = vBorder; xpos = hBorder; ypos = vBorder;
// ROM path // ROM path
ButtonWidget* romButton = ButtonWidget* romButton =
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Rom path", kChooseRomDirCmd); "Rom path" + ELLIPSIS, kChooseRomDirCmd);
wid.push_back(romButton); wid.push_back(romButton);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
myRomPath = new EditTextWidget(this, font, xpos, ypos + 2, myRomPath = new EditTextWidget(this, font, xpos, ypos + 2,
@ -62,9 +63,9 @@ ConfigPathDialog::ConfigPathDialog(
wid.push_back(myRomPath); wid.push_back(myRomPath);
// Cheat file // Cheat file
xpos = vBorder; ypos += romButton->getHeight() + 3; xpos = hBorder; ypos += romButton->getHeight() + 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Cheat file", kChooseCheatFileCmd); "Cheat file" + ELLIPSIS, kChooseCheatFileCmd);
wid.push_back(b); wid.push_back(b);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
myCheatFile = new EditTextWidget(this, font, xpos, ypos + 2, myCheatFile = new EditTextWidget(this, font, xpos, ypos + 2,
@ -72,9 +73,9 @@ ConfigPathDialog::ConfigPathDialog(
wid.push_back(myCheatFile); wid.push_back(myCheatFile);
// Palette file // Palette file
xpos = vBorder; ypos += b->getHeight() + 3; xpos = hBorder; ypos += b->getHeight() + 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Palette file", kChoosePaletteFileCmd); "Palette file" + ELLIPSIS, kChoosePaletteFileCmd);
wid.push_back(b); wid.push_back(b);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
myPaletteFile = new EditTextWidget(this, font, xpos, ypos + 2, myPaletteFile = new EditTextWidget(this, font, xpos, ypos + 2,
@ -82,9 +83,9 @@ ConfigPathDialog::ConfigPathDialog(
wid.push_back(myPaletteFile); wid.push_back(myPaletteFile);
// Properties file // Properties file
xpos = vBorder; ypos += b->getHeight() + 3; xpos = hBorder; ypos += b->getHeight() + 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Properties file", kChoosePropsFileCmd); "Properties file" + ELLIPSIS, kChoosePropsFileCmd);
wid.push_back(b); wid.push_back(b);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
myPropsFile = new EditTextWidget(this, font, xpos, ypos + 2, myPropsFile = new EditTextWidget(this, font, xpos, ypos + 2,
@ -92,9 +93,9 @@ ConfigPathDialog::ConfigPathDialog(
wid.push_back(myPropsFile); wid.push_back(myPropsFile);
// State directory // State directory
xpos = vBorder; ypos += b->getHeight() + 3; xpos = hBorder; ypos += b->getHeight() + 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"State path", kChooseStateDirCmd); "State path" + ELLIPSIS, kChooseStateDirCmd);
wid.push_back(b); wid.push_back(b);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
myStatePath = new EditTextWidget(this, font, xpos, ypos + 2, myStatePath = new EditTextWidget(this, font, xpos, ypos + 2,
@ -102,9 +103,9 @@ ConfigPathDialog::ConfigPathDialog(
wid.push_back(myStatePath); wid.push_back(myStatePath);
// NVRAM directory // NVRAM directory
xpos = vBorder; ypos += b->getHeight() + 3; xpos = hBorder; ypos += b->getHeight() + 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"NVRAM path", kChooseNVRamDirCmd); "NVRAM path" + ELLIPSIS, kChooseNVRamDirCmd);
wid.push_back(b); wid.push_back(b);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
myNVRamPath = new EditTextWidget(this, font, xpos, ypos + 2, myNVRamPath = new EditTextWidget(this, font, xpos, ypos + 2,

View File

@ -42,6 +42,41 @@ namespace GUI {
// Font character bitmap data. // Font character bitmap data.
static const uInt16 console_font_bits[] = { static const uInt16 console_font_bits[] = {
/* MODIFIED
Character 29 (0x1d):
width 8
bbx ( 8, 13, 0, -2 )
+--------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|XX XX XX|
| |
| |
+--------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0b1101101100000000,
0x0000,
0x0000,
/* MODIFIED /* MODIFIED
Character 30 (0x1e): large centered rounded rectangle Character 30 (0x1e): large centered rounded rectangle
width 8 width 8
@ -3350,8 +3385,8 @@ static const FontDesc consoleDesc = {
13, 13,
8, 13, 0, -2, 8, 13, 0, -2,
11, 11,
30, 29,
97, 98,
console_font_bits, console_font_bits,
0, /* no encode table*/ 0, /* no encode table*/
0, /* fixed width*/ 0, /* fixed width*/

View File

@ -62,7 +62,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
xpos += myActionsList->getWidth() + 5; ypos += 5; xpos += myActionsList->getWidth() + 5; ypos += 5;
myMapButton = new ButtonWidget(boss, font, xpos, ypos, myMapButton = new ButtonWidget(boss, font, xpos, ypos,
buttonWidth, buttonHeight, buttonWidth, buttonHeight,
"Map", kStartMapCmd); "Map" + ELLIPSIS, kStartMapCmd);
myMapButton->setTarget(this); myMapButton->setTarget(this);
addFocusWidget(myMapButton); addFocusWidget(myMapButton);

View File

@ -95,6 +95,9 @@ class GuiObject : public CommandReceiver
/** Redraw the focus list */ /** Redraw the focus list */
virtual void redrawFocus() { } virtual void redrawFocus() { }
/** special character for menues */
const string& ELLIPSIS = "\x1d";
protected: protected:
virtual void releaseFocus() = 0; virtual void releaseFocus() = 0;
virtual void draw() = 0; virtual void draw() = 0;

View File

@ -101,39 +101,41 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
int xpos, ypos, lwidth, pwidth, tabID; int xpos, ypos, lwidth, pwidth, tabID;
WidgetArray wid; WidgetArray wid;
VariantList items; VariantList items;
const int vGap = 4;
const int hSpace = 8;
// Devices/ports // Devices/ports
tabID = myTab->addTab("Devices & Ports"); tabID = myTab->addTab("Devices & Ports");
// Stelladaptor mappings // Stelladaptor mappings
xpos = 5+3; ypos = 5; ypos = vGap+2;
lwidth = font.getStringWidth("Digital paddle sensitivity "); // was: "Use mouse as a controller " lwidth = font.getStringWidth("Digital paddle sensitivity "); // was: "Use mouse as a controller "
pwidth = font.getStringWidth("-UI, -Emulation"); pwidth = font.getStringWidth("-UI, -Emulation");
VarList::push_back(items, "Left / Right", "lr"); VarList::push_back(items, "Left / Right", "lr");
VarList::push_back(items, "Right / Left", "rl"); VarList::push_back(items, "Right / Left", "rl");
mySAPort = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, mySAPort = new PopUpWidget(myTab, font, hSpace, ypos, pwidth, lineHeight, items,
"Stelladaptor port order ", lwidth); "Stelladaptor port order ", lwidth);
wid.push_back(mySAPort); wid.push_back(mySAPort);
// Use mouse as controller // Use mouse as controller
ypos += lineHeight + 5; ypos += lineHeight + vGap;
items.clear(); items.clear();
VarList::push_back(items, "Always", "always"); VarList::push_back(items, "Always", "always");
VarList::push_back(items, "Analog devices", "analog"); VarList::push_back(items, "Analog devices", "analog");
VarList::push_back(items, "Never", "never"); VarList::push_back(items, "Never", "never");
myMouseControl = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, myMouseControl = new PopUpWidget(myTab, font, hSpace, ypos, pwidth, lineHeight, items,
"Use mouse as a controller ", lwidth); "Use mouse as a controller ", lwidth);
wid.push_back(myMouseControl); wid.push_back(myMouseControl);
// Mouse cursor state // Mouse cursor state
ypos += lineHeight + 5; ypos += lineHeight + vGap;
items.clear(); items.clear();
VarList::push_back(items, "-UI, -Emulation", "0"); VarList::push_back(items, "-UI, -Emulation", "0");
VarList::push_back(items, "-UI, +Emulation", "1"); VarList::push_back(items, "-UI, +Emulation", "1");
VarList::push_back(items, "+UI, -Emulation", "2"); VarList::push_back(items, "+UI, -Emulation", "2");
VarList::push_back(items, "+UI, +Emulation", "3"); VarList::push_back(items, "+UI, +Emulation", "3");
myCursorState = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, myCursorState = new PopUpWidget(myTab, font, hSpace, ypos, pwidth, lineHeight, items,
"Mouse cursor visibility ", lwidth); "Mouse cursor visibility ", lwidth);
wid.push_back(myCursorState); wid.push_back(myCursorState);
#ifndef WINDOWED_SUPPORT #ifndef WINDOWED_SUPPORT
@ -144,61 +146,61 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
pwidth = font.getMaxCharWidth() * 8; pwidth = font.getMaxCharWidth() * 8;
// Add joystick deadzone setting // Add joystick deadzone setting
ypos += lineHeight + 8; ypos += lineHeight + vGap*3;
myDeadzone = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, myDeadzone = new SliderWidget(myTab, font, hSpace, ypos, pwidth, lineHeight,
"Joystick deadzone size ", lwidth, kDeadzoneChanged); "Joystick deadzone size ", lwidth, kDeadzoneChanged);
myDeadzone->setMinValue(0); myDeadzone->setMaxValue(29); myDeadzone->setMinValue(0); myDeadzone->setMaxValue(29);
xpos += myDeadzone->getWidth() + 5; xpos = hSpace + myDeadzone->getWidth() + 5;
myDeadzoneLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 5*fontWidth, myDeadzoneLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 5*fontWidth,
lineHeight, "", kTextAlignLeft); lineHeight, "", kTextAlignLeft);
myDeadzoneLabel->setFlags(WIDGET_CLEARBG); myDeadzoneLabel->setFlags(WIDGET_CLEARBG);
wid.push_back(myDeadzone); wid.push_back(myDeadzone);
// Add paddle speed (digital emulation) // Add paddle speed (digital emulation)
xpos = 5+3; ypos += lineHeight + 4; ypos += lineHeight + vGap;
myDPaddleSpeed = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, myDPaddleSpeed = new SliderWidget(myTab, font, hSpace, ypos, pwidth, lineHeight,
"Digital paddle sensitivity ", "Digital paddle sensitivity ",
lwidth, kDPSpeedChanged); lwidth, kDPSpeedChanged);
myDPaddleSpeed->setMinValue(1); myDPaddleSpeed->setMaxValue(20); myDPaddleSpeed->setMinValue(1); myDPaddleSpeed->setMaxValue(20);
xpos += myDPaddleSpeed->getWidth() + 5; xpos = hSpace + myDPaddleSpeed->getWidth() + 5;
myDPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, myDPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
"", kTextAlignLeft); "", kTextAlignLeft);
myDPaddleLabel->setFlags(WIDGET_CLEARBG); myDPaddleLabel->setFlags(WIDGET_CLEARBG);
wid.push_back(myDPaddleSpeed); wid.push_back(myDPaddleSpeed);
// Add paddle speed (mouse emulation) // Add paddle speed (mouse emulation)
xpos = 5+3; ypos += lineHeight + 4; ypos += lineHeight + vGap;
myMPaddleSpeed = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, myMPaddleSpeed = new SliderWidget(myTab, font, hSpace, ypos, pwidth, lineHeight,
"Mouse paddle sensitivity ", "Mouse paddle sensitivity ",
lwidth, kMPSpeedChanged); lwidth, kMPSpeedChanged);
myMPaddleSpeed->setMinValue(1); myMPaddleSpeed->setMaxValue(20); myMPaddleSpeed->setMinValue(1); myMPaddleSpeed->setMaxValue(20);
xpos += myMPaddleSpeed->getWidth() + 5; xpos = hSpace + myMPaddleSpeed->getWidth() + 5;
myMPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, myMPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
"", kTextAlignLeft); "", kTextAlignLeft);
myMPaddleSpeed->setFlags(WIDGET_CLEARBG); myMPaddleSpeed->setFlags(WIDGET_CLEARBG);
wid.push_back(myMPaddleSpeed); wid.push_back(myMPaddleSpeed);
// Add trackball speed // Add trackball speed
xpos = 5+3; ypos += lineHeight + 4; ypos += lineHeight + vGap;
myTrackBallSpeed = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, myTrackBallSpeed = new SliderWidget(myTab, font, hSpace, ypos, pwidth, lineHeight,
"Trackball sensitivity ", "Trackball sensitivity ",
lwidth, kTBSpeedChanged); lwidth, kTBSpeedChanged);
myTrackBallSpeed->setMinValue(1); myTrackBallSpeed->setMaxValue(20); myTrackBallSpeed->setMinValue(1); myTrackBallSpeed->setMaxValue(20);
xpos += myTrackBallSpeed->getWidth() + 5; xpos = hSpace + myTrackBallSpeed->getWidth() + 5;
myTrackBallLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, myTrackBallLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
"", kTextAlignLeft); "", kTextAlignLeft);
myTrackBallSpeed->setFlags(WIDGET_CLEARBG); myTrackBallSpeed->setFlags(WIDGET_CLEARBG);
wid.push_back(myTrackBallSpeed); wid.push_back(myTrackBallSpeed);
// Add 'allow all 4 directions' for joystick // Add 'allow all 4 directions' for joystick
xpos = 10-2; ypos += lineHeight + 12; ypos += lineHeight + 12;
myAllowAll4 = new CheckboxWidget(myTab, font, xpos, ypos, myAllowAll4 = new CheckboxWidget(myTab, font, hSpace, ypos,
"Allow all 4 directions on joystick"); "Allow all 4 directions on joystick");
wid.push_back(myAllowAll4); wid.push_back(myAllowAll4);
// Grab mouse (in windowed mode) // Grab mouse (in windowed mode)
ypos += lineHeight + 4; ypos += lineHeight + vGap;
myGrabMouse = new CheckboxWidget(myTab, font, xpos, ypos, myGrabMouse = new CheckboxWidget(myTab, font, hSpace, ypos,
"Grab mouse in emulation mode"); "Grab mouse in emulation mode");
wid.push_back(myGrabMouse); wid.push_back(myGrabMouse);
#ifndef WINDOWED_SUPPORT #ifndef WINDOWED_SUPPORT
@ -206,35 +208,37 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
#endif #endif
// Enable/disable control key-combos // Enable/disable control key-combos
ypos += lineHeight + 4; ypos += lineHeight + vGap;
myCtrlCombo = new CheckboxWidget(myTab, font, xpos, ypos, myCtrlCombo = new CheckboxWidget(myTab, font, hSpace, ypos,
"Use Control key combos"); "Use Control key combos");
wid.push_back(myCtrlCombo); wid.push_back(myCtrlCombo);
int fwidth; int fwidth;
// Add EEPROM erase (part 1/2) // Add EEPROM erase (part 1/2)
fwidth = font.getStringWidth("Erase EEPROM") + 20; ypos += vGap*4;
lwidth = font.getStringWidth("AVox/SaveKey"); fwidth = font.getStringWidth("AtariVox/SaveKey");
new StaticTextWidget(myTab, font, _w - 10 - (fwidth + lwidth) / 2, ypos + 8, lwidth = font.getStringWidth("AtariVox/SaveKey");
"AVox/SaveKey"); new StaticTextWidget(myTab, font, _w - 14 - (fwidth + lwidth) / 2, ypos+2,
"AtariVox/SaveKey");
// Show joystick database // Show joystick database
xpos += 20; ypos += lineHeight + 8; ypos += lineHeight;
myJoyDlgButton = new ButtonWidget(myTab, font, xpos, ypos, 20, myJoyDlgButton = new ButtonWidget(myTab, font, hSpace, ypos, 20,
"Show Joystick Database", kDBButtonPressed); "Joystick database" + ELLIPSIS, kDBButtonPressed);
wid.push_back(myJoyDlgButton); wid.push_back(myJoyDlgButton);
// Add EEPROM erase (part 1/2) // Add EEPROM erase (part 1/2)
myEraseEEPROMButton = new ButtonWidget(myTab, font, _w - 14 - fwidth, ypos, myEraseEEPROMButton = new ButtonWidget(myTab, font, _w - 14 - fwidth, ypos,
fwidth, lineHeight+4,
"Erase EEPROM", kEEButtonPressed); "Erase EEPROM", kEEButtonPressed);
// Add AtariVox serial port // Add AtariVox serial port
xpos -= 20; ypos += lineHeight + 12; ypos += lineHeight + vGap*2;
lwidth = font.getStringWidth("AVox serial port "); lwidth = font.getStringWidth("AVox serial port ");
fwidth = _w - 14 - xpos - lwidth; fwidth = _w - 14 - hSpace - lwidth;
new StaticTextWidget(myTab, font, xpos, ypos, "AVox serial port "); new StaticTextWidget(myTab, font, hSpace, ypos, "AVox serial port ");
myAVoxPort = new EditTextWidget(myTab, font, xpos + lwidth, ypos, myAVoxPort = new EditTextWidget(myTab, font, hSpace + lwidth, ypos,
fwidth, fontHeight, ""); fwidth, fontHeight, "");
wid.push_back(myAVoxPort); wid.push_back(myAVoxPort);

View File

@ -137,7 +137,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(myPrevDirButton); wid.push_back(myPrevDirButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myOptionsButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myOptionsButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Options", kOptionsCmd); "Options" + ELLIPSIS, kOptionsCmd);
wid.push_back(myOptionsButton); wid.push_back(myOptionsButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myQuitButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myQuitButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
@ -149,7 +149,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(myQuitButton); wid.push_back(myQuitButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myOptionsButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myOptionsButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Options", kOptionsCmd); "Options" + ELLIPSIS, kOptionsCmd);
wid.push_back(myOptionsButton); wid.push_back(myOptionsButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myPrevDirButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myPrevDirButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
@ -174,8 +174,8 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
// Create context menu for ROM list options // Create context menu for ROM list options
VariantList l; VariantList l;
VarList::push_back(l, "Power-on options", "override"); VarList::push_back(l, "Power-on options" + ELLIPSIS, "override");
VarList::push_back(l, "Filter listing", "filter"); VarList::push_back(l, "Filter listing" + ELLIPSIS, "filter");
VarList::push_back(l, "Reload listing", "reload"); VarList::push_back(l, "Reload listing", "reload");
myMenu = make_unique<ContextMenu>(this, osystem.frameBuffer().font(), l); myMenu = make_unique<ContextMenu>(this, osystem.frameBuffer().font(), l);

View File

@ -47,7 +47,7 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
myIsGlobal(global) myIsGlobal(global)
{ {
const GUI::Font& font = instance().frameBuffer().font(); const GUI::Font& font = instance().frameBuffer().font();
const int buttonWidth = font.getStringWidth("Snapshot Settings") + 20, const int buttonWidth = font.getStringWidth("Snapshot Settings" + ELLIPSIS) + 20,
buttonHeight = font.getLineHeight() + 6, buttonHeight = font.getLineHeight() + 6,
rowHeight = font.getLineHeight() + 10; rowHeight = font.getLineHeight() + 10;
@ -66,49 +66,49 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
return bw; return bw;
}; };
b = ADD_OD_BUTTON("Video Settings", kVidCmd); b = ADD_OD_BUTTON("Video Settings" + ELLIPSIS, kVidCmd);
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("Audio Settings", kAudCmd); b = ADD_OD_BUTTON("Audio Settings" + ELLIPSIS, kAudCmd);
#ifndef SOUND_SUPPORT #ifndef SOUND_SUPPORT
b->clearFlags(WIDGET_ENABLED); b->clearFlags(WIDGET_ENABLED);
#endif #endif
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("Input Settings", kInptCmd); b = ADD_OD_BUTTON("Input Settings" + ELLIPSIS, kInptCmd);
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("UI Settings", kUsrIfaceCmd); b = ADD_OD_BUTTON("UI Settings" + ELLIPSIS, kUsrIfaceCmd);
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("Snapshot Settings", kSnapCmd); b = ADD_OD_BUTTON("Snapshot Settings" + ELLIPSIS, kSnapCmd);
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("Config Paths", kCfgPathsCmd); b = ADD_OD_BUTTON("Config Paths" + ELLIPSIS, kCfgPathsCmd);
wid.push_back(b); wid.push_back(b);
myRomAuditButton = ADD_OD_BUTTON("Audit ROMs", kAuditCmd); myRomAuditButton = ADD_OD_BUTTON("Audit ROMs" + ELLIPSIS, kAuditCmd);
wid.push_back(myRomAuditButton); wid.push_back(myRomAuditButton);
// Move to second column // Move to second column
xoffset += buttonWidth + 10; yoffset = 10; xoffset += buttonWidth + 10; yoffset = 10;
myGameInfoButton = ADD_OD_BUTTON("Game Properties", kInfoCmd); myGameInfoButton = ADD_OD_BUTTON("Game Properties" + ELLIPSIS, kInfoCmd);
wid.push_back(myGameInfoButton); wid.push_back(myGameInfoButton);
myCheatCodeButton = ADD_OD_BUTTON("Cheat Code", kCheatCmd); myCheatCodeButton = ADD_OD_BUTTON("Cheat Code" + ELLIPSIS, kCheatCmd);
#ifndef CHEATCODE_SUPPORT #ifndef CHEATCODE_SUPPORT
myCheatCodeButton->clearFlags(WIDGET_ENABLED); myCheatCodeButton->clearFlags(WIDGET_ENABLED);
#endif #endif
wid.push_back(myCheatCodeButton); wid.push_back(myCheatCodeButton);
b = ADD_OD_BUTTON("System Logs", kLoggerCmd); b = ADD_OD_BUTTON("System Logs" + ELLIPSIS, kLoggerCmd);
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("Help", kHelpCmd); b = ADD_OD_BUTTON("Help" + ELLIPSIS, kHelpCmd);
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("About", kAboutCmd); b = ADD_OD_BUTTON("About" + ELLIPSIS, kAboutCmd);
wid.push_back(b); wid.push_back(b);
b = ADD_OD_BUTTON("Exit Menu", kExitCmd); b = ADD_OD_BUTTON("Exit Menu", kExitCmd);

View File

@ -34,7 +34,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
{ {
const int lineHeight = font.getLineHeight(), const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(), fontWidth = font.getMaxCharWidth(),
buttonWidth = font.getStringWidth("Save path") + 20, buttonWidth = font.getStringWidth("Save path" + ELLIPSIS) + 20,
buttonHeight = font.getLineHeight() + 4; buttonHeight = font.getLineHeight() + 4;
const int vBorder = 10; const int vBorder = 10;
int xpos, ypos, lwidth, fwidth; int xpos, ypos, lwidth, fwidth;
@ -49,7 +49,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
// Snapshot path (save files) // Snapshot path (save files)
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Save path", kChooseSnapSaveDirCmd); "Save path" + ELLIPSIS, kChooseSnapSaveDirCmd);
wid.push_back(b); wid.push_back(b);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
mySnapSavePath = new EditTextWidget(this, font, xpos, ypos + 2, mySnapSavePath = new EditTextWidget(this, font, xpos, ypos + 2,
@ -59,7 +59,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
// Snapshot path (load files) // Snapshot path (load files)
xpos = vBorder; ypos += buttonHeight + 3; xpos = vBorder; ypos += buttonHeight + 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Load path", kChooseSnapLoadDirCmd); "Load path" + ELLIPSIS, kChooseSnapLoadDirCmd);
wid.push_back(b); wid.push_back(b);
xpos += buttonWidth + 10; xpos += buttonWidth + 10;
mySnapLoadPath = new EditTextWidget(this, font, xpos, ypos + 2, mySnapLoadPath = new EditTextWidget(this, font, xpos, ypos + 2,

View File

@ -42,6 +42,155 @@ namespace GUI {
// Font character bitmap data. // Font character bitmap data.
static const uInt16 stellaLarge_font_bits[] = { static const uInt16 stellaLarge_font_bits[] = {
/* MODIFIED
Character 29 (0x1d):
width 10
bbx ( 10, 20, 0, -4 )
+----------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| XX XX XX |
| XX XX XX |
| XX XX XX |
| |
| |
| |
| |
+----------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0b0110110110000000,
0b0110110110000000,
0b0110110110000000,
0x0000,
0x0000,
0x0000,
0x0000,
/* UNUSED
Character 30 (0x1e):
width 10
bbx ( 10, 20, 0, -4 )
+----------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+----------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
/* UNUSED
Character 31 (0x1f):
width 10
bbx ( 10, 20, 0, -4 )
+----------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+----------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
/* Character 32 (0x20): /* Character 32 (0x20):
width 10 width 10
bbx ( 10, 20, 0, -4 ) bbx ( 10, 20, 0, -4 )
@ -4610,8 +4759,8 @@ static const FontDesc stellaLargeDesc = {
20, 20,
10, 20, 0, -4, 10, 20, 0, -4,
16, 16,
32, 29,
95, 98,
stellaLarge_font_bits, stellaLarge_font_bits,
0, /* no encode table*/ 0, /* no encode table*/
0, /* fixed width*/ 0, /* fixed width*/

View File

@ -42,6 +42,53 @@ namespace GUI {
// Font character bitmap data. // Font character bitmap data.
static const uInt16 stellaMedium_font_bits[] = { static const uInt16 stellaMedium_font_bits[] = {
/* MODIFIED
Character 29 (0x1d): ellipsis
width 9
bbx ( 9, 15, 0, -3 )
+---------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| XX XX XX|
| XX XX XX|
| |
| |
| |
| |
+---------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0b0110110110000000,
0b0110110110000000,
0x0000,
0x0000,
0x0000,
0x0000,
/* MODIFIED /* MODIFIED
Character 30 (0x1e): large centered rounded rectangle Character 30 (0x1e): large centered rounded rectangle
width 9 width 9
@ -4320,8 +4367,8 @@ static const FontDesc stellaMediumDesc = {
18, 18,
9, 18, 0, -4, 9, 18, 0, -4,
14, 14,
30, 29,
97, 98,
stellaMedium_font_bits, stellaMedium_font_bits,
0, /* no encode table*/ 0, /* no encode table*/
0, /* fixed width*/ 0, /* fixed width*/

View File

@ -47,7 +47,9 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
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("NTSC Aspect "),
pwidth = font.getStringWidth("XXXXxXXXX"); pwidth = font.getStringWidth("XXXXxXXXX"),
swidth = 69;
WidgetArray wid; WidgetArray wid;
VariantList items; VariantList items;
@ -220,7 +222,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
ypos += lineHeight + 4; ypos += lineHeight + 4;
// Custom adjustables (using macro voodoo) // Custom adjustables (using macro voodoo)
xpos += 8; ypos += 4; xpos += 8+1; ypos += 0;
pwidth = lwidth; pwidth = lwidth;
lwidth = font.getStringWidth("Saturation "); lwidth = font.getStringWidth("Saturation ");
@ -236,6 +238,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
myTV ## obj->setFlags(WIDGET_CLEARBG); \ myTV ## obj->setFlags(WIDGET_CLEARBG); \
ypos += lineHeight + 4 ypos += lineHeight + 4
pwidth = swidth;
CREATE_CUSTOM_SLIDERS(Contrast, "Contrast "); CREATE_CUSTOM_SLIDERS(Contrast, "Contrast ");
CREATE_CUSTOM_SLIDERS(Bright, "Brightness "); CREATE_CUSTOM_SLIDERS(Bright, "Brightness ");
CREATE_CUSTOM_SLIDERS(Hue, "Hue "); CREATE_CUSTOM_SLIDERS(Hue, "Hue ");
@ -247,7 +250,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() + myTVContrastLabel->getWidth() + 20; xpos += myTVContrast->getWidth() + myTVContrastLabel->getWidth() + 36;
ypos = 8; ypos = 8;
lwidth = font.getStringWidth("Intensity "); lwidth = font.getStringWidth("Intensity ");
@ -263,45 +266,46 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
ypos += lineHeight + 4; ypos += lineHeight + 4;
// TV Phosphor default level // TV Phosphor default level
xpos += 20; xpos += 8-8+16;
pwidth = swidth;
CREATE_CUSTOM_SLIDERS(PhosLevel, "Default "); CREATE_CUSTOM_SLIDERS(PhosLevel, "Default ");
ypos += 4; ypos += 6;
// TV jitter effect // TV jitter effect
xpos -= 20; xpos -= 8-8+16;
myTVJitter = new CheckboxWidget(myTab, font, xpos, ypos, myTVJitter = new CheckboxWidget(myTab, font, xpos, ypos,
"Jitter/Roll Effect", kTVJitterChanged); "Jitter/Roll Effect", kTVJitterChanged);
wid.push_back(myTVJitter); wid.push_back(myTVJitter);
xpos += 20; xpos += 8+8;
ypos += lineHeight; ypos += lineHeight;
CREATE_CUSTOM_SLIDERS(JitterRec, "Recovery "); CREATE_CUSTOM_SLIDERS(JitterRec, "Recovery ");
myTVJitterRec->setMinValue(1); myTVJitterRec->setMaxValue(20); myTVJitterRec->setMinValue(1); myTVJitterRec->setMaxValue(20);
ypos += 4; ypos += 6;
// Scanline intensity and interpolation // Scanline intensity and interpolation
xpos -= 20; xpos -= 8+8;
myTVScanLabel = myTVScanLabel =
new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings"), new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings"),
fontHeight, "Scanline settings", kTextAlignLeft); fontHeight, "Scanline settings", kTextAlignLeft);
ypos += lineHeight; ypos += lineHeight;
xpos += 20; xpos += 8+8;
CREATE_CUSTOM_SLIDERS(ScanIntense, "Intensity "); CREATE_CUSTOM_SLIDERS(ScanIntense, "Intensity ");
myTVScanInterpolate = new CheckboxWidget(myTab, font, xpos, ypos, myTVScanInterpolate = new CheckboxWidget(myTab, font, xpos, ypos,
"Interpolation"); "Interpolation");
wid.push_back(myTVScanInterpolate); wid.push_back(myTVScanInterpolate);
ypos += lineHeight + 4; ypos += lineHeight + 6;
// Adjustable presets // Adjustable presets
xpos -= 20; xpos -= 8+8;
int cloneWidth = font.getStringWidth("Clone Bad Adjust") + 20; int cloneWidth = font.getStringWidth("Clone Bad Adjust") + 20;
#define CREATE_CLONE_BUTTON(obj, desc) \ #define CREATE_CLONE_BUTTON(obj, desc) \
myClone ## obj = \ myClone ## obj = \
new ButtonWidget(myTab, font, xpos, ypos, cloneWidth, buttonHeight,\ new ButtonWidget(myTab, font, xpos, ypos, cloneWidth, buttonHeight,\
desc, kClone ## obj ##Cmd); \ desc, kClone ## obj ##Cmd); \
wid.push_back(myClone ## obj); \ wid.push_back(myClone ## obj); \
ypos += lineHeight + 10 ypos += lineHeight + 8
ypos += 4; ypos += 4;
CREATE_CLONE_BUTTON(Composite, "Clone Composite"); CREATE_CLONE_BUTTON(Composite, "Clone Composite");