Exemplo n.º 1
0
 public MyVoxelDebugInputComponent()
 {
     m_components = new MyDebugComponent[] {
         new IntersectBBComponent(this),
         new IntersectRayComponent(this),
         new ToolsComponent(this),
     };
 }
 public MyVoxelDebugInputComponent()
 {
     m_components = new MyDebugComponent[]{
         new IntersectBBComponent(this),
         new IntersectRayComponent(this),
         new ToolsComponent(this), 
     };
 }
 public MyPlanetsDebugInputComponent()
 {
     m_components = new MyDebugComponent[]{
         new ShapeComponent(this),
         new InfoComponent(this),
         new SectorsComponent(this),
         new MiscComponent(this) 
     };
 }
 public MyVoxelDebugInputComponent()
 {
     m_components = new MyDebugComponent[]{
         new IntersectBBComponent(this),
         new IntersectRayComponent(this),
         new ToolsComponent(this),
         new StorageWriteCacheComponent(this),
         new PhysicsComponent(this), 
     };
 }
 public MyVoxelDebugInputComponent()
 {
     m_components = new MyDebugComponent[] {
         new IntersectBBComponent(this),
         new IntersectRayComponent(this),
         new ToolsComponent(this),
         new StorageWriteCacheComponent(this),
         new PhysicsComponent(this),
     };
 }
Exemplo n.º 6
0
        //  Draw all screens
        public void Draw()
        {
            VRageRender.MyRenderProxy.GetRenderProfiler().StartProfilingBlock("MyGuiSandbox::Draw");

            ProfilerShort.Begin("ScreenManager.Draw");
            MyScreenManager.Draw();
            ProfilerShort.End();

            m_debugText.Clear();

            if (MyInput.Static.ENABLE_DEVELOPER_KEYS && MySandboxGame.Config.DebugComponentsInfo != MyDebugComponent.MyDebugComponentInfoState.NoInfo)
            {
                var  h = 0f;
                var  i = 0;
                bool drawBackground = false;

                MyDebugComponent.ResetFrame();

                foreach (var userInputComponent in UserDebugInputComponents)
                {
                    if (userInputComponent.Enabled)
                    {
                        if (h == 0)
                        {
                            m_debugText.AppendLine("Debug input:");
                            m_debugText.AppendLine();
                            h += 0.0630f;
                        }
                        m_debugText.ConcatFormat("{0} (Ctrl + numPad{1})", UserDebugInputComponents[i].GetName(), i);
                        m_debugText.AppendLine();
                        h += 0.0265f;
                        if (MySession.Static != null)
                        {
                            userInputComponent.DispatchUpdate();
                        }
                        userInputComponent.Draw();
                        drawBackground = true;
                    }
                    ++i;
                }

                if (drawBackground)
                {
                    MyGuiManager.DrawSpriteBatch(@"Textures\GUI\Controls\rectangle_dark_center.dds",
                                                 new Vector2(MyGuiManager.GetMaxMouseCoord().X, 0f),
                                                 new Vector2(MyGuiManager.MeasureString(MyFontEnum.White, m_debugText, 1f).X + 0.012f, h),
                                                 new Color(0, 0, 0, 130),
                                                 MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_TOP);
                    MyGuiManager.DrawString(MyFontEnum.White, m_debugText, new Vector2(MyGuiManager.GetMaxMouseCoord().X - 0.01f, 0f), 1f, Color.White, MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_TOP);
                }
            }

            bool hwCursor = MyVideoSettingsManager.IsHardwareCursorUsed();

            var screenWithFocus = MyScreenManager.GetScreenWithFocus();

            if (((screenWithFocus != null) && (screenWithFocus.GetDrawMouseCursor() == true)) || (MyScreenManager.InputToNonFocusedScreens && MyScreenManager.GetScreensCount() > 1))
            {
#if XB1
                SetMouseCursorVisibility(false, false);
                DrawMouseCursor(GetMouseOverTexture(screenWithFocus));
#else
                SetMouseCursorVisibility(hwCursor, false);

                if (!hwCursor || MyFakes.FORCE_SOFTWARE_MOUSE_DRAW)
                {
                    DrawMouseCursor(GetMouseOverTexture(screenWithFocus));
                }
#endif
            }
            else
            {
                if (hwCursor)
                {
                    if (screenWithFocus != null)
                    {
                        SetMouseCursorVisibility(screenWithFocus.GetDrawMouseCursor());
                    }
                }
            }

            VRageRender.MyRenderProxy.GetRenderProfiler().EndProfilingBlock();
        }
 protected void AddGroupInput(String text, MyDebugComponent component, List<MyGuiControlBase> controlGroup = null)
 {
     MyGuiControlCheckbox checkBox = AddCheckBox(text, component, controlGroup);
     s_inputList.Add(checkBox);
 }