public TestGame(IPlatform platform) : base(platform) { PackageTypeReaderManager.DefaultManager.AddReader(new PackageSceneV2Reader()); WidgetNode.DefaultHoverPointerType = PointerType.Arrow; GameView.Fullscreen = true; GameView.KeepScreenOn = true; GameView.DisplayModeChange += GameView_DisplayModeChange; _rootNode = new RenderStatesNode(this); _touchTranslator = new GesturesTranslator(Platform.TouchPanel, CoordinateSystem, ViewPort.Empty); _touchTranslator.Translated += TouchTranslatorTranslated1; _touchTranslator.GesturesGroup.Pinch.Retain(); _eventPropagator = new EventPropagator(_rootNode); Platform.Keyboard.KeyUp += Keyboard_KeyUp; GameView_DisplayModeChange(GameView.CurrentDisplayMode); }
protected InputSystem(ILayoutSystem layoutSystem, KeyboardInputManager keyboardInputManager = null) { this.m_LayoutSystem = layoutSystem; this.m_MouseDownElements = new LightList <UIElement>(); this.m_ElementsThisFrame = new List <UIElement>(); this.m_ElementsLastFrame = new List <UIElement>(); this.m_EnteredElements = new List <UIElement>(); this.m_ExitedElements = new List <UIElement>(); this.m_ActiveElements = new List <UIElement>(); this.m_KeyboardEventTree = new SkipTree <UIElement>(); this.keyboardInputManager = keyboardInputManager ?? new KeyboardInputManager(); this.m_EventPropagator = new EventPropagator(); this.m_MouseEventCaptureList = new List <ValueTuple <object, UIElement> >(); // this.m_DragEventCaptureList = new List<ValueTuple<DragEventHandler, UIElement>>(); this.m_FocusedElement = null; this.focusables = new List <IFocusable>(); this.hoveredElements = new LightList <UIElement>(16); }