shortened/renamed and slightly reordered OptionsDialog entries

This commit is contained in:
thrust26 2018-01-26 12:29:25 +01:00
parent 67df7caa3b
commit 35275b0104
3 changed files with 22 additions and 23 deletions

View File

@ -314,28 +314,26 @@ void Dialog::drawDialog()
if(!isVisible())
return;
FBSurface& s = surface();
if(_dirty)
{
FBSurface& s = surface();
bool onTop = parent().myDialogStack.top() == this;
if(_flags & WIDGET_CLEARBG)
{
// cerr << "Dialog::drawDialog(): w = " << _w << ", h = " << _h << " @ " << &s << endl << endl;
s.fillRect(_x, _y + _th, _w, _h - _th, kDlgColor);
if(_th)
{
s.fillRect(_x, _y, _w, _th, kColorTitleBar);
s.drawString(*_font, _title, _x + 10, _y + 2 + 1, _font->getStringWidth(_title), kColorTitleText);
/*int lSize = _th * 1 / 2;
int lBorder = (_th - lSize) / 2;
s.line(_w - lSize - lBorder, _y + lBorder, _w - lBorder, _y + lBorder + lSize, kColorTitleText);
s.line(_w - lSize - lBorder + 1, _y + lBorder, _w - lBorder + 1, _y + lBorder + lSize, kColorTitleText);*/
s.fillRect(_x, _y, _w, _th, onTop ? kColorTitleBar : kColorTitleBarLo);
s.drawString(*_font, _title, _x + 10, _y + 2 + 1, _font->getStringWidth(_title),
onTop ? kColorTitleText : kColorTitleTextLo);
}
}
else
s.invalidate();
if(_flags & WIDGET_BORDER)
s.frameRect(_x, _y, _w, _h, kColor);
s.frameRect(_x, _y, _w, _h, onTop ? kColor : kShadowColor);
// Make all child widget dirty
Widget* w = _firstWidget;

View File

@ -53,7 +53,7 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font = instance().frameBuffer().font();
initTitle(font, "Options");
const int buttonWidth = font.getStringWidth("Developer Settings" + ELLIPSIS) + 20,
const int buttonWidth = font.getStringWidth("Game Properties" + ELLIPSIS) + 20,
buttonHeight = font.getLineHeight() + 6,
rowHeight = font.getLineHeight() + 10;
const int VBORDER = 10 + _th;
@ -73,29 +73,30 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
return bw;
};
b = ADD_OD_BUTTON("Video Settings" + ELLIPSIS, kVidCmd);
b = ADD_OD_BUTTON("Video" + ELLIPSIS, kVidCmd);
wid.push_back(b);
b = ADD_OD_BUTTON("Audio Settings" + ELLIPSIS, kAudCmd);
b = ADD_OD_BUTTON("Audio" + ELLIPSIS, kAudCmd);
#ifndef SOUND_SUPPORT
b->clearFlags(WIDGET_ENABLED);
#endif
wid.push_back(b);
b = ADD_OD_BUTTON("Input Settings" + ELLIPSIS, kInptCmd);
b = ADD_OD_BUTTON("Input" + ELLIPSIS, kInptCmd);
wid.push_back(b);
b = ADD_OD_BUTTON("UI Settings" + ELLIPSIS, kUsrIfaceCmd);
b = ADD_OD_BUTTON("User Interface" + ELLIPSIS, kUsrIfaceCmd);
wid.push_back(b);
b = ADD_OD_BUTTON("Snapshot Settings" + ELLIPSIS, kSnapCmd);
b = ADD_OD_BUTTON("Snapshots" + ELLIPSIS, kSnapCmd);
wid.push_back(b);
b = ADD_OD_BUTTON("Config Paths" + ELLIPSIS, kCfgPathsCmd);
b = ADD_OD_BUTTON("Paths" + ELLIPSIS, kCfgPathsCmd);
wid.push_back(b);
b = ADD_OD_BUTTON("Developer" + ELLIPSIS, kDevelopCmd);
wid.push_back(b);
myRomAuditButton = ADD_OD_BUTTON("Audit ROMs" + ELLIPSIS, kAuditCmd);
wid.push_back(myRomAuditButton);
// Move to second column
xoffset += buttonWidth + 10; yoffset = VBORDER;
@ -109,10 +110,10 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
#endif
wid.push_back(myCheatCodeButton);
b = ADD_OD_BUTTON("System Logs" + ELLIPSIS, kLoggerCmd);
wid.push_back(b);
myRomAuditButton = ADD_OD_BUTTON("Audit ROMs" + ELLIPSIS, kAuditCmd);
wid.push_back(myRomAuditButton);
b = ADD_OD_BUTTON("Developer Settings" + ELLIPSIS, kDevelopCmd);
b = ADD_OD_BUTTON("System Logs" + ELLIPSIS, kLoggerCmd);
wid.push_back(b);
b = ADD_OD_BUTTON("Help" + ELLIPSIS, kHelpCmd);
@ -121,7 +122,7 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
b = ADD_OD_BUTTON("About" + ELLIPSIS, kAboutCmd);
wid.push_back(b);
b = ADD_OD_BUTTON("Exit Menu", kExitCmd);
b = ADD_OD_BUTTON("Close", kExitCmd);
wid.push_back(b);
addCancelWidget(b);

View File

@ -35,7 +35,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font)
: Dialog(osystem, parent, font, "UI settings")
: Dialog(osystem, parent, font, "User interface settings")
{
const GUI::Font& ifont = instance().frameBuffer().infoFont();
const int lineHeight = font.getLineHeight(),