public Mouse(IDisposableResource parent) : base(parent) { input = parent.FindParentOrSelfWithException<Input>(); input.UpdateEventCallback += UpdateEvent; input.UpdateCallback += Update; Left = new PositionButton(); Middle = new PositionButton(); Right = new PositionButton(); }
public Keyboard(IDisposableResource parent) : base(parent) { input = parent.FindParentOrSelfWithException<Input>(); input.UpdateEventCallback += UpdateEvent; input.UpdateCallback += Update; keys = new bool[256]; buttons = new Button[256]; for (int i = 0; i != 256; ++i) { buttons[i] = new Button(); } }