Example #1
0
        public override void Initialize()
        {
            //Register key binding for showing the Debug Window
            _inputManager.ActionsManager.AddActions(new KeyboardTriggeredAction()
            {
                ActionId    = Actions.EngineShowDebugUI,
                TriggerType = KeyboardTriggerMode.KeyPressed,
                Binding     = new KeyWithModifier()
                {
                    MainKey = System.Windows.Forms.Keys.F4
                }
            });

            _mainControl = ToDispose(new DebugWindowControl(_game, _displayInfo, _fps, _leftPanelColor));

            _chart = ToDispose(new ColumnChart(_engine, new SharpDX.Rectangle((int)_mainControl.DebugWindow.Bounds.Left.Offset,
                                                                              (int)_engine.ViewPort.Height - (int)_mainControl.DebugWindow.Bounds.Bottom.Offset,
                                                                              (int)_mainControl.DebugWindow.Bounds.Left.Offset + 200,
                                                                              (int)_engine.ViewPort.Height - (int)_mainControl.DebugWindow.Bounds.Bottom.Offset + 100)));

            _displayInfo.Initialize();
            _fps.Initialize();
            _chart.Initialize();

            this.EnableComponent();
        }