Beispiel #1
0
        public WindowBase(InputManager inputManager, GraphicsDebugLevel glLogLevel, AspectRatio aspectRatio, bool enableMouse)
        {
            MouseDriver   = new SDL2MouseDriver();
            _inputManager = inputManager;
            _inputManager.SetMouseDriver(MouseDriver);
            NpadManager        = _inputManager.CreateNpadManager();
            TouchScreenManager = _inputManager.CreateTouchScreenManager();
            _keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0");
            _glLogLevel        = glLogLevel;
            _chrono            = new Stopwatch();
            _ticksPerFrame     = Stopwatch.Frequency / TargetFps;
            _exitEvent         = new ManualResetEvent(false);
            _aspectRatio       = aspectRatio;
            _enableMouse       = enableMouse;

            SDL2Driver.Instance.Initialize();
        }
Beispiel #2
0
 public void Dispose()
 {
     _driver = null;
 }
Beispiel #3
0
 public SDL2Mouse(SDL2MouseDriver driver)
 {
     _driver = driver;
 }