summaryrefslogtreecommitdiff
path: root/src/misc_gui.cpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-12-09 22:14:41 +0000
committerskidd13 <skidd13@openttd.org>2007-12-09 22:14:41 +0000
commit7638c9b165ab22243875dcbeee9357b2643b9618 (patch)
treebceb8802d46e26d2388d8702ab7cc72cf6c3bc28 /src/misc_gui.cpp
parentab26d2a712bbdfaf20c171359942db3d29dba231 (diff)
downloadopenttd-7638c9b165ab22243875dcbeee9357b2643b9618.tar.xz
(svn r11614) -Fix: The about dialog scrolling was connected to the mouse instead of the internal ticks
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r--src/misc_gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 81dd3db97..e24dd64c9 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -256,7 +256,7 @@ static void AboutWindowProc(Window *w, WindowEvent *e)
{
switch (e->event) {
case WE_CREATE: // Set up window counter and start position of scroller
- WP(w, scroller_d).counter = 0;
+ WP(w, scroller_d).counter = 5;
WP(w, scroller_d).height = w->height - 40;
break;
case WE_PAINT: {
@@ -282,8 +282,9 @@ static void AboutWindowProc(Window *w, WindowEvent *e)
DoDrawStringCentered(210, w->height - 25, "Website: http://www.openttd.org", TC_BLACK);
DrawStringCentered(210, w->height - 15, STR_00BA_COPYRIGHT_OPENTTD, TC_FROMSTRING);
} break;
- case WE_MOUSELOOP: // Timer to scroll the text and adjust the new top
- if (WP(w, scroller_d).counter++ % 3 == 0) {
+ case WE_TICK: // Timer to scroll the text and adjust the new top
+ if (--WP(w, scroller_d).counter == 0) {
+ WP(w, scroller_d).counter = 5;
WP(w, scroller_d).height--;
SetWindowDirty(w);
}