Fixed flickering of bg-slideshow.
This commit is contained in:
1 parent
21ff3962ec
commit
88a8d594ea
2 files changed
+11
-9
No files matched your search
@@ -430,6 +430,7 @@ namespace Vocaluxe.Screens
|
|||||||
private bool _UpdateBackground()
|
private bool _UpdateBackground()
|
||||||
{
|
{
|
||||||
string[] photos = CVocaluxeServer.getPhotosOfThisRound();
|
string[] photos = CVocaluxeServer.getPhotosOfThisRound();
|
||||||
|
photos = new string[] { "C:\\Users\\Florian\\Desktop\\IMG_20131128_140016.jpg", "C:\\Users\\Florian\\Desktop\\P1080632.jpg" };
|
||||||
_SlideShowBG.RemoveSlideShowTextures();
|
_SlideShowBG.RemoveSlideShowTextures();
|
||||||
foreach (string photo in photos)
|
foreach (string photo in photos)
|
||||||
_SlideShowBG.AddSlideShowTexture(photo);
|
_SlideShowBG.AddSlideShowTexture(photo);
|
||||||
|
|||||||
@@ -280,6 +280,15 @@ namespace VocaluxeLib.Menu
|
|||||||
_SlideShowCurrent = 0;
|
_SlideShowCurrent = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_SlideShowTimer.ElapsedMilliseconds >= (CBase.Settings.GetSlideShowFadeTime() + CBase.Settings.GetSlideShowImageTime()))
|
||||||
|
{
|
||||||
|
_SlideShowTimer.Restart();
|
||||||
|
if (_SlideShowCurrent + 1 < _SlideShowTextures.Count)
|
||||||
|
_SlideShowCurrent++;
|
||||||
|
else if (_SlideShowCurrent != 0)
|
||||||
|
_SlideShowCurrent = 0;
|
||||||
|
}
|
||||||
|
|
||||||
CTexture texture = _SlideShowTextures[_SlideShowCurrent];
|
CTexture texture = _SlideShowTextures[_SlideShowCurrent];
|
||||||
|
|
||||||
if (texture == null)
|
if (texture == null)
|
||||||
@@ -291,15 +300,7 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
CBase.Drawing.DrawTexture(texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
CBase.Drawing.DrawTexture(texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
||||||
|
|
||||||
if (_SlideShowTimer.ElapsedMilliseconds >= (CBase.Settings.GetSlideShowFadeTime() + CBase.Settings.GetSlideShowImageTime()))
|
if (_SlideShowTimer.ElapsedMilliseconds >= CBase.Settings.GetSlideShowImageTime())
|
||||||
{
|
|
||||||
_SlideShowTimer.Restart();
|
|
||||||
if (_SlideShowCurrent + 1 < _SlideShowTextures.Count)
|
|
||||||
_SlideShowCurrent++;
|
|
||||||
else if (_SlideShowCurrent != 0)
|
|
||||||
_SlideShowCurrent = 0;
|
|
||||||
}
|
|
||||||
else if (_SlideShowTimer.ElapsedMilliseconds >= CBase.Settings.GetSlideShowImageTime())
|
|
||||||
{
|
{
|
||||||
if (_SlideShowCurrent + 1 < _SlideShowTextures.Count)
|
if (_SlideShowCurrent + 1 < _SlideShowTextures.Count)
|
||||||
texture = _SlideShowTextures[_SlideShowCurrent + 1];
|
texture = _SlideShowTextures[_SlideShowCurrent + 1];
|
||||||
|
|||||||
Reference in new issue
Block a user