Esempio n. 1
0
		bool SetScrollData(Size viewport, Size extent, Vector offset)
		{
			bool ok = viewport.IsClose(scrollViewport) && extent.IsClose(scrollExtent) && offset.IsClose(scrollOffset);
			if (!ok) {
				scrollViewport = viewport;
				scrollExtent = extent;
				SetScrollOffset(offset);
				OnScrollChange();
				return true;
			}
			return false;
		}
Esempio n. 2
0
 bool SetScrollData(Size viewport, Size extent, Vector offset)
 {
     if (!(viewport.IsClose(this.scrollViewport)
           && extent.IsClose(this.scrollExtent)
           && offset.IsClose(this.scrollOffset)))
     {
         this.scrollViewport = viewport;
         this.scrollExtent = extent;
         SetScrollOffset(offset);
         this.OnScrollChange();
         return true;
     }
     return false;
 }