Fixed volume-control.
This commit is contained in:
1 parent
0ff2bb654f
commit
115afef0f1
2 files changed
+14
-9
No files matched your search
@@ -533,9 +533,9 @@ namespace Vocaluxe.Base
|
||||
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)
|
||||
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)
|
||||
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();
|
||||
@@ -555,13 +555,17 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
case EScreens.ScreenSong:
|
||||
if (CSongs.Category != -1)
|
||||
{
|
||||
CConfig.PreviewMusicVolume += Diff;
|
||||
_Screens[(int)_CurrentScreen].ApplyVolume();
|
||||
}
|
||||
else
|
||||
CConfig.BackgroundMusicVolume += Diff;
|
||||
break;
|
||||
|
||||
case EScreens.ScreenSing:
|
||||
CConfig.GameMusicVolume += Diff;
|
||||
_Screens[(int)_CurrentScreen].ApplyVolume();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -63,18 +63,18 @@ namespace Vocaluxe.Screens
|
||||
else if (MouseEvent.Wheel > 0 && CHelper.IsInBounds(_ScreenArea, MouseEvent))
|
||||
{
|
||||
if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel >= 0)
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel);
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel;
|
||||
else if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel < 0)
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(0);
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = 0;
|
||||
SaveConfig();
|
||||
return true;
|
||||
}
|
||||
else if (MouseEvent.Wheel < 0 && CHelper.IsInBounds(_ScreenArea, MouseEvent))
|
||||
{
|
||||
if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel < SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues)
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel);
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel;
|
||||
else if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel >= SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues)
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues - 1);
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues - 1;
|
||||
SaveConfig();
|
||||
return true;
|
||||
}
|
||||
@@ -93,6 +93,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
UpdateSlides();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -132,15 +133,15 @@ namespace Vocaluxe.Screens
|
||||
switch (CGraphics.CurrentScreen)
|
||||
{
|
||||
case EScreens.ScreenSong:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.PreviewMusicVolume / 5);
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = (int)(CConfig.PreviewMusicVolume / 5);
|
||||
break;
|
||||
|
||||
case EScreens.ScreenSing:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.GameMusicVolume / 5);
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = ((int)CConfig.GameMusicVolume / 5);
|
||||
break;
|
||||
|
||||
default:
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.BackgroundMusicVolume / 5);
|
||||
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = ((int)CConfig.BackgroundMusicVolume / 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user