public ScrollManager() { overlayForm = SharedFormsSingleton.Instance().overlayForm;; inputSimulator = SharedObjectsSingleton.Instance().inputSimulator; EventSingleton.Instance().updateTimer.Tick += updateTimer_Tick; scrollState = eScrollState.NOSCROLL; //Getting the images that will be used to upArrow = new Bitmap(Properties.Resources.Arrow); upArrow.MakeTransparent(); downArrow = new Bitmap(Properties.Resources.Arrow); downArrow.MakeTransparent(); downArrow.RotateFlip(RotateFlipType.RotateNoneFlipY); upArrowFocused = new Bitmap(Properties.Resources.ArrowFocused); upArrowFocused.MakeTransparent(); downArrowFocused = new Bitmap(Properties.Resources.ArrowFocused); downArrowFocused.MakeTransparent(); downArrowFocused.RotateFlip(RotateFlipType.RotateNoneFlipY); lastFixation = new Point(0, 0); setupHotspots(); }
public void UpdateScroll(Point fixation) { lastFixation = fixation; //Checking if the fixation falls in one of the hotspots and changing to the //corrosponding scroll state if it does if (topHotspot.Contains(fixation)) { scrollState = eScrollState.SCROLLUP; } else if (bottomHotspot.Contains(fixation)) { scrollState = eScrollState.SCROLLDOWN; } else { scrollState = eScrollState.NOSCROLL; } }