(svn r13323) -Codechange: scrollbars are not refresh counters
authorpeter1138
Thu, 29 May 2008 11:47:56 +0000
changeset 9412 163c465bf250
parent 9411 f54d5b3b3bf8
child 9413 7042a8ec3fa8
(svn r13323) -Codechange: scrollbars are not refresh counters
src/player_gui.cpp
src/smallmap_gui.cpp
--- a/src/player_gui.cpp	Thu May 29 11:13:11 2008 +0000
+++ b/src/player_gui.cpp	Thu May 29 11:47:56 2008 +0000
@@ -1304,10 +1304,10 @@
 		}
 	}
 
-	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)
--- a/src/smallmap_gui.cpp	Thu May 29 11:13:11 2008 +0000
+++ b/src/smallmap_gui.cpp	Thu May 29 11:47:56 2008 +0000
@@ -574,6 +574,7 @@
 	int32 scroll_x;
 	int32 scroll_y;
 	int32 subscroll;
+	uint8 refresh;
 
 public:
 	/**
@@ -1019,7 +1020,7 @@
 	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)