diff options
author | Torbjörn Andersson | 2007-02-26 22:38:24 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2007-02-26 22:38:24 +0000 |
commit | 437bc950b67e36427d39799fd43c12ae5113286b (patch) | |
tree | e1df13b87c9e887c2ec7a0e6810e3210e9aeb82f /gui | |
parent | 82adbc025debfe0aa79d9b400e08cf8adbc491c8 (diff) | |
download | scummvm-rg350-437bc950b67e36427d39799fd43c12ae5113286b.tar.gz scummvm-rg350-437bc950b67e36427d39799fd43c12ae5113286b.tar.bz2 scummvm-rg350-437bc950b67e36427d39799fd43c12ae5113286b.zip |
Measure the "open time" from when the pop-up dialog was first drawn, not from
when it was created. This should fix bug #1667992.
svn-id: r25887
Diffstat (limited to 'gui')
-rw-r--r-- | gui/PopUpWidget.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp index 19084974b8..b9a13e203b 100644 --- a/gui/PopUpWidget.cpp +++ b/gui/PopUpWidget.cpp @@ -143,8 +143,7 @@ PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY) _clickX = clickX - _x; _clickY = clickY - _y; - // Time the popup was opened - _openTime = getMillis(); + _openTime = 0; } void PopUpDialog::drawDialog() { @@ -164,6 +163,11 @@ void PopUpDialog::drawDialog() { /*if (_twoColumns && (count & 1)) { g_gui.fillRect(_x + 1 + _w / 2, _y + 1 + kLineHeight * (_entriesPerColumn - 1), _w / 2 - 1, kLineHeight, g_gui._bgcolor); }*/ + + if (_openTime == 0) { + // Time the popup was opened + _openTime = getMillis(); + } } void PopUpDialog::handleMouseUp(int x, int y, int button, int clickCount) { |