protected virtual void InterpretInput(InputHelper inputHelper) { bool mouseHovering = false; bool mouseDown = false; bool mouseClicked = false; if (AbsoluteRectangle.Contains(inputHelper.MousePosition)) { mouseHovering = true; if (inputHelper.MouseLeftButtonDown()) { mouseDown = true; } if (inputHelper.MouseLeftButtonPressed()) { mouseClicked = true; InputUser = this; InvokeClickEvent(); } } MouseHovering = mouseHovering; MouseDown = mouseDown; MouseClicked = mouseClicked; }
public override void HandleInput(InputHelper inputHelper) { //Because the scrollbar is drawn first it needs to be the first object to have its input checked scrollBar.HandleInput(inputHelper); if (AbsoluteRectangle.Contains(inputHelper.MousePosition)) { ChildOffset = ChildOffset - inputHelper.ScrollDelta; } base.HandleInput(inputHelper); }