From 011588bbb1d32747b674fb69cfbe385506d944f6 Mon Sep 17 00:00:00 2001 From: stephena Date: Tue, 10 May 2005 01:12:59 +0000 Subject: [PATCH] Added 'Note' textwidget to the launcher window. It's not yet active, but eventually it will show any associated notes for the currently selected ROM (like StellaX frontend). Resized the launcher window to a more reasonable size of 320x240, instead of 400x300. All the extra space was just wasted. Maybe sometime in the future I'll make the window look more 'Atari like', with graphics, etc. For now, just a list of game names will do. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@416 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/gui/Launcher.hxx | 8 ++++---- stella/src/gui/LauncherDialog.cxx | 10 +++++++--- stella/src/gui/LauncherDialog.hxx | 9 +++++---- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/stella/src/gui/Launcher.hxx b/stella/src/gui/Launcher.hxx index b801072f6..cb3985c65 100644 --- a/stella/src/gui/Launcher.hxx +++ b/stella/src/gui/Launcher.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Launcher.hxx,v 1.2 2005-05-06 22:50:15 stephena Exp $ +// $Id: Launcher.hxx,v 1.3 2005-05-10 01:12:59 stephena Exp $ //============================================================================ #ifndef LAUNCHER_HXX @@ -24,15 +24,15 @@ class OSystem; #include "DialogContainer.hxx" enum { - kLauncherWidth = 400, - kLauncherHeight = 300 + kLauncherWidth = 320, + kLauncherHeight = 240 }; /** The base dialog for the ROM launcher in Stella. @author Stephen Anthony - @version $Id: Launcher.hxx,v 1.2 2005-05-06 22:50:15 stephena Exp $ + @version $Id: Launcher.hxx,v 1.3 2005-05-10 01:12:59 stephena Exp $ */ class Launcher : public DialogContainer { diff --git a/stella/src/gui/LauncherDialog.cxx b/stella/src/gui/LauncherDialog.cxx index 3f0bbd1a0..6de160876 100644 --- a/stella/src/gui/LauncherDialog.cxx +++ b/stella/src/gui/LauncherDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LauncherDialog.cxx,v 1.4 2005-05-09 18:58:19 stephena Exp $ +// $Id: LauncherDialog.cxx,v 1.5 2005-05-10 01:12:59 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -75,10 +75,14 @@ LauncherDialog::LauncherDialog(OSystem* osystem, uInt16 x, uInt16 y, xpos += space + width; // Add list with game titles - myList = new ListWidget(this, 10, 24, _w - 20, _h - 24 - 26 - 10); + myList = new ListWidget(this, 10, 24, _w - 20, _h - 24 - 26 - 10 - 10); myList->setEditable(false); myList->setNumberingMode(kListNumberingOff); + // Add note textwidget to show any notes for the currently selected ROM + myNote = new StaticTextWidget(this, 20, _h - 43, w - 20, 16, + "Note: ", kTextAlignLeft); + // Restore last selection /* string last = ConfMan.get(String("lastselectedgame"), ConfigManager::kApplicationDomain); @@ -344,7 +348,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, uInt32 cmd, uInt32 dat break; case kListSelectionChangedCmd: - updateButtons(); + cerr << "change note\n"; break; case kQuitCmd: diff --git a/stella/src/gui/LauncherDialog.hxx b/stella/src/gui/LauncherDialog.hxx index abf90a578..41c78de8c 100644 --- a/stella/src/gui/LauncherDialog.hxx +++ b/stella/src/gui/LauncherDialog.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LauncherDialog.hxx,v 1.1 2005-05-06 18:39:00 stephena Exp $ +// $Id: LauncherDialog.hxx,v 1.2 2005-05-10 01:12:59 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -25,8 +25,8 @@ class CommandSender; class ButtonWidget; class StaticTextWidget; -class BrowserDialog; class ListWidget; +class BrowserDialog; #include "Dialog.hxx" #include "Launcher.hxx" @@ -53,8 +53,9 @@ class LauncherDialog : public Dialog void loadConfig(); protected: - ListWidget* myList; - BrowserDialog* myBrowser; + ListWidget* myList; + BrowserDialog* myBrowser; + StaticTextWidget* myNote; }; #endif