[Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.31,1.32
Max Horn
fingolfin at users.sourceforge.net
Fri Dec 20 14:42:02 CET 2002
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv1280
Modified Files:
launcher.cpp
Log Message:
don't show amiga checkbox for simon games
Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- launcher.cpp 14 Dec 2002 01:49:19 -0000 1.31
+++ launcher.cpp 20 Dec 2002 22:41:03 -0000 1.32
@@ -92,17 +92,20 @@
// 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 @@
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 @@
_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();
More information about the Scummvm-git-logs
mailing list