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