(svn r13323) -Codechange: scrollbars are not refresh counters
authorpeter1138
Thu, 29 May 2008 11:47:56 +0000
changeset 10773 88125a991761
parent 10772 24d449dd2907
child 10775 7061477bfbcf
(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)