Inheritance: Vocaluxe.Menu.CMenu
コード例 #1
0
ファイル: CScreenHighscore.cs プロジェクト: JanK118/Vocaluxe
        private void _UpdateRound()
        {
            _IsDuet = false;
            CPoints points = CGame.GetPoints();

            CSong song;

            if (_FromScreenSong)
            {
                song = CSongs.GetSong(CScreenSong.getSelectedSongID());
            }
            else
            {
                song = CGame.GetSong(_Round);
            }

            if (song == null)
            {
                return;
            }

            _Texts[_TextSongName].Text = song.Artist + " - " + song.Title;
            if (points != null && !_FromScreenSong && points.NumRounds > 1)
            {
                _Texts[_TextSongName].Text += " (" + (_Round + 1) + "/" + points.NumRounds + ")";
            }

            switch ((_FromScreenSong ? (EGameMode)_Round : CGame.GetGameMode(_Round)))
            {
            case EGameMode.TR_GAMEMODE_NORMAL:
                _Texts[_TextSongMode].Text = "TR_GAMEMODE_NORMAL";
                break;

            case EGameMode.TR_GAMEMODE_MEDLEY:
                _Texts[_TextSongMode].Text = "TR_GAMEMODE_MEDLEY";
                break;

            case EGameMode.TR_GAMEMODE_DUET:
                _Texts[_TextSongMode].Text = "TR_GAMEMODE_DUET";
                _IsDuet = true;
                break;

            case EGameMode.TR_GAMEMODE_SHORTSONG:
                _Texts[_TextSongMode].Text = "TR_GAMEMODE_SHORTSONG";
                break;

            default:
                _Texts[_TextSongMode].Text = "TR_GAMEMODE_NORMAL";
                break;
            }

            _Pos = 0;
        }
コード例 #2
0
ファイル: CScreenHighscore.cs プロジェクト: JanK118/Vocaluxe
        private void _LoadScores()
        {
            _Pos = 0;
            int rounds = CGame.NumRounds;

            if (rounds == 0)
            {
                _FromScreenSong = true;
                _Round          = (int)EGameMode.TR_GAMEMODE_NORMAL;
                _Scores         = new List <SDBScoreEntry> [4];
                int             songID = CScreenSong.getSelectedSongID();
                EHighscoreStyle style  = CBase.Config.GetHighscoreStyle();
                bool            foundHighscoreEntries = false;

                for (int gameModeNum = 0; gameModeNum < 4; gameModeNum++)
                {
                    _Scores[gameModeNum] = CDataBase.LoadScore(songID, (EGameMode)gameModeNum, style);
                    if (!foundHighscoreEntries && _Scores[gameModeNum].Count > 0)
                    {
                        _Round = gameModeNum;
                        foundHighscoreEntries = true;
                    }
                }
            }
            else
            {
                _FromScreenSong = false;
                _Scores         = new List <SDBScoreEntry> [rounds];
                for (int round = 0; round < rounds; round++)
                {
                    int             songID   = CGame.GetSong(round).ID;
                    EGameMode       gameMode = CGame.GetGameMode(round);
                    EHighscoreStyle style    = CBase.Config.GetHighscoreStyle();
                    _Scores[round] = CDataBase.LoadScore(songID, gameMode, style);
                }
            }
        }