Fix wrong song name showing in party mode
This commit is contained in:
1 parent
d5ae52a8f7
commit
b14b47fd33
6 files changed
+30
-21
No files matched your search
@@ -475,12 +475,12 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
players[i].ProfileID = -1;
|
||||
}
|
||||
|
||||
CBase.Songs.AddPartySongSung(songID);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
}
|
||||
|
||||
public override void LeavingHighscore()
|
||||
{
|
||||
CBase.Songs.AddPartySongSung(CBase.Game.GetSong(0).ID);
|
||||
_GameData.CurrentRoundNr++;
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
|
||||
@@ -457,6 +457,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
|
||||
public override void LeavingHighscore()
|
||||
{
|
||||
for (int i = 0; i < CBase.Game.GetNumSongs();i++ )
|
||||
CBase.Songs.AddPartySongSung(CBase.Game.GetSong(i).ID);
|
||||
_GameData.CurrentRoundNr++;
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
@@ -542,7 +544,6 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
{
|
||||
int songID = ids[CBase.Game.GetRandom(ids.Count)];
|
||||
CBase.Game.AddSong(songID, EGameMode.TR_GAMEMODE_MEDLEY);
|
||||
CBase.Songs.AddPartySongSung(songID);
|
||||
ids.Remove(songID);
|
||||
s++;
|
||||
}
|
||||
|
||||
@@ -515,12 +515,12 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
}
|
||||
CBase.Game.AddSong(songID, gm);
|
||||
|
||||
CBase.Songs.AddPartySongSung(songID);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
}
|
||||
|
||||
public override void LeavingHighscore()
|
||||
{
|
||||
CBase.Songs.AddPartySongSung(CBase.Game.GetSong(0).ID);
|
||||
_UpdateScores();
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
|
||||
@@ -577,6 +577,16 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
return CGame.GetNumSongs();
|
||||
}
|
||||
|
||||
public CSong GetSong()
|
||||
{
|
||||
return CGame.GetSong();
|
||||
}
|
||||
|
||||
public CSong GetSong(int round)
|
||||
{
|
||||
return CGame.GetSong(round);
|
||||
}
|
||||
}
|
||||
|
||||
class CBprofiles : IProfiles
|
||||
|
||||
@@ -196,6 +196,8 @@ namespace VocaluxeLib
|
||||
void Reset();
|
||||
void ClearSongs();
|
||||
int GetNumSongs();
|
||||
CSong GetSong();
|
||||
CSong GetSong(int round);
|
||||
}
|
||||
|
||||
public interface IRecording
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private int _LastKnownNumSongs;
|
||||
private int _LastKnownCategory = -1;
|
||||
|
||||
private bool _MouseWasInRect = false;
|
||||
private bool _MouseWasInRect;
|
||||
|
||||
public override float SelectedTileZoomFactor
|
||||
{
|
||||
@@ -76,14 +76,19 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
//Update list in case we scrolled
|
||||
_UpdateList();
|
||||
|
||||
foreach (CStatic tile in _Tiles)
|
||||
tile.Selected = false;
|
||||
int tileNr = _SelectionNr - _Offset;
|
||||
if (tileNr >= 0 && tileNr < _Tiles.Count)
|
||||
_Tiles[tileNr].Selected = true;
|
||||
_UpdateTileSelection();
|
||||
}
|
||||
}
|
||||
|
||||
private void _UpdateTileSelection()
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
tile.Selected = false;
|
||||
int tileNr = _SelectionNr - _Offset;
|
||||
if (tileNr >= 0 && tileNr < _Tiles.Count)
|
||||
_Tiles[tileNr].Selected = true;
|
||||
}
|
||||
|
||||
public override bool SmallView
|
||||
{
|
||||
set
|
||||
@@ -93,6 +98,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
base.SmallView = value;
|
||||
_InitTiles();
|
||||
_UpdateList(true);
|
||||
_UpdateTileSelection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,19 +268,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
else
|
||||
{
|
||||
if (CBase.Songs.IsInCategory())
|
||||
{
|
||||
if (_SelectionNr < 0)
|
||||
SetSelectedSong(0);
|
||||
else
|
||||
SetSelectedSong(_SelectionNr);
|
||||
}
|
||||
SetSelectedSong(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||
else
|
||||
{
|
||||
if (_SelectionNr < 0)
|
||||
SetSelectedCategory(0);
|
||||
else
|
||||
SetSelectedCategory(_SelectionNr);
|
||||
}
|
||||
SetSelectedCategory(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||
}
|
||||
_PreviewNr = _SelectionNr;
|
||||
_AfterCategoryChange();
|
||||
|
||||
Reference in new issue
Block a user