aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2004-12-30 14:55:20 +0000
committerMax Horn2004-12-30 14:55:20 +0000
commit6fb82b2494d278049515e789059867bc2052b6eb (patch)
treede2b125361a9cf2b28d07007c87ecdc38f4c3eaa /gui
parent1a27617a956d34acf50d7702fa4bb301107517e7 (diff)
downloadscummvm-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.cpp8
-rw-r--r--gui/about.h1
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();