src/window.cpp
changeset 10768 bbb4e4b152bf
parent 10703 2c998f3776d1
child 10771 6c7035d85faf
equal deleted inserted replaced
10767:83c8d60f4996 10768:bbb4e4b152bf
  2066 	}
  2066 	}
  2067 	SetDirtyBlocks(0, 0, _screen.width, w->height); // invalidate the whole top part
  2067 	SetDirtyBlocks(0, 0, _screen.width, w->height); // invalidate the whole top part
  2068 	return w->left;
  2068 	return w->left;
  2069 }
  2069 }
  2070 
  2070 
       
  2071 void SetVScrollCount(Window *w, int num)
       
  2072 {
       
  2073 	w->vscroll.count = num;
       
  2074 	num -= w->vscroll.cap;
       
  2075 	if (num < 0) num = 0;
       
  2076 	if (num < w->vscroll.pos) w->vscroll.pos = num;
       
  2077 }
       
  2078 
       
  2079 void SetVScroll2Count(Window *w, int num)
       
  2080 {
       
  2081 	w->vscroll2.count = num;
       
  2082 	num -= w->vscroll2.cap;
       
  2083 	if (num < 0) num = 0;
       
  2084 	if (num < w->vscroll2.pos) w->vscroll2.pos = num;
       
  2085 }
       
  2086 
       
  2087 void SetHScrollCount(Window *w, int num)
       
  2088 {
       
  2089 	w->hscroll.count = num;
       
  2090 	num -= w->hscroll.cap;
       
  2091 	if (num < 0) num = 0;
       
  2092 	if (num < w->hscroll.pos) w->hscroll.pos = num;
       
  2093 }
       
  2094 
  2071 /**
  2095 /**
  2072  * Relocate all windows to fit the new size of the game application screen
  2096  * Relocate all windows to fit the new size of the game application screen
  2073  * @param neww New width of the game application screen
  2097  * @param neww New width of the game application screen
  2074  * @param newh New height of the game appliction screen
  2098  * @param newh New height of the game appliction screen
  2075  */
  2099  */