diff --git a/PartyModeChallenge/ChallengeRounds.cs b/PartyModeChallenge/ChallengeRounds.cs index e9412be6..05670e10 100644 --- a/PartyModeChallenge/ChallengeRounds.cs +++ b/PartyModeChallenge/ChallengeRounds.cs @@ -77,8 +77,13 @@ namespace Vocaluxe.PartyModes for (int i = 0; i < NumPlayed.Count; i++) { - if (NumPlayed[i] == 0 || NumPlayed[i] < max) - result.Add(i); + if (RoundIndex == 0 || NumPlayed[i] < max) + { + if (RoundIndex == 0 || RoundIndex > 0 && NumPlayed[i] < max && !Rounds[RoundIndex - 1].IsAvailable(i)) + result.Add(i); + else if (NumPlayed[i] < max) + other.Add(i); + } else { if (RoundIndex > 0) @@ -110,6 +115,12 @@ namespace Vocaluxe.PartyModes last.RemoveAt(r); } + while (result.Count > num) + { + int n = result.Count; + int r = _Rand.Next(n); + result.RemoveAt(r); + } result.Sort(); return result; diff --git a/Vocaluxe/Base/CGraphics.cs b/Vocaluxe/Base/CGraphics.cs index 1dc275c2..7df673a0 100644 --- a/Vocaluxe/Base/CGraphics.cs +++ b/Vocaluxe/Base/CGraphics.cs @@ -33,7 +33,7 @@ namespace Vocaluxe.Base public bool ShowCursor; public bool Visible = true; public bool CursorVisible = true; - + public int X { get { return (int)_Cursor.rect.X; } @@ -177,6 +177,7 @@ namespace Vocaluxe.Base private static List _PopupScreens = new List(); private static Stopwatch _VolumePopupTimer; + private static bool CursorOverVolumeControl = false; public static float GlobalAlpha { @@ -630,7 +631,7 @@ namespace Vocaluxe.Base if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON) ShowPopup(EPopupScreens.PopupPlayerControl); } - + if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl) HidePopup(EPopupScreens.PopupPlayerControl); @@ -645,6 +646,17 @@ namespace Vocaluxe.Base } } + if (CursorOverVolumeControl && !isOverPopupVolumeControl) + { + if (_CurrentPopupScreen == EPopupScreens.PopupVolumeControl) + { + HidePopup(EPopupScreens.PopupVolumeControl); + _VolumePopupTimer.Reset(); + } + } + CursorOverVolumeControl = isOverPopupVolumeControl; + + bool handled = false; if (_CurrentPopupScreen != EPopupScreens.NoPopup) handled = _PopupScreens[(int)_CurrentPopupScreen].HandleMouse(MouseEvent); diff --git a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs index ee383668..495b9cdf 100644 --- a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs +++ b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs @@ -187,7 +187,7 @@ namespace Vocaluxe.Screens Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = VideoBackground; Buttons[htButtons(ButtonShowVideo)].Pressed = _VideoPreview; Buttons[htButtons(ButtonRepeat)].Pressed = CBackgroundMusic.RepeatSong; - Buttons[htButtons(ButtonSing)].Visible = CBackgroundMusic.CanSing; + Buttons[htButtons(ButtonSing)].Visible = CBackgroundMusic.CanSing && CParty.CurrentPartyModeID == -1; return true; } @@ -206,7 +206,7 @@ namespace Vocaluxe.Screens Buttons[htButtons(ButtonPause)].Visible = CBackgroundMusic.Playing; Buttons[htButtons(ButtonPlay)].Visible = !CBackgroundMusic.Playing; Texts[htTexts(TextCurrentSong)].Text = CBackgroundMusic.ArtistAndTitle; - + return base.Draw(); } diff --git a/VocaluxeLib/Menu/CMenu.cs b/VocaluxeLib/Menu/CMenu.cs index c7ae5551..af47ea00 100644 --- a/VocaluxeLib/Menu/CMenu.cs +++ b/VocaluxeLib/Menu/CMenu.cs @@ -1771,7 +1771,7 @@ namespace Vocaluxe.Menu for (int i = 0; i < 4; i++) { - if (i != mute && elements[i] != _Selection && (stages[i] < stage || (stages[i] == stage && Directions[i].Key == Key.Key))) + if (i != mute && elements[i] != _Selection && (stages[i] <= stage && Directions[i].Key == Key.Key)) { stage = stages[i]; element = elements[i]; diff --git a/VocaluxeLib/Menu/CObjectInteractions.cs b/VocaluxeLib/Menu/CObjectInteractions.cs index d79aa603..0e8a575d 100644 --- a/VocaluxeLib/Menu/CObjectInteractions.cs +++ b/VocaluxeLib/Menu/CObjectInteractions.cs @@ -669,7 +669,7 @@ namespace Vocaluxe.Menu for (int i = 0; i < 4; i++) { - if (i != mute && elements[i] != _Selection && (stages[i] < stage || (stages[i] == stage && Directions[i].Key == Key.Key))) + if (i != mute && elements[i] != _Selection && (stages[i] <= stage && Directions[i].Key == Key.Key)) { stage = stages[i]; element = elements[i];