aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2002-10-13 11:51:48 +0000
committerMax Horn2002-10-13 11:51:48 +0000
commit42c7315eed1075cfb5a56bddc37c8e5c63c9c051 (patch)
tree1610a3163648070a3333fcb93dffffa894dddc52 /gui
parentf5d2dd45f6cbf1841c83e51f2d1644c362495099 (diff)
downloadscummvm-rg350-42c7315eed1075cfb5a56bddc37c8e5c63c9c051.tar.gz
scummvm-rg350-42c7315eed1075cfb5a56bddc37c8e5c63c9c051.tar.bz2
scummvm-rg350-42c7315eed1075cfb5a56bddc37c8e5c63c9c051.zip
some more launcher tweaks
svn-id: r5138
Diffstat (limited to 'gui')
-rw-r--r--gui/dialog.cpp2
-rw-r--r--gui/launcher.cpp23
2 files changed, 20 insertions, 5 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 31d980f8dd..ec386f90f2 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -257,6 +257,6 @@ Widget *Dialog::findWidget(int x, int y)
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);
}
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 4238fbfc13..034dc7a942 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -30,6 +30,7 @@
enum {
kStartCmd = 'STRT',
kOptionsCmd = 'OPTN',
+ kAddGameCmd = 'ADDG',
kQuitCmd = 'QUIT'
};
@@ -47,20 +48,29 @@ enum {
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 @@ LauncherDialog::LauncherDialog(NewGui *gui, GameDetector &detector)
_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)