diff options
author | Max Horn | 2002-09-08 12:56:44 +0000 |
---|---|---|
committer | Max Horn | 2002-09-08 12:56:44 +0000 |
commit | 27bfe32f1634b65d672e42308ec693ef42a1d948 (patch) | |
tree | 41fd442bebf3f883f1439c1d754ad84218638ed6 | |
parent | 78f2f9e50556e46cf32f87c23c13be70ed4ea300 (diff) | |
download | scummvm-rg350-27bfe32f1634b65d672e42308ec693ef42a1d948.tar.gz scummvm-rg350-27bfe32f1634b65d672e42308ec693ef42a1d948.tar.bz2 scummvm-rg350-27bfe32f1634b65d672e42308ec693ef42a1d948.zip |
decreased double click interval
svn-id: r4905
-rw-r--r-- | gui/newgui.cpp | 2 | ||||
-rw-r--r-- | gui/newgui.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp index 2ad2c26afe..c3f8dbaf03 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -153,7 +153,7 @@ void NewGui::loop() case OSystem::EVENT_LBUTTONDOWN: case OSystem::EVENT_RBUTTONDOWN: { uint32 time = _s->_system->get_msecs(); - if (_lastClick.count && (time < _lastClick.time + 1000) + if (_lastClick.count && (time < _lastClick.time + kDoubleClickDelay) && ABS(_lastClick.x - t.mouse.x) < 3 && ABS(_lastClick.y - t.mouse.y) < 3) { _lastClick.count++; diff --git a/gui/newgui.h b/gui/newgui.h index b63ef50d9c..0b0aef913a 100644 --- a/gui/newgui.h +++ b/gui/newgui.h @@ -37,6 +37,10 @@ enum { kTextAlignRight, }; +enum { + kDoubleClickDelay = 500 // milliseconds +}; + // Extremly simple stack class, doesn't even do any error checking (for now) class DialogStack { protected: |