[Scummvm-cvs-logs] SF.net SVN: scummvm: [25373] scummvm/trunk/gui

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Feb 4 03:36:24 CET 2007


Revision: 25373
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25373&view=rev
Author:   sev
Date:     2007-02-03 18:36:23 -0800 (Sat, 03 Feb 2007)

Log Message:
-----------
Make Add Button caption react to Shift key.

Modified Paths:
--------------
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/launcher.h

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2007-02-04 02:11:29 UTC (rev 25372)
+++ scummvm/trunk/gui/launcher.cpp	2007-02-04 02:36:23 UTC (rev 25373)
@@ -494,7 +494,8 @@
 			new ButtonWidget(this, "launcher_start_button", "Start", kStartCmd, 'S');
 
 	// Above the lowest button rows: two more buttons (directly below the list box)
-	new ButtonWidget(this, "launcher_addGame_button", "Add Game...", kAddGameCmd, 'A');
+	_addButton = 
+		new ButtonWidget(this, "launcher_addGame_button", "Add Game...", kAddGameCmd, 'A');
 	_editButton =
 		new ButtonWidget(this, "launcher_editGame_button", "Edit Game...", kEditGameCmd, 'E');
 	_removeButton =
@@ -806,11 +807,21 @@
 void LauncherDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
 	_modifiers = modifiers;
 	Dialog::handleKeyDown(ascii, keycode, modifiers);
+
+	if ((modifiers & OSystem::KBD_SHIFT) != 0) {
+		_addButton->setLabel("Mass Add...");
+		_addButton->draw();
+	}
 }
 
 void LauncherDialog::handleKeyUp(uint16 ascii, int keycode, int modifiers) {
 	_modifiers = modifiers;
 	Dialog::handleKeyUp(ascii, keycode, modifiers);
+
+	if ((modifiers & OSystem::KBD_SHIFT) == 0) {
+		_addButton->setLabel("Add Game...");
+		_addButton->draw();
+	}
 }
 
 void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {

Modified: scummvm/trunk/gui/launcher.h
===================================================================
--- scummvm/trunk/gui/launcher.h	2007-02-04 02:11:29 UTC (rev 25372)
+++ scummvm/trunk/gui/launcher.h	2007-02-04 02:36:23 UTC (rev 25373)
@@ -45,6 +45,7 @@
 
 protected:
 	ListWidget		*_list;
+	ButtonWidget	*_addButton;
 	Widget			*_startButton;
 	Widget			*_editButton;
 	Widget			*_removeButton;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list