(svn r13318) -Codechange: move some functions from gui.h/misc_gui.cpp to window_gui.h/window.cpp because they belong there.
authorrubidium
Thu, 29 May 2008 06:49:56 +0000
changeset 9407 079a6bf07bae
parent 9406 f85d149506a9
child 9408 e9ac1e9138e1
(svn r13318) -Codechange: move some functions from gui.h/misc_gui.cpp to window_gui.h/window.cpp because they belong there.
src/gui.h
src/misc_gui.cpp
src/window.cpp
src/window_gui.h
--- a/src/gui.h	Wed May 28 21:36:16 2008 +0000
+++ b/src/gui.h	Thu May 29 06:49:56 2008 +0000
@@ -61,9 +61,6 @@
 
 void ShowSmallMap();
 void ShowExtraViewPortWindow(TileIndex tile = INVALID_TILE);
-void SetVScrollCount(Window *w, int num);
-void SetVScroll2Count(Window *w, int num);
-void SetHScrollCount(Window *w, int num);
 
 void BuildFileList();
 void SetFiosType(const byte fiostype);
--- a/src/misc_gui.cpp	Wed May 28 21:36:16 2008 +0000
+++ b/src/misc_gui.cpp	Thu May 29 06:49:56 2008 +0000
@@ -717,30 +717,6 @@
 	}
 }
 
-void SetVScrollCount(Window *w, int num)
-{
-	w->vscroll.count = num;
-	num -= w->vscroll.cap;
-	if (num < 0) num = 0;
-	if (num < w->vscroll.pos) w->vscroll.pos = num;
-}
-
-void SetVScroll2Count(Window *w, int num)
-{
-	w->vscroll2.count = num;
-	num -= w->vscroll2.cap;
-	if (num < 0) num = 0;
-	if (num < w->vscroll2.pos) w->vscroll2.pos = num;
-}
-
-void SetHScrollCount(Window *w, int num)
-{
-	w->hscroll.count = num;
-	num -= w->hscroll.cap;
-	if (num < 0) num = 0;
-	if (num < w->hscroll.pos) w->hscroll.pos = num;
-}
-
 /* Delete a character at the caret position in a text buf.
  * If backspace is set, delete the character before the caret,
  * else delete the character after it. */
--- a/src/window.cpp	Wed May 28 21:36:16 2008 +0000
+++ b/src/window.cpp	Thu May 29 06:49:56 2008 +0000
@@ -2068,6 +2068,30 @@
 	return w->left;
 }
 
+void SetVScrollCount(Window *w, int num)
+{
+	w->vscroll.count = num;
+	num -= w->vscroll.cap;
+	if (num < 0) num = 0;
+	if (num < w->vscroll.pos) w->vscroll.pos = num;
+}
+
+void SetVScroll2Count(Window *w, int num)
+{
+	w->vscroll2.count = num;
+	num -= w->vscroll2.cap;
+	if (num < 0) num = 0;
+	if (num < w->vscroll2.pos) w->vscroll2.pos = num;
+}
+
+void SetHScrollCount(Window *w, int num)
+{
+	w->hscroll.count = num;
+	num -= w->hscroll.cap;
+	if (num < 0) num = 0;
+	if (num < w->hscroll.pos) w->hscroll.pos = num;
+}
+
 /**
  * Relocate all windows to fit the new size of the game application screen
  * @param neww New width of the game application screen
--- a/src/window_gui.h	Wed May 28 21:36:16 2008 +0000
+++ b/src/window_gui.h	Thu May 29 06:49:56 2008 +0000
@@ -562,6 +562,10 @@
 
 void ResizeWindowForWidget(Window *w, int widget, int delta_x, int delta_y);
 
+void SetVScrollCount(Window *w, int num);
+void SetVScroll2Count(Window *w, int num);
+void SetHScrollCount(Window *w, int num);
+
 
 /**
  * Sets the enabled/disabled status of a widget.