public UIScrollBar(float x, float y, float width, float height, int layer) : base(x, y, width, height, layer, TextureManager.TextureNames.textBox) { scrollKnob = new UIDraggable(x, y, width + 2, width + 2, layer - 1, TextureManager.TextureNames.textBox) { positionUpdate = () => { newMouse = Input.MouseY + mouseY; SetScroll(); } }; buttonAction = new Action(SetScroll); maxY = y + height; minY = y - height; }
private void MUp(object sender, MouseEventArgs e) { Input.MouseHeld = false; dragged = null; }