[Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.65,1.66 options.cpp,1.33,1.34
James Brown
ender at users.sourceforge.net
Sun Nov 2 21:28:12 CET 2003
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv20695/gui
Modified Files:
launcher.cpp options.cpp
Log Message:
Fiddling with new tab widget
Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- launcher.cpp 3 Nov 2003 00:24:04 -0000 1.65
+++ launcher.cpp 3 Nov 2003 05:27:53 -0000 1.66
@@ -29,6 +29,8 @@
#include "gui/options.h"
#include "gui/EditTextWidget.h"
#include "gui/ListWidget.h"
+#include "gui/TabWidget.h"
+#include "gui/PopUpWidget.h"
#include "backends/fs/fs.h"
@@ -92,34 +94,65 @@
EditGameDialog::EditGameDialog(const String &domain, GameSettings target)
: Dialog(8, 50, 320 - 2 * 8, 200 - 2 * 40),
_domain(domain) {
+ const int vBorder = 5; // Tab border
- // Determine the description string
+ // GAME: Path to game data (r/o)
+ String path(ConfMan.get("path", _domain));
+
+ // GAME: Determine the description string
String description(ConfMan.get("description", domain));
if (description.isEmpty() && target.description) {
description = target.description;
}
-
- // Label & edit widget for the game ID
- new StaticTextWidget(this, 10, 10, 40, kLineHeight, "ID: ", kTextAlignRight);
- _domainWidget =
- new EditTextWidget(this, 50, 10, _w - 50 - 10, kLineHeight, _domain);
+ // GUI: Add tab widget
+ TabWidget *tab = new TabWidget(this, 0, vBorder, _w, _h - 24 - 2*vBorder);
+ tab->addTab("Game");
- // Label & edit widget for the description
- new StaticTextWidget(this, 10, 26, 40, kLineHeight, "Name: ", kTextAlignRight);
- _descriptionWidget =
- new EditTextWidget(this, 50, 26, _w - 50 - 10, kLineHeight, description);
+ // GUI: Label & edit widget for the game ID
+ new StaticTextWidget(tab, 10, 10, 40, kLineHeight, "ID: ", kTextAlignRight);
+ _domainWidget = new EditTextWidget(tab, 50, 10, _w - 50 - 10, kLineHeight, _domain);
- // Path to game data (view only)
- String path(ConfMan.get("path", _domain));
- new StaticTextWidget(this, 10, 42, 40, kLineHeight, "Path: ", kTextAlignRight);
- new StaticTextWidget(this, 50, 42, _w - 50 - 10, kLineHeight, path, kTextAlignLeft);
+ // GUI: Label & edit widget for the description
+ new StaticTextWidget(tab, 10, 26, 40, kLineHeight, "Name: ", kTextAlignRight);
+ _descriptionWidget = new EditTextWidget(tab, 50, 26, _w - 50 - 10, kLineHeight, description);
- // Full screen checkbox
- _fullscreenCheckbox = new CheckboxWidget(this, 15, 62, 200, 16, "Use Fullscreen Mode", 0, 'F');
+ // GUI: Label for the game path
+ // TODO: Allow editing, and clip to the RIGHT on long paths (to keep meaningful portions)
+ new StaticTextWidget(tab, 10, 42, 40, kLineHeight, "Path: ", kTextAlignRight);
+ new StaticTextWidget(tab, 50, 42, _w - 50 - 10, kLineHeight, path, kTextAlignLeft);
+
+ // TODO: Platform and language dropdowns (?)
+
+ // GUI: Add Graphics tab
+ tab->addTab("Graphics");
+
+ // The GFX mode popup & a label
+ // TODO - add an API to query the list of available GFX modes, and to get/set the mode
+ PopUpWidget *gfxPopUp;
+ gfxPopUp = new PopUpWidget(tab, 5, vBorder, 280, kLineHeight, "Graphics mode: ", 100);
+ gfxPopUp->appendEntry("<global default>");
+ gfxPopUp->appendEntry("");
+ gfxPopUp->appendEntry("Normal (no scaling)");
+ gfxPopUp->appendEntry("2x");
+ gfxPopUp->appendEntry("3x");
+ gfxPopUp->appendEntry("2xSAI");
+ gfxPopUp->appendEntry("Super2xSAI");
+ gfxPopUp->appendEntry("SuperEagle");
+ gfxPopUp->appendEntry("AdvMAME2x");
+ gfxPopUp->appendEntry("TV2x");
+ gfxPopUp->appendEntry("DotMatrix");
+ gfxPopUp->setSelected(0);
+
+ // FIXME - disable GFX popup for now
+ gfxPopUp->setEnabled(false);
+
+ // GUI: Full screen checkbox
+ _fullscreenCheckbox = new CheckboxWidget(tab, 15, 62, 200, 16, "Use Fullscreen Mode", 0, 'F');
_fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain));
- // Add OK & Cancel buttons
+
+ // GUI: Add OK & Cancel buttons
addButton(_w - 2 * (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd, 0);
addButton(_w - (kButtonWidth + 10), _h - 24, "OK", kOKCmd, 0);
}
Index: options.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- options.cpp 3 Nov 2003 01:04:55 -0000 1.33
+++ options.cpp 3 Nov 2003 05:27:53 -0000 1.34
@@ -55,11 +55,11 @@
// - aspect ratio, language, platform, subtitles, debug mode/level, cd drive, joystick, multi midi, native mt32
enum {
- kMasterVolumeChanged = 'mavc',
+ kMasterVolumeChanged = 'mavc',
kMusicVolumeChanged = 'muvc',
kSfxVolumeChanged = 'sfvc',
kChooseSaveDirCmd = 'chos',
- kOKCmd = 'ok '
+ kOKCmd = 'ok '
};
GlobalOptionsDialog::GlobalOptionsDialog(GameDetector &detector)
@@ -80,6 +80,8 @@
//new StaticTextWidget(tab, 5, vBorder+2, 100, kLineHeight, "Graphics mode: ", kTextAlignRight);
PopUpWidget *gfxPopUp;
gfxPopUp = new PopUpWidget(tab, 5, vBorder, 280, kLineHeight, "Graphics mode: ", 100);
+
+ // Ender: We don't really want a <default> here at all, we want to setSelected to the current global
gfxPopUp->appendEntry("<default>");
gfxPopUp->appendEntry("");
gfxPopUp->appendEntry("Normal (no scaling)");
More information about the Scummvm-git-logs
mailing list