mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 08:53:51 +00:00
don't show amiga checkbox for simon games
svn-id: r6031
This commit is contained in:
parent
fd7cc14ab2
commit
189c5405b0
@ -92,17 +92,20 @@ EditGameDialog::EditGameDialog(NewGui *gui, Config &config, const String &domain
|
||||
// Determine the description string
|
||||
String gameid(_config.get("gameid", _domain));
|
||||
String description(_config.get("description", _domain));
|
||||
const VersionSettings *v = version_settings;
|
||||
|
||||
if (gameid.isEmpty())
|
||||
gameid = _domain;
|
||||
if (description.isEmpty()) {
|
||||
const VersionSettings *v = version_settings;
|
||||
while (v->filename) {
|
||||
if (!scumm_stricmp(v->filename, gameid.c_str())) {
|
||||
description = v->gamename;
|
||||
break;
|
||||
}
|
||||
v++;
|
||||
|
||||
// Find the VersionSettings for this gameid
|
||||
while (v->filename) {
|
||||
if (!scumm_stricmp(v->filename, gameid.c_str())) {
|
||||
break;
|
||||
}
|
||||
v++;
|
||||
}
|
||||
if (description.isEmpty()) {
|
||||
description = v->gamename;
|
||||
}
|
||||
|
||||
// Label & edit widget for the game ID
|
||||
@ -120,17 +123,21 @@ EditGameDialog::EditGameDialog(NewGui *gui, Config &config, const String &domain
|
||||
new StaticTextWidget(this, 10, 42, 40, kLineHeight, "Path: ", kTextAlignRight);
|
||||
new StaticTextWidget(this, 50, 42, _w-50-10, kLineHeight, path, kTextAlignLeft);
|
||||
|
||||
// TODO - insert more widgets here; see comments before the class
|
||||
// Full screen checkbox
|
||||
_fullscreenCheckbox = new CheckboxWidget(this, 15, 62, 200, 16, "Use Fullscreen Mode", 0, 'F');
|
||||
_amigaPalCheckbox = new CheckboxWidget(this, 15, 82, 200, 16, "Use Amiga Palette", 0, 'A');
|
||||
_fullscreenCheckbox->setState(_config.getBool("fullscreen", false, _domain));
|
||||
|
||||
// Display 'Amiga' checkbox, but only for Scumm games.
|
||||
if (GID_SIMON_FIRST <= v->id && v->id <= GID_SIMON_LAST) {
|
||||
_amigaPalCheckbox = 0;
|
||||
} else {
|
||||
_amigaPalCheckbox = new CheckboxWidget(this, 15, 82, 200, 16, "Use Amiga Palette", 0, 'A');
|
||||
_amigaPalCheckbox->setState(_config.getBool("amiga", false, _domain));
|
||||
}
|
||||
|
||||
// Add OK & Cancel buttons
|
||||
addButton(_w-2*(kButtonWidth+10), _h-24, "Cancel", kCloseCmd, 0);
|
||||
addButton(_w-(kButtonWidth+10), _h-24, "OK", kOKCmd, 0);
|
||||
|
||||
// Load in settings for the checkboxs
|
||||
_fullscreenCheckbox->setState(_config.getBool("fullscreen", false, _domain));
|
||||
_amigaPalCheckbox->setState(_config.getBool("amiga", false, _domain)); // TODO - only show this checkbox if this is a Scumm game?
|
||||
}
|
||||
|
||||
void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
|
||||
@ -147,7 +154,8 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
|
||||
_config.rename_domain(_domain, newDomain);
|
||||
}
|
||||
_config.set("description", _descriptionWidget->getLabel(), newDomain);
|
||||
_config.setBool("amiga", _amigaPalCheckbox->getState(), newDomain);
|
||||
if (_amigaPalCheckbox)
|
||||
_config.setBool("amiga", _amigaPalCheckbox->getState(), newDomain);
|
||||
_config.setBool("fullscreen", _fullscreenCheckbox->getState(), newDomain);
|
||||
setResult(1);
|
||||
close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user