diff options
author | Max Horn | 2004-12-30 14:55:20 +0000 |
---|---|---|
committer | Max Horn | 2004-12-30 14:55:20 +0000 |
commit | 6fb82b2494d278049515e789059867bc2052b6eb (patch) | |
tree | de2b125361a9cf2b28d07007c87ecdc38f4c3eaa /gui | |
parent | 1a27617a956d34acf50d7702fa4bb301107517e7 (diff) | |
download | scummvm-rg350-6fb82b2494d278049515e789059867bc2052b6eb.tar.gz scummvm-rg350-6fb82b2494d278049515e789059867bc2052b6eb.tar.bz2 scummvm-rg350-6fb82b2494d278049515e789059867bc2052b6eb.zip |
Final part of the fix for bug #1091802 (GUI: Credits scroll glitch)
svn-id: r16388
Diffstat (limited to 'gui')
-rw-r--r-- | gui/about.cpp | 8 | ||||
-rw-r--r-- | gui/about.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gui/about.cpp b/gui/about.cpp index 4f4e932fb5..d5f4c2d4e2 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -82,7 +82,7 @@ static const char *credits_intro[] = { AboutDialog::AboutDialog() : Dialog(10, 20, 300, 174), - _scrollPos(0), _scrollTime(0), _modifiers(0) { + _scrollPos(0), _scrollTime(0), _modifiers(0), _willClose(false) { int i; @@ -116,6 +116,8 @@ AboutDialog::AboutDialog() void AboutDialog::open() { _scrollTime = g_system->getMillis() + kScrollStartDelay; _scrollPos = 0; + _modifiers = 0; + _willClose = false; Dialog::open(); } @@ -222,11 +224,13 @@ void AboutDialog::handleMouseUp(int x, int y, int button, int clickCount) { void AboutDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) { _modifiers = modifiers; + if (ascii) + _willClose = true; } void AboutDialog::handleKeyUp(uint16 ascii, int keycode, int modifiers) { _modifiers = modifiers; - if (ascii) + if (ascii && _willClose) close(); } diff --git a/gui/about.h b/gui/about.h index 094b8ec551..dc2e14e245 100644 --- a/gui/about.h +++ b/gui/about.h @@ -34,6 +34,7 @@ protected: StringList _lines; uint32 _lineHeight; byte _modifiers; + bool _willClose; public: AboutDialog(); |