summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-05-29 11:47:56 +0000
committerpeter1138 <peter1138@openttd.org>2008-05-29 11:47:56 +0000
commit48e20d801221888a1b8b6a4ab8288becad4b954b (patch)
treebcd6e1576c7d25e43afbfad51e47855681fd45ee
parent4151d684803ad353ae9e3362f1d855ba95027728 (diff)
downloadopenttd-48e20d801221888a1b8b6a4ab8288becad4b954b.tar.xz
(svn r13323) -Codechange: scrollbars are not refresh counters
-rw-r--r--src/player_gui.cpp4
-rw-r--r--src/smallmap_gui.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/player_gui.cpp b/src/player_gui.cpp
index 57b4e3c8a..68e1bd3fb 100644
--- a/src/player_gui.cpp
+++ b/src/player_gui.cpp
@@ -1304,10 +1304,10 @@ struct PlayerCompanyWindow : Window
}
}
- virtual void OnTick()
+ virtual void OnHundredthTick()
{
/* redraw the window every now and then */
- if ((++this->vscroll.pos & 0x1F) == 0) this->SetDirty();
+ this->SetDirty();
}
virtual void OnPlaceObject(Point pt, TileIndex tile)
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 5f0f039fb..35bb9d723 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -574,6 +574,7 @@ class SmallMapWindow : public Window
int32 scroll_x;
int32 scroll_y;
int32 subscroll;
+ uint8 refresh;
public:
/**
@@ -1019,7 +1020,7 @@ public:
virtual void OnTick()
{
/* update the window every now and then */
- if ((++this->vscroll.pos & 0x1F) == 0) this->SetDirty();
+ if ((++this->refresh & 0x1F) == 0) this->SetDirty();
}
virtual void OnScroll(Point delta)