Merge branch 'Automatic_Covers' into develop
Conflicts: Vocaluxe/Base/CBackgroundMusic.cs VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs
This commit is contained in:
commit
f1c89b9a8e
94 files changed
+4513
-3344
No files matched your search
@@ -17,6 +17,7 @@
|
||||
|
||||
using System.Xml;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
|
||||
@@ -23,34 +23,26 @@ using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
[XmlType("SongMenu")]
|
||||
public struct SThemeSongMenu
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("CoverBackground")]
|
||||
public string CoverBackgroundName;
|
||||
[XmlElement("CoverBigBackground")]
|
||||
public string CoverBigBackgroundName;
|
||||
[XmlElement("DuetIcon")]
|
||||
public string DuetIconName;
|
||||
[XmlElement("VideoIcon")]
|
||||
public string VideoIconName;
|
||||
[XmlElement("MedleyCalcIcon")]
|
||||
public string MedleyCalcIcon;
|
||||
[XmlElement("MedleyTagIcon")]
|
||||
public string MedleyTagIcon;
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("CoverBackground")] public string CoverBackgroundName;
|
||||
[XmlElement("CoverBigBackground")] public string CoverBigBackgroundName;
|
||||
[XmlElement("DuetIcon")] public string DuetIconName;
|
||||
[XmlElement("VideoIcon")] public string VideoIconName;
|
||||
[XmlElement("MedleyCalcIcon")] public string MedleyCalcIcon;
|
||||
[XmlElement("MedleyTagIcon")] public string MedleyTagIcon;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
|
||||
//public SThemeSongMenuBook songMenuBook;
|
||||
//public SThemeSongMenuDreidel songMenuDreidel;
|
||||
//public SThemeSongMenuList songMenuList;
|
||||
[XmlElement("SongMenuTileBoard")]
|
||||
public SThemeSongMenuTileBoard SongMenuTileBoard;
|
||||
|
||||
public SThemeSongMenu(SThemeSongMenu theme)
|
||||
@@ -69,65 +61,48 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
public struct SThemeSongMenuTileBoard
|
||||
{
|
||||
[XmlElement("NumW")]
|
||||
/// <summary>
|
||||
/// Number of tiles horizontal
|
||||
/// </summary>
|
||||
public int NumW;
|
||||
|
||||
[XmlElement("NumH")]
|
||||
/// <summary>
|
||||
/// Number of tiles vertical
|
||||
/// </summary>
|
||||
public int NumH;
|
||||
|
||||
[XmlElement("NumWsmall")]
|
||||
/// <summary>
|
||||
/// Number of tiles horizontal in small-modus
|
||||
/// </summary>
|
||||
public int NumWsmall;
|
||||
|
||||
[XmlElement("NumHsmall")]
|
||||
|
||||
/// <summary>
|
||||
/// Number of tiles vertical in small-modus
|
||||
/// </summary>
|
||||
public int NumHsmall;
|
||||
|
||||
[XmlElement("SpaceW")]
|
||||
/// <summary>
|
||||
/// Space between tiles horizontal
|
||||
/// </summary>
|
||||
public float SpaceW;
|
||||
|
||||
[XmlElement("SpaceH")]
|
||||
/// <summary>
|
||||
/// Space between tiles vertical
|
||||
/// </summary>
|
||||
public float SpaceH;
|
||||
|
||||
[XmlElement("TileRect")]
|
||||
public SRectF TileRect;
|
||||
[XmlElement("TileRectSmall")]
|
||||
public SRectF TileRectSmall;
|
||||
|
||||
[XmlElement("TextArtist")]
|
||||
public SThemeText TextArtist;
|
||||
[XmlElement("TextTitle")]
|
||||
public SThemeText TextTitle;
|
||||
[XmlElement("TextSongLength")]
|
||||
public SThemeText TextSongLength;
|
||||
|
||||
[XmlElement("StaticCoverBig")]
|
||||
public SThemeStatic StaticCoverBig;
|
||||
[XmlElement("StaticTextBG")]
|
||||
public SThemeStatic StaticTextBG;
|
||||
[XmlElement("StaticDuetIcon")]
|
||||
public SThemeStatic StaticDuetIcon;
|
||||
[XmlElement("StaticVideoIcon")]
|
||||
public SThemeStatic StaticVideoIcon;
|
||||
[XmlElement("StaticMedleyCalcIcon")]
|
||||
public SThemeStatic StaticMedleyCalcIcon;
|
||||
[XmlElement("StaticMedleyTagIcon")]
|
||||
public SThemeStatic StaticMedleyTagIcon;
|
||||
}
|
||||
|
||||
@@ -278,7 +253,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
return _ThemeLoaded;
|
||||
}
|
||||
|
||||
#endregion Theme
|
||||
|
||||
public virtual void Init()
|
||||
@@ -294,7 +268,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
|
||||
public virtual void OnShow() {}
|
||||
|
||||
|
||||
public virtual void OnHide()
|
||||
{
|
||||
if(CBase.Graphics.GetNextScreen() != EScreens.ScreenNames || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF)
|
||||
@@ -373,7 +347,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_ColorInternal = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
else
|
||||
_ColorInternal = _Theme.Color.Color;
|
||||
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
@@ -38,8 +38,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private CStatic _MedleyCalcIcon;
|
||||
private CStatic _MedleyTagIcon;
|
||||
|
||||
private CTexture _CoverBigBGTexture;
|
||||
private CTexture _CoverBGTexture;
|
||||
private CTextureRef _CoverBigBGTexture;
|
||||
private CTextureRef _CoverBGTexture;
|
||||
|
||||
private CText _Artist;
|
||||
private CText _Title;
|
||||
@@ -494,20 +494,16 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
_TextBG.Draw();
|
||||
|
||||
CTexture vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
|
||||
if (vidtex != null)
|
||||
{
|
||||
if (vidtex.Color.A < 1)
|
||||
_CoverBig.Draw(EAspect.Crop);
|
||||
var bounds = new RectangleF(_CoverBig.Rect.X, _CoverBig.Rect.Y, _CoverBig.Rect.W, _CoverBig.Rect.H);
|
||||
RectangleF rect;
|
||||
CHelper.SetRect(bounds, out rect, vidtex.OrigAspect, EAspect.Crop);
|
||||
var vidRect = new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z);
|
||||
var vidRectBounds = new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f);
|
||||
SRectF rect = CHelper.FitInBounds(_CoverBig.Rect, vidtex.OrigAspect, EAspect.Crop);
|
||||
|
||||
CBase.Drawing.DrawTexture(vidtex, vidRect, vidtex.Color, vidRectBounds);
|
||||
CBase.Drawing.DrawTextureReflection(vidtex, vidRect, vidtex.Color, vidRectBounds, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
CBase.Drawing.DrawTexture(vidtex, rect);
|
||||
CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
}
|
||||
else
|
||||
_CoverBig.Draw(EAspect.Crop);
|
||||
|
||||
Reference in new issue
Block a user