/// <summary> /// Creates a new screen manager. /// </summary> public ScreenManager() { // Setup input _Input = new InputManager(); _Input.AddBind(new Bind("down", Keys.Down)); _Input.AddBind(new Bind("up", Keys.Up)); _Input.AddBind(new Bind("enter", Keys.Enter)); _Input.AddBind(new Bind("back", Keys.Escape)); _Input.StateChanged += OnInput; // Setup screens _Screens = new ThreadDictionary <string, Screen>(); _Screens.QueuesEmptied += DepthCheck; SetResolution(new Vector2(DefaultHorizontalResolution, DefaultHorizontalResolution / DefaultScreenRatio)); // Register events _Screens.ItemAdded += OnScreenAdded; _Screens.ItemRemoved += OnScreenRemoved; }
/// <summary> /// Creates an input manager to monitor the keyboard state. /// </summary> public InputManager() { _Binds = new ThreadDictionary <string, Bind>(); }