BG-Music-Repeat-Function works now as it should.
This commit is contained in:
1 parent
dd427e9c47
commit
2340011ba3
2 files changed
+24
-3
No files matched your search
@@ -34,6 +34,7 @@ namespace Vocaluxe.Base
|
|||||||
private static bool _Playing;
|
private static bool _Playing;
|
||||||
private static bool _Disabled;
|
private static bool _Disabled;
|
||||||
private static bool _CanSing;
|
private static bool _CanSing;
|
||||||
|
private static bool _RepeatSong;
|
||||||
|
|
||||||
public static bool VideoEnabled
|
public static bool VideoEnabled
|
||||||
{
|
{
|
||||||
@@ -84,6 +85,18 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool RepeatSong
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _RepeatSong;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_RepeatSong = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static int SongID
|
public static int SongID
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -228,7 +241,14 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
bool finished = CSound.IsFinished(_CurrentMusicStream);
|
bool finished = CSound.IsFinished(_CurrentMusicStream);
|
||||||
if (_Playing && (timeToPlay <= CSettings.BackgroundMusicFadeTime || finished))
|
if (_Playing && (timeToPlay <= CSettings.BackgroundMusicFadeTime || finished))
|
||||||
Next();
|
if (_RepeatSong)
|
||||||
|
{
|
||||||
|
CSound.SetPosition(_CurrentMusicStream, 0);
|
||||||
|
if (_VideoEnabled && _Video != -1)
|
||||||
|
CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ namespace Vocaluxe.Screens
|
|||||||
if (Buttons[htButtons(ButtonPause)].Selected)
|
if (Buttons[htButtons(ButtonPause)].Selected)
|
||||||
CBackgroundMusic.Pause();
|
CBackgroundMusic.Pause();
|
||||||
if (Buttons[htButtons(ButtonRepeat)].Selected)
|
if (Buttons[htButtons(ButtonRepeat)].Selected)
|
||||||
CBackgroundMusic.Repeat();
|
CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
|
||||||
if (Buttons[htButtons(ButtonShowVideo)].Selected)
|
if (Buttons[htButtons(ButtonShowVideo)].Selected)
|
||||||
VideoPreview = !VideoPreview;
|
VideoPreview = !VideoPreview;
|
||||||
if (Buttons[htButtons(ButtonSing)].Selected)
|
if (Buttons[htButtons(ButtonSing)].Selected)
|
||||||
@@ -162,7 +162,7 @@ namespace Vocaluxe.Screens
|
|||||||
if (Buttons[htButtons(ButtonPause)].Selected)
|
if (Buttons[htButtons(ButtonPause)].Selected)
|
||||||
CBackgroundMusic.Pause();
|
CBackgroundMusic.Pause();
|
||||||
if (Buttons[htButtons(ButtonRepeat)].Selected)
|
if (Buttons[htButtons(ButtonRepeat)].Selected)
|
||||||
CBackgroundMusic.Repeat();
|
CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
|
||||||
if (Buttons[htButtons(ButtonShowVideo)].Selected)
|
if (Buttons[htButtons(ButtonShowVideo)].Selected)
|
||||||
VideoPreview = !VideoPreview;
|
VideoPreview = !VideoPreview;
|
||||||
if (Buttons[htButtons(ButtonSing)].Selected)
|
if (Buttons[htButtons(ButtonSing)].Selected)
|
||||||
@@ -187,6 +187,7 @@ namespace Vocaluxe.Screens
|
|||||||
Statics[htStatics(StaticCover)].Visible = !_VideoPreview || !CBackgroundMusic.SongHasVideo;
|
Statics[htStatics(StaticCover)].Visible = !_VideoPreview || !CBackgroundMusic.SongHasVideo;
|
||||||
Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = VideoBackground;
|
Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = VideoBackground;
|
||||||
Buttons[htButtons(ButtonShowVideo)].Pressed = _VideoPreview;
|
Buttons[htButtons(ButtonShowVideo)].Pressed = _VideoPreview;
|
||||||
|
Buttons[htButtons(ButtonRepeat)].Pressed = CBackgroundMusic.RepeatSong;
|
||||||
Buttons[htButtons(ButtonSing)].Visible = CBackgroundMusic.CanSing;
|
Buttons[htButtons(ButtonSing)].Visible = CBackgroundMusic.CanSing;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user