void DrawBackupList()
    {
        Rect BackupArea = new Rect(20, 100, Screen.width - 40, Screen.height - 150);

        GUILayout.BeginArea(BackupArea);
        GUILayout.BeginVertical();
        BackupAreaScrollPos = GUILayout.BeginScrollView(BackupAreaScrollPos);

        foreach (BackupDiffData bd in BackupList)
        {
            if (bd.Data != null)
            {
                GUILayout.BeginHorizontal();
                string BackupStr = GetBackupDisplayString(bd) + " | ";
                for (int DiffIndex = 0; DiffIndex < bd.Data.NumScores; ++DiffIndex)
                {
                    int ConsecScore = bd.Data.ConsecScores[DiffIndex];
                    BackupStr += bd.Data.DiffScores[DiffIndex] + (ConsecScore == -1 ? "-" : (ConsecScore == 1 ? "+" : "")) + (DiffIndex == bd.Data.NumScores - 1 ? "" : ", ");
                }
                GUIStyle   LabelStyle    = new GUIStyle("label");
                GUIContent BackupContent = new GUIContent(BackupStr);
                GUILayout.Label(BackupContent, GUILayout.MaxWidth(LabelStyle.CalcSize(BackupContent).x + 20));
                if (GUILayout.Button("Load"))
                {
                    bIsChoosingBackup = false;
                    //bBackupLoaded = true;
                    bInputingConsec = false;
                    CurData         = bd.Data;
                    //CurBackupData = bd;

                    HeaderDrawer.CanvasGO.SetActive(true);
                    JudgerCanvasUI.SetActive(true);

                    for (int ScoreIndex = 0; ScoreIndex < bd.Data.NumScores; ++ScoreIndex)
                    {
                        NSArray[ScoreIndex].NumberValue = bd.Data.DiffScores[ScoreIndex];
                        ConsecScores[ScoreIndex]        = bd.Data.ConsecScores[ScoreIndex];
                    }
                }

                GUILayout.EndHorizontal();
            }
        }

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
        GUILayout.EndArea();
    }
Esempio n. 2
0
    void DrawBackupList()
    {
        Rect BackupArea = new Rect(20, 100, Screen.width - 40, Screen.height - 150);

        GUILayout.BeginArea(BackupArea);
        GUILayout.BeginVertical();
        BackupAreaScrollPos = GUILayout.BeginScrollView(BackupAreaScrollPos);

        foreach (BackupAIData bd in BackupList)
        {
            GUILayout.BeginHorizontal();
            string BackupStr = GetBackupDisplayString(bd) + " | V: " + bd.Data.Variety + "  T: " + bd.Data.Teamwork + "  M: " + bd.Data.Music +
                               "  Fw: " + bd.Data.Flow + "  Fm: " + bd.Data.Form;
            GUIStyle   LabelStyle    = new GUIStyle("label");
            GUIContent BackupContent = new GUIContent(BackupStr);
            GUILayout.Label(BackupContent, GUILayout.MaxWidth(LabelStyle.CalcSize(BackupContent).x + 20));
            if (GUILayout.Button("Load"))
            {
                bIsChoosingBackup = false;
                //bBackupLoaded = true;
                CurData = bd.Data;
                //CurBackupData = bd;

                HeaderDrawer.CanvasGO.SetActive(true);
                JudgerCanvasUI.SetActive(true);

                VarietyNS.NumberValue  = CurData.Variety;
                TeamworkNS.NumberValue = CurData.Teamwork;
                MusicNS.NumberValue    = CurData.Music;
                FormNS.NumberValue     = CurData.Form;
                FlowNS.NumberValue     = CurData.Flow;
                GeneralNS.NumberValue  = CurData.General;
            }

            GUILayout.EndHorizontal();
        }

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
        GUILayout.EndArea();
    }
Esempio n. 3
0
    void DrawBackupList()
    {
        Rect BackupArea = new Rect(20, 100, Screen.width - 40, Screen.height - 150);

        GUILayout.BeginArea(BackupArea);
        GUILayout.BeginVertical();
        BackupAreaScrollPos = GUILayout.BeginScrollView(BackupAreaScrollPos);

        foreach (BackupExData bd in BackupList)
        {
            GUILayout.BeginHorizontal();
            string BackupStr = GetBackupDisplayString(bd) + " | .1: " + bd.Data.Point1Count + "  .2: " + bd.Data.Point2Count + "  .3: " + bd.Data.Point3Count +
                               "  .5: " + bd.Data.Point5Count;
            GUIStyle   LabelStyle    = new GUIStyle("label");
            GUIContent BackupContent = new GUIContent(BackupStr);
            GUILayout.Label(BackupContent, GUILayout.MaxWidth(LabelStyle.CalcSize(BackupContent).x + 20));
            if (GUILayout.Button("Load"))
            {
                bIsChoosingBackup = false;
                //bBackupLoaded = true;
                CurData = bd.Data;
                //CurBackupData = bd;

                HeaderDrawer.CanvasGO.SetActive(true);
                JudgerCanvasUI.SetActive(true);

                UpdatePoints();
            }

            GUILayout.EndHorizontal();
        }

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
        GUILayout.EndArea();
    }