示例#1
0
 internal MouseState(Mouse m)
 {
     _x = m.X;
     _y = m.Y;
     _xDelta = m.XDelta;
     _yDelta = m.YDelta;
     _wheelPosition = m.WheelPosition;
     foreach(Button button in Enum.GetValues(typeof(Button)))
         if(m.IsButtonDown(button))
             _downButtons.Add(button);
 }
示例#2
0
        public Window(int width, int height, string title, WindowType type, int display, bool visible)
        {
            NativeWindow = new NativeWindow(width, height, title, GameWindowFlags.Default, GraphicsMode.Default, DisplayDevice.GetDisplay((DisplayIndex)display));
            NativeWindow.Closing += WindowClosing;
            NativeWindow.Resize += WindowResize;

            Keyboard = new Keyboard(this);
            Mouse = new Mouse(this);

            Type = type;
            Visible = visible;
        }