Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into develop
This commit is contained in:
commit
62429dc05f
7 files changed
+106
-98
No files matched your search
@@ -452,10 +452,10 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
for (int i = 0; i < Table.Count; i++)
|
||||
{
|
||||
TableRow row = Table[i];
|
||||
|
||||
if (i < GameState.ResultTable.Count)
|
||||
{
|
||||
TableRow row = Table[i];
|
||||
|
||||
row.Pos.Visible = true;
|
||||
row.Name.Visible = true;
|
||||
row.Rounds.Visible = true;
|
||||
@@ -469,6 +469,15 @@ namespace Vocaluxe.PartyModes
|
||||
row.SingPoints.Text = GameState.ResultTable[i].SumSingPoints.ToString();
|
||||
row.GamePoints.Text = GameState.ResultTable[i].NumGamePoints.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
row.Pos.Visible = false;
|
||||
row.Name.Visible = false;
|
||||
row.Rounds.Visible = false;
|
||||
row.Won.Visible = false;
|
||||
row.SingPoints.Visible = false;
|
||||
row.GamePoints.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,8 +402,8 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
for (int p = 0; p < Data.ScreenNames.ProfileIDs.Count; p++)
|
||||
{
|
||||
//Don't show profile if is selected, but if selected and guest
|
||||
if (Data.ScreenNames.ProfileIDs[p] == i && _Base.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF)
|
||||
//Don't show profile if is selected
|
||||
if (Data.ScreenNames.ProfileIDs[p] == i)
|
||||
{
|
||||
visible = false;
|
||||
break;
|
||||
|
||||
+61
-38
@@ -176,9 +176,6 @@ namespace Vocaluxe.Base
|
||||
private static List<IMenu> _Screens = new List<IMenu>();
|
||||
private static List<IMenu> _PopupScreens = new List<IMenu>();
|
||||
|
||||
private static float _SavedBackgroundMusicVolume;
|
||||
private static float _SavedPreviewMusicVolume;
|
||||
private static float _SavedGameMusicVolume;
|
||||
private static Stopwatch _VolumePopupTimer;
|
||||
|
||||
public static float GlobalAlpha
|
||||
@@ -309,10 +306,6 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void InitFirstScreen()
|
||||
{
|
||||
_SavedBackgroundMusicVolume = CConfig.BackgroundMusicVolume;
|
||||
_SavedGameMusicVolume = CConfig.GameMusicVolume;
|
||||
_SavedPreviewMusicVolume = CConfig.PreviewMusicVolume;
|
||||
|
||||
_Screens[(int)_CurrentScreen].OnShow();
|
||||
_Screens[(int)_CurrentScreen].OnShowFinish();
|
||||
}
|
||||
@@ -510,7 +503,7 @@ namespace Vocaluxe.Base
|
||||
bool PopupPlayerControlAllowed = _CurrentScreen != EScreens.ScreenOptionsRecord && _CurrentScreen != EScreens.ScreenSing &&
|
||||
_CurrentScreen != EScreens.ScreenSong && _CurrentScreen != EScreens.ScreenCredits;
|
||||
|
||||
bool PopupVolumeControlAllowed = _CurrentScreen != EScreens.ScreenCredits;
|
||||
bool PopupVolumeControlAllowed = _CurrentScreen != EScreens.ScreenCredits && _CurrentScreen != EScreens.ScreenOptionsRecord;
|
||||
|
||||
bool Resume = true;
|
||||
bool EventsAvailable = false;
|
||||
@@ -535,6 +528,58 @@ namespace Vocaluxe.Base
|
||||
HidePopup(EPopupScreens.PopupPlayerControl);
|
||||
}
|
||||
|
||||
if (PopupVolumeControlAllowed && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
int Diff = 0;
|
||||
if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp) || KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Add)
|
||||
Diff = 5;
|
||||
else if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown) || KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Subtract)
|
||||
Diff = -5;
|
||||
else if (KeyEvent.Key == Keys.MediaNextTrack)
|
||||
CMain.BackgroundMusic.Next();
|
||||
else if (KeyEvent.Key == Keys.MediaPreviousTrack)
|
||||
CMain.BackgroundMusic.Previous();
|
||||
else if (KeyEvent.Key == Keys.MediaPlayPause)
|
||||
{
|
||||
if (CMain.BackgroundMusic.IsPlaying())
|
||||
CMain.BackgroundMusic.Pause();
|
||||
else
|
||||
CMain.BackgroundMusic.Play();
|
||||
}
|
||||
|
||||
if (Diff != 0)
|
||||
{
|
||||
switch (CGraphics.CurrentScreen)
|
||||
{
|
||||
case EScreens.ScreenSong:
|
||||
if (CSongs.Category != -1)
|
||||
CConfig.PreviewMusicVolume += Diff;
|
||||
else
|
||||
CConfig.BackgroundMusicVolume += Diff;
|
||||
break;
|
||||
|
||||
case EScreens.ScreenSing:
|
||||
CConfig.GameMusicVolume += Diff;
|
||||
break;
|
||||
|
||||
default:
|
||||
CConfig.BackgroundMusicVolume += Diff;
|
||||
CBackgroundMusic.ApplyVolume();
|
||||
break;
|
||||
}
|
||||
CConfig.SaveConfig();
|
||||
}
|
||||
|
||||
if (_CurrentPopupScreen == EPopupScreens.NoPopup && Diff != 0)
|
||||
{
|
||||
ShowPopup(EPopupScreens.PopupVolumeControl);
|
||||
_VolumePopupTimer.Reset();
|
||||
_VolumePopupTimer.Start();
|
||||
}
|
||||
|
||||
CMain.BackgroundMusic.ApplyVolume();
|
||||
}
|
||||
|
||||
if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.F1))
|
||||
{
|
||||
CSettings.GameState = EGameState.EditTheme;
|
||||
@@ -596,22 +641,17 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
ShowPopup(EPopupScreens.PopupVolumeControl);
|
||||
_VolumePopupTimer.Reset();
|
||||
_VolumePopupTimer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
if (!isOverPopupVolumeControl && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
|
||||
{
|
||||
HidePopup(EPopupScreens.PopupVolumeControl);
|
||||
_VolumePopupTimer.Reset();
|
||||
}
|
||||
|
||||
bool handled = false;
|
||||
if (_CurrentPopupScreen != EPopupScreens.NoPopup)
|
||||
handled = _PopupScreens[(int)_CurrentPopupScreen].HandleMouse(MouseEvent);
|
||||
|
||||
if (handled && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
|
||||
_Screens[(int)_CurrentScreen].ApplyVolume();
|
||||
|
||||
|
||||
if (!handled && !_Fading && (_Cursor.IsActive || MouseEvent.LB || MouseEvent.RB || MouseEvent.MB))
|
||||
Resume &= _Screens[(int)_CurrentScreen].HandleMouse(MouseEvent);
|
||||
|
||||
@@ -665,34 +705,17 @@ namespace Vocaluxe.Base
|
||||
|
||||
private static bool Update()
|
||||
{
|
||||
//User changed volume with keyboard, pop-up isn't visible yet
|
||||
if ((_SavedPreviewMusicVolume != CConfig.PreviewMusicVolume || _SavedGameMusicVolume != CConfig.GameMusicVolume || _SavedBackgroundMusicVolume != CConfig.BackgroundMusicVolume)
|
||||
&& (_CurrentPopupScreen != EPopupScreens.PopupVolumeControl && !_VolumePopupTimer.IsRunning))
|
||||
{
|
||||
_VolumePopupTimer.Start();
|
||||
_SavedBackgroundMusicVolume = CConfig.BackgroundMusicVolume;
|
||||
_SavedGameMusicVolume = CConfig.GameMusicVolume;
|
||||
_SavedPreviewMusicVolume = CConfig.PreviewMusicVolume;
|
||||
}
|
||||
//User changed volume with keyboard, pop-up is already visible
|
||||
else if ((_SavedPreviewMusicVolume != CConfig.PreviewMusicVolume || _SavedGameMusicVolume != CConfig.GameMusicVolume || _SavedBackgroundMusicVolume != CConfig.BackgroundMusicVolume)
|
||||
&& (_CurrentPopupScreen == EPopupScreens.PopupVolumeControl && _VolumePopupTimer.IsRunning))
|
||||
{
|
||||
_VolumePopupTimer.Reset();
|
||||
_VolumePopupTimer.Start();
|
||||
_SavedBackgroundMusicVolume = CConfig.BackgroundMusicVolume;
|
||||
_SavedGameMusicVolume = CConfig.GameMusicVolume;
|
||||
_SavedPreviewMusicVolume = CConfig.PreviewMusicVolume;
|
||||
}
|
||||
if (_VolumePopupTimer.IsRunning && _VolumePopupTimer.ElapsedMilliseconds < 1500 && _CurrentPopupScreen != EPopupScreens.PopupVolumeControl)
|
||||
ShowPopup(EPopupScreens.PopupVolumeControl);
|
||||
if(_VolumePopupTimer.IsRunning && _VolumePopupTimer.ElapsedMilliseconds >= 1500 && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
|
||||
{
|
||||
_VolumePopupTimer.Reset();
|
||||
HidePopup(EPopupScreens.PopupVolumeControl);
|
||||
}
|
||||
if (!_Cursor.IsActive && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
|
||||
HidePopup(EPopupScreens.PopupVolumeControl);
|
||||
|
||||
if (_VolumePopupTimer.IsRunning)
|
||||
{
|
||||
_Cursor.FadeIn();
|
||||
}
|
||||
|
||||
if (_CurrentPopupScreen != EPopupScreens.NoPopup)
|
||||
_PopupScreens[(int)_CurrentPopupScreen].UpdateGame();
|
||||
return _Screens[(int)_CurrentScreen].UpdateGame();
|
||||
|
||||
@@ -224,9 +224,9 @@ namespace Vocaluxe.Lib.Input.WiiMote
|
||||
else if (ws.ButtonState.Home && !_ButtonStates[6])
|
||||
key = Keys.Space;
|
||||
else if (ws.ButtonState.Minus && !_ButtonStates[7])
|
||||
key = Keys.PageDown;
|
||||
key = Keys.Subtract;
|
||||
else if (ws.ButtonState.Plus && !_ButtonStates[8])
|
||||
key = Keys.PageUp;
|
||||
key = Keys.Add;
|
||||
else if (ws.ButtonState.One && !_ButtonStates[9])
|
||||
key = Keys.Enter;
|
||||
else if (ws.ButtonState.Two && !_ButtonStates[10])
|
||||
|
||||
@@ -48,22 +48,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
public override bool HandleInput(KeyEvent KeyEvent)
|
||||
{
|
||||
base.HandleInput(KeyEvent);
|
||||
if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.Escape:
|
||||
case Keys.Back:
|
||||
CGraphics.HidePopup(EPopupScreens.PopupVolumeControl);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateSlides();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -95,7 +80,6 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
else if (MouseEvent.RB)
|
||||
{
|
||||
//CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -104,21 +88,7 @@ namespace Vocaluxe.Screens
|
||||
public override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
switch (CGraphics.CurrentScreen)
|
||||
{
|
||||
case EScreens.ScreenSong:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.PreviewMusicVolume / 5);
|
||||
break;
|
||||
|
||||
case EScreens.ScreenSing:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.GameMusicVolume / 5);
|
||||
break;
|
||||
|
||||
default:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.BackgroundMusicVolume / 5);
|
||||
break;
|
||||
}
|
||||
UpdateSlides();
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
@@ -139,7 +109,10 @@ namespace Vocaluxe.Screens
|
||||
switch (CGraphics.CurrentScreen)
|
||||
{
|
||||
case EScreens.ScreenSong:
|
||||
CConfig.PreviewMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
|
||||
if (CSongs.Category != -1)
|
||||
CConfig.PreviewMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
|
||||
else
|
||||
CConfig.BackgroundMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
|
||||
break;
|
||||
|
||||
case EScreens.ScreenSing:
|
||||
@@ -153,5 +126,23 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
CConfig.SaveConfig();
|
||||
}
|
||||
|
||||
private void UpdateSlides()
|
||||
{
|
||||
switch (CGraphics.CurrentScreen)
|
||||
{
|
||||
case EScreens.ScreenSong:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.PreviewMusicVolume / 5);
|
||||
break;
|
||||
|
||||
case EScreens.ScreenSing:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.GameMusicVolume / 5);
|
||||
break;
|
||||
|
||||
default:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.BackgroundMusicVolume / 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1091,27 +1091,7 @@ namespace Vocaluxe.Menu
|
||||
if (KeyEvent.Key == Keys.Right)
|
||||
NextElement();
|
||||
}
|
||||
if (_Base.BackgroundMusic.IsDisabled())
|
||||
{
|
||||
if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp))
|
||||
_Base.Config.SetBackgroundMusicVolume(_Base.Config.GetBackgroundMusicVolume() + 5);
|
||||
else if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown))
|
||||
_Base.Config.SetBackgroundMusicVolume(_Base.Config.GetBackgroundMusicVolume() - 5);
|
||||
else if (KeyEvent.Key == Keys.MediaNextTrack)
|
||||
_Base.BackgroundMusic.Next();
|
||||
else if (KeyEvent.Key == Keys.MediaPreviousTrack)
|
||||
_Base.BackgroundMusic.Previous();
|
||||
else if (KeyEvent.Key == Keys.MediaPlayPause)
|
||||
{
|
||||
if (_Base.BackgroundMusic.IsPlaying())
|
||||
_Base.BackgroundMusic.Pause();
|
||||
else
|
||||
_Base.BackgroundMusic.Play();
|
||||
}
|
||||
|
||||
_Base.BackgroundMusic.ApplyVolume();
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -116,6 +116,11 @@ namespace Vocaluxe.Menu
|
||||
if (_MaxWidth != value)
|
||||
{
|
||||
_MaxWidth = value;
|
||||
if (_MaxWidth > 0)
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), _MaxWidth, 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), 3f * _Base.Settings.GetRenderW(), 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
|
||||
_PositionNeedsUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user