added About dialog to launcher
svn-id: r10107
This commit is contained in:
parent
155bac05da
commit
769f5c2919
1 changed files with 27 additions and 11 deletions
|
@ -19,16 +19,19 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "launcher.h"
|
|
||||||
#include "browser.h"
|
#include "gui/about.h"
|
||||||
#include "chooser.h"
|
#include "gui/browser.h"
|
||||||
#include "message.h"
|
#include "gui/chooser.h"
|
||||||
#include "newgui.h"
|
#include "gui/launcher.h"
|
||||||
#include "options.h"
|
#include "gui/message.h"
|
||||||
#include "EditTextWidget.h"
|
#include "gui/newgui.h"
|
||||||
#include "ListWidget.h"
|
#include "gui/options.h"
|
||||||
|
#include "gui/EditTextWidget.h"
|
||||||
|
#include "gui/ListWidget.h"
|
||||||
|
|
||||||
#include "backends/fs/fs.h"
|
#include "backends/fs/fs.h"
|
||||||
|
|
||||||
#include "common/config-file.h"
|
#include "common/config-file.h"
|
||||||
#include "common/engine.h"
|
#include "common/engine.h"
|
||||||
#include "common/gameDetector.h"
|
#include "common/gameDetector.h"
|
||||||
|
@ -36,6 +39,7 @@
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
kStartCmd = 'STRT',
|
kStartCmd = 'STRT',
|
||||||
|
kAboutCmd = 'ABOU',
|
||||||
kOptionsCmd = 'OPTN',
|
kOptionsCmd = 'OPTN',
|
||||||
kAddGameCmd = 'ADDG',
|
kAddGameCmd = 'ADDG',
|
||||||
kEditGameCmd = 'EDTG',
|
kEditGameCmd = 'EDTG',
|
||||||
|
@ -172,9 +176,16 @@ LauncherDialog::LauncherDialog(NewGui *gui, GameDetector &detector)
|
||||||
new StaticTextWidget(this, 10, 8, 300, kLineHeight, gScummVMFullVersion, kTextAlignCenter);
|
new StaticTextWidget(this, 10, 8, 300, kLineHeight, gScummVMFullVersion, kTextAlignCenter);
|
||||||
|
|
||||||
// Add three buttons at the bottom
|
// Add three buttons at the bottom
|
||||||
addButton(1 * (_w - kButtonWidth) / 6, _h - 24, "Quit", kQuitCmd, 'Q');
|
const int border = 10;
|
||||||
addButton(3 * (_w - kButtonWidth) / 6, _h - 24, "Options", kOptionsCmd, 'O');
|
const int space = 8;
|
||||||
_startButton = addButton(5 * (_w - kButtonWidth)/6, _h - 24, "Start", kStartCmd, 'S');
|
const int buttons = 4;
|
||||||
|
const int width = (_w - 2 * border - space * (buttons - 1)) / buttons;
|
||||||
|
int x = border;
|
||||||
|
new ButtonWidget(this, x, _h - 24, width, 16, "Quit", kQuitCmd, 'Q'); x += space + width;
|
||||||
|
new ButtonWidget(this, x, _h - 24, width, 16, "About", kAboutCmd, 'B'); x += space + width;
|
||||||
|
new ButtonWidget(this, x, _h - 24, width, 16, "Options", kOptionsCmd, 'O'); x += space + width;
|
||||||
|
_startButton =
|
||||||
|
new ButtonWidget(this, x, _h - 24, width, 16, "Start", kStartCmd, 'S'); x += space + width;
|
||||||
|
|
||||||
// Add list with game titles
|
// Add list with game titles
|
||||||
_list = new ListWidget(this, 10, 28, 300, 112);
|
_list = new ListWidget(this, 10, 28, 300, 112);
|
||||||
|
@ -437,6 +448,11 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
|
||||||
options.runModal();
|
options.runModal();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case kAboutCmd: {
|
||||||
|
AboutDialog about(_gui);
|
||||||
|
about.runModal();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case kStartCmd:
|
case kStartCmd:
|
||||||
case kListItemDoubleClickedCmd:
|
case kListItemDoubleClickedCmd:
|
||||||
// Print out what was selected
|
// Print out what was selected
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue