示例#1
0
            static void DrawCurveEditorWindow(UIElement uie)
            {
                UIManager.ui_bg_dark = true;
                uie.DrawMenuBG();
                Vector2 position = uie.m_position;

                position.y = UIManager.UI_TOP + 64f;
                uie.DrawHeaderMedium(Vector2.up * (UIManager.UI_TOP + 30f), Loc.LS("CURVE EDITOR"), 265f);
                position.y += 20f;
                uie.DrawMenuSeparator(position);
                position.y += 40f;

                Controller controller = Controls.m_controllers[MenuManager.m_calibration_current_controller];

                if (controller.isConnected)
                {
                    Vector2 pos = new Vector2(-605f, -270f);
                    uie.DrawStringSmall("CONTROLLER:", pos, 0.32f, StringOffset.LEFT, UIManager.m_col_ui1, 1f, -1f);
                    pos.x += 95f;
                    uie.DrawStringSmall(controller.name, pos, 0.45f, StringOffset.LEFT, UIManager.m_col_ui1, 1f, -1f);
                    pos.y += 42f;
                    pos.x -= 95f;
                    uie.DrawStringSmall("AXIS:", pos, 0.32f, StringOffset.LEFT, UIManager.m_col_ui1, 1f, -1f);
                    pos.x += 95f;
                    uie.DrawStringSmall(MenuManager.m_calibration_current_axis + ": [" + Loc.LSX(controller.m_joystick.AxisElementIdentifiers[MenuManager.m_calibration_current_axis].name + "]"), pos, 0.45f, StringOffset.LEFT, UIManager.m_col_ui1, 1f, -1f);

                    Vector2 initial_pos = new Vector2(0, -22);
                    int     xrange      = 500;
                    int     yrange      = 500;

                    DrawStatsAxes(uie, initial_pos, xrange, yrange);

                    DrawResponseCurve(initial_pos, xrange, yrange);

                    pos.x += 960f;
                    pos.y += 334f;
                    uie.SelectAndDrawItem(Loc.LS("RESET CURVE"), pos, 234, false, 0.47f, 0.6f);
                    pos.y += 52f;
                    uie.SelectAndDrawItem(Loc.LS("SET TO LINEAR"), pos, 233, false, 0.47f, 0.6f);
                    pos.y += 52f;
                    uie.SelectAndDrawItem(Loc.LS("APPLY TO ALL AXES"), pos, 235, false, 0.47f, 0.6f);
                }

                position.y = UIManager.UI_BOTTOM - 120f;
                uie.DrawMenuSeparator(position);
                position.y += 5f;
                position.y  = UIManager.UI_BOTTOM - 30f;
                uie.SelectAndDrawItem(Loc.LS("BACK"), position, 100, fade: false);
            }