From c9014fbc238dd8d7cb7e8ad415c84fcf3154cb52 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 2 Jun 2012 13:48:49 +0200 Subject: [PATCH] Fix bug on selecting profiles with keyboard. --- Vocaluxe/Menu/CNameSelection.cs | 8 +------- Vocaluxe/Screens/CScreenNames.cs | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 94107f88..b11d65c4 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -363,7 +363,7 @@ namespace Vocaluxe.Menu break; } - Selection = _Offset * _Tiles.Count + _actualSelection; + Selection = VisibleProfiles[_Offset * _Tiles.Count + _actualSelection]; } public void KeyboardSelection(bool active, int player) @@ -474,12 +474,6 @@ namespace Vocaluxe.Menu return new CStatic(); } - public CStatic TilePlayerAvatar(int nr) - { - nr -= _Offset * _Tiles.Count; - return _Tiles[nr].Avatar; - } - public void UnloadTextures() { } diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 5a3feef9..6a81a101 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -148,7 +148,7 @@ namespace Vocaluxe.Screens CConfig.Players[selectingKeyboardPlayerNr - 1] = CProfiles.Profiles[SelectedPlayerNr].ProfileFile; CConfig.SaveConfig(); //Update texture and name - Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; + Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = CProfiles.Profiles[SelectedPlayerNr].Avatar.Texture; Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; //Update profile-warning CheckPlayers();