public Screen(IInputManager rawInputs, IUIStyle style, IBatchedDrawingService drawingService, IGameWindowService windowService) { actions = new Queue <Action>(); DrawingService = drawingService ?? throw new ArgumentNullException(nameof(drawingService)); WindowService = windowService ?? throw new ArgumentNullException(nameof(windowService)); FocusManager = new ScreenFocusManager(this); MouseHoverManager = new MouseHoverManager(); Root = new RootPane(this, style); style.StyleResolver.AddRoot(Root); PopUpManager = new PopupManager(Root); inputState = new InputStateImpl(); eventHandler = new ScreenEventHandling(this, Root, rawInputs); eventHandler.AddMousePostProcessor(new PopupClosingEventProcessor(Root)); eventHandler.AddMousePostProcessor(inputState); eventHandler.AddKeyPostProcessor(inputState); if (TracingUtil.InputTracing.Switch.ShouldTrace(TraceEventType.Verbose)) { eventHandler.AddKeyPreProcessor(new TracingEventSink <KeyEventData>()); eventHandler.AddMousePreProcessor(new TracingEventSink <MouseEventData>()); eventHandler.AddTouchPreProcessor(new TracingEventSink <TouchEventData>()); eventHandler.AddGamePadPreProcessor(new TracingEventSink <GamePadEventData>()); } }
public PopupManager(RootPane rootPane) { this.rootPane = rootPane; }