aboutsummaryrefslogtreecommitdiff
path: root/gui/launcher.cpp
diff options
context:
space:
mode:
authorMax Horn2002-12-20 22:41:03 +0000
committerMax Horn2002-12-20 22:41:03 +0000
commit189c5405b0d8ed7a395d663524cccadbdc5087bc (patch)
tree54a251b64b4def31e7d4280c058a90e9da84d5ed /gui/launcher.cpp
parentfd7cc14ab235ea5a85ffd26cc1943c4b0fb3d5d5 (diff)
downloadscummvm-rg350-189c5405b0d8ed7a395d663524cccadbdc5087bc.tar.gz
scummvm-rg350-189c5405b0d8ed7a395d663524cccadbdc5087bc.tar.bz2
scummvm-rg350-189c5405b0d8ed7a395d663524cccadbdc5087bc.zip
don't show amiga checkbox for simon games
svn-id: r6031
Diffstat (limited to 'gui/launcher.cpp')
-rw-r--r--gui/launcher.cpp38
1 files changed, 23 insertions, 15 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 1effb014af..6b5f5e90cf 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -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();