Merge branch 'Better_Graphics_Handling' into develop
Conflicts: Vocaluxe/Base/CBackgroundMusic.cs Vocaluxe/Base/CCover.cs Vocaluxe/Base/CDataBase.cs Vocaluxe/Base/CDraw.cs Vocaluxe/Base/CMain.cs Vocaluxe/Base/CProfiles.cs Vocaluxe/Base/CTheme.cs Vocaluxe/Base/CVideo.cs Vocaluxe/Base/CWebcam.cs Vocaluxe/Base/Fonts/CFont.cs Vocaluxe/Base/Fonts/CGlyph.cs Vocaluxe/Lib/Draw/CDirect3D.cs Vocaluxe/Lib/Draw/CDrawWinForm.cs Vocaluxe/Lib/Draw/COpenGL.cs Vocaluxe/Lib/Draw/IDraw.cs Vocaluxe/Lib/Video/CVideoDecoder.cs Vocaluxe/Lib/Video/CVideoDecoderFFmpeg.cs Vocaluxe/Lib/Video/CVideoDecoderGstreamer.cs Vocaluxe/Lib/Video/IVideoDecoder.cs Vocaluxe/Lib/Webcam/CAForgeNet.cs Vocaluxe/Lib/Webcam/IWebcam.cs Vocaluxe/Screens/CScreenCredits.cs Vocaluxe/Screens/CScreenNames.cs Vocaluxe/Screens/CScreenOptionsVideo.cs Vocaluxe/Screens/CScreenProfiles.cs Vocaluxe/Screens/CScreenSing.cs VocaluxeLib/Menu/IMenu.cs VocaluxeLib/Songs/CCategory.cs VocaluxeLib/Songs/CSong.cs VocaluxeLib/Structs.cs VocaluxeLib/VocaluxeLib.csproj
This commit is contained in:
commit
9d13c32b93
56 files changed
+1579
-1772
No files matched your search
@@ -22,6 +22,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.PartyModes;
|
||||
|
||||
namespace VocaluxeLib.Menu.SongMenu
|
||||
@@ -104,7 +105,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private readonly List<int> _Streams = new List<int>();
|
||||
private int _Actsong = -1;
|
||||
private int _Actsongstream = -1;
|
||||
protected STexture _Vidtex = new STexture(-1);
|
||||
protected CTexture _Vidtex;
|
||||
|
||||
protected bool _Initialized;
|
||||
protected int _LastKnownNumSongs;
|
||||
@@ -351,7 +352,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
writer.WriteComment("<Color>: Tile color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName != "")
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -438,19 +439,21 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (_Actsong != _PreviewSelected)
|
||||
_SelectSong(_PreviewSelected);
|
||||
|
||||
if (_Streams.Count > 0 && _Video != -1)
|
||||
if (_Streams.Count <= 0 || _Video == -1)
|
||||
return;
|
||||
|
||||
if (CBase.Video.IsFinished(_Video) || CBase.Sound.IsFinished(_Actsongstream))
|
||||
{
|
||||
if (CBase.Video.IsFinished(_Video) || CBase.Sound.IsFinished(_Actsongstream))
|
||||
{
|
||||
CBase.Video.Close(_Video);
|
||||
_Video = -1;
|
||||
return;
|
||||
}
|
||||
CBase.Video.Close(_Video);
|
||||
_Video = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
float time = CBase.Sound.GetPosition(_Actsongstream);
|
||||
float time = CBase.Sound.GetPosition(_Actsongstream);
|
||||
|
||||
float vtime;
|
||||
CBase.Video.GetFrame(_Video, ref _Vidtex, time, out vtime);
|
||||
float vtime;
|
||||
if (CBase.Video.GetFrame(_Video, ref _Vidtex, time, out vtime))
|
||||
{
|
||||
if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
|
||||
_Vidtex.Color.A = _VideoFadeTimer.ElapsedMilliseconds / 3000f;
|
||||
else
|
||||
@@ -464,7 +467,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
public virtual void OnShow()
|
||||
{
|
||||
_Actsongstream = -1;
|
||||
_Vidtex = new STexture(-1);
|
||||
_Vidtex = null;
|
||||
}
|
||||
|
||||
public virtual void OnHide()
|
||||
@@ -546,7 +549,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
Init();
|
||||
|
||||
if (_Theme.ColorName != "")
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
_Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user