[Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.17,1.18 launcher.cpp,1.5,1.6

Max Horn fingolfin at users.sourceforge.net
Sun Oct 13 04:52:04 CEST 2002


Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv7653

Modified Files:
	dialog.cpp launcher.cpp 
Log Message:
some more launcher tweaks

Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- dialog.cpp	12 Oct 2002 00:26:24 -0000	1.17
+++ dialog.cpp	13 Oct 2002 11:51:48 -0000	1.18
@@ -257,6 +257,6 @@
 
 Widget *Dialog::addButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey)
 {
-	return new ButtonWidget(this, x, y, 54, 16, label, cmd, hotkey);
+	return new ButtonWidget(this, x, y, kButtonWidth, 16, label, cmd, hotkey);
 }
 

Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- launcher.cpp	12 Oct 2002 00:26:24 -0000	1.5
+++ launcher.cpp	13 Oct 2002 11:51:48 -0000	1.6
@@ -30,6 +30,7 @@
 enum {
 	kStartCmd = 'STRT',
 	kOptionsCmd = 'OPTN',
+	kAddGameCmd = 'ADDG',
 	kQuitCmd = 'QUIT'
 };
 	
@@ -47,20 +48,29 @@
 LauncherDialog::LauncherDialog(NewGui *gui, GameDetector &detector)
 	: Dialog(gui, 0, 0, 320, 200), _detector(detector)
 {
+	Widget *bw;
+
+	// Show game name
+	new StaticTextWidget(this, 10, 8, 300, kLineHeight,
+								"ScummVM "SCUMMVM_VERSION " (" SCUMMVM_CVS ")", 
+								kTextAlignCenter);
+
 	// Add three buttons at the bottom
-	addButton(1*(_w - 54)/6, _h - 24, "Quit", kQuitCmd, 'Q');
-	addButton(3*(_w - 54)/6, _h - 24, "Options", kOptionsCmd, 'O');
-	_startButton = addButton(5*(_w - 54)/6, _h - 24, "Start", kStartCmd, 'S');
+	bw = addButton(1*(_w - kButtonWidth)/6, _h - 24, "Quit", kQuitCmd, 'Q');
+	bw = addButton(3*(_w - kButtonWidth)/6, _h - 24, "Options", kOptionsCmd, 'O');
+	bw->setEnabled(false);
+	_startButton = addButton(5*(_w - kButtonWidth)/6, _h - 24, "Start", kStartCmd, 'S');
 	_startButton->setEnabled(false);
 
 	// Add list with game titles
-	_list = new ListWidget(this, 10, 10, 300, 112);
+	_list = new ListWidget(this, 10, 28, 300, 112);
 	_list->setEditable(false);
 	_list->setNumberingMode(kListNumberingOff);
 	
 	const VersionSettings *v = version_settings;
 	ScummVM::StringList l;
 
+	// TODO - sort by name ?
 	// TODO - maybe only display those games for which settings are known
 	// (i.e. a path to the game data was set and is accesible) ?
 	while (v->filename && v->gamename) {
@@ -73,6 +83,11 @@
 
 	_list->setList(l);
 //	_list->setSelected(0);
+
+	// Two more buttons directly below the list box
+	bw = new ButtonWidget(this, 10, 144, 80, 16, "Add Game...", kAddGameCmd, 'A');
+	bw->setEnabled(false);
+//	addButton(20 + 4 + kButtonWidth, 144, "Change Setting...");
 }
 
 void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)





More information about the Scummvm-git-logs mailing list