From 9dac6d9b19001a9dcd5ccdf51f0d2f9c817733a8 Mon Sep 17 00:00:00 2001 From: Edi316 <61267443+Edi316@users.noreply.github.com> Date: Sun, 26 Apr 2026 20:49:52 +0200 Subject: [PATCH] Add Duet Voice Name (#864) --- Vocaluxe/Screens/CScreenHighscore.cs | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 1ba9c635..fcff3acc 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -195,7 +195,33 @@ namespace Vocaluxe.Screens string name = _Scores[_Round][_Pos + p].Name; name += " [" + CLanguage.Translate(Enum.GetName(typeof(EGameDifficulty), _Scores[_Round][_Pos + p].Difficulty)) + "]"; if (_IsDuet) - name += " (P" + (_Scores[_Round][_Pos + p].VoiceNr + 1) + ")"; + { + int voiceNr = _Scores[_Round][_Pos + p].VoiceNr; + string voiceName = null; + + CSong song; + if (_FromScreenSong) + song = CSongs.GetSong(CScreenSong.getSelectedSongID()); + else + song = CGame.GetSong(_Round); + + if (song != null && song.Notes != null && song.Notes.VoiceNames != null) + { + try + { + voiceName = song.Notes.VoiceNames[voiceNr]; + } + catch + { + voiceName = null; // Ungültiger Index + } + } + + if (!string.IsNullOrWhiteSpace(voiceName)) + name += " (" + voiceName + ")"; + else + name += " (P" + (voiceNr + 1) + ")"; + } _Texts[_TextName[p]].Text = name; _Texts[_TextScore[p]].Text = _Scores[_Round][_Pos + p].Score.ToString("D");