diff options
| author | Max Horn | 2004-12-30 14:21:16 +0000 | 
|---|---|---|
| committer | Max Horn | 2004-12-30 14:21:16 +0000 | 
| commit | f0d0ce7979d89ab67cb702326f900dc721aa01a4 (patch) | |
| tree | 76f8b6594c9f98d976b3efacb643386f37c214d3 | |
| parent | 60deb4200b86ba4288f3205b6cd45176a3bff254 (diff) | |
| download | scummvm-rg350-f0d0ce7979d89ab67cb702326f900dc721aa01a4.tar.gz scummvm-rg350-f0d0ce7979d89ab67cb702326f900dc721aa01a4.tar.bz2 scummvm-rg350-f0d0ce7979d89ab67cb702326f900dc721aa01a4.zip | |
Reduce time till scrolling starts inthe about dialog; pressing shift/alt now causes faster/reverse scrolling (this is an insider trick and not documented on purpose :-)
svn-id: r16383
| -rw-r--r-- | gui/about.cpp | 15 | ||||
| -rw-r--r-- | gui/about.h | 1 | 
2 files changed, 13 insertions, 3 deletions
| diff --git a/gui/about.cpp b/gui/about.cpp index 6ba1ec7474..4f4e932fb5 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -28,7 +28,7 @@  namespace GUI {  enum { -	kScrollStartDelay = 2500, +	kScrollStartDelay = 1500,  	kScrollMillisPerPixel = 80,  	kXOff = 3, @@ -82,7 +82,7 @@ static const char *credits_intro[] = {  AboutDialog::AboutDialog()  	: Dialog(10, 20, 300, 174), -	_scrollPos(0), _scrollTime(0) { +	_scrollPos(0), _scrollTime(0), _modifiers(0) {  	int i; @@ -194,6 +194,12 @@ void AboutDialog::handleTickle() {  	const uint32 t = g_system->getMillis();  	int scrollOffset = ((int)t - (int)_scrollTime) / kScrollMillisPerPixel;  	if (scrollOffset > 0) { +		// Scroll faster when shift is pressed +		if (_modifiers & OSystem::KBD_SHIFT) +			scrollOffset *= 4; +		// Reverse scrolling when alt is pressed +		if (_modifiers & OSystem::KBD_ALT) +			scrollOffset *= -1;  		_scrollPos += scrollOffset;  		_scrollTime = t; @@ -215,10 +221,13 @@ void AboutDialog::handleMouseUp(int x, int y, int button, int clickCount) {  }  void AboutDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) { +	_modifiers = modifiers;  }  void AboutDialog::handleKeyUp(uint16 ascii, int keycode, int modifiers) { -	close(); +	_modifiers = modifiers; +	if (ascii) +		close();  } diff --git a/gui/about.h b/gui/about.h index 13ad79c7d6..094b8ec551 100644 --- a/gui/about.h +++ b/gui/about.h @@ -33,6 +33,7 @@ protected:  	uint32		_scrollTime;  	StringList	_lines;  	uint32		_lineHeight; +	byte		_modifiers;  public:  	AboutDialog(); | 
