diff --git a/VocaluxeLib/Menu/CBackground.cs b/VocaluxeLib/Menu/CBackground.cs index 0aed7bea..eabf5758 100644 --- a/VocaluxeLib/Menu/CBackground.cs +++ b/VocaluxeLib/Menu/CBackground.cs @@ -48,6 +48,16 @@ namespace VocaluxeLib.Menu [XmlElement("Skin")] public string TextureName; public SThemeColor Color; + + public SThemeBackground(SThemeBackground theme) + { + Name = theme.Name; + Type = theme.Type; + SlideShowTextures = theme.SlideShowTextures; + VideoName = theme.VideoName; + TextureName = theme.TextureName; + Color = new SThemeColor(theme.Color); + } } public class CBackground : IMenuElement @@ -256,7 +266,7 @@ namespace VocaluxeLib.Menu public SThemeBackground GetTheme() { - return _Theme; + return new SThemeBackground(_Theme); } #endregion public diff --git a/VocaluxeLib/Menu/CButton.cs b/VocaluxeLib/Menu/CButton.cs index a4a00b2b..f3a8d837 100644 --- a/VocaluxeLib/Menu/CButton.cs +++ b/VocaluxeLib/Menu/CButton.cs @@ -42,7 +42,20 @@ namespace VocaluxeLib.Menu [XmlElement("Reflection")] public SReflection Reflection; [XmlElement("SelReflection")] - public SReflection SelReflection; + public SReflection SelReflection; + + public SThemeButton(SThemeButton theme) + { + Name = theme.Name; + TextureName = theme.TextureName; + SelTextureName = theme.SelTextureName; + Rect = new SRectF(theme.Rect); + Color = new SThemeColor(theme.Color); + SelColor = new SThemeColor(theme.SelColor); + Text = new SThemeText(theme.Text); + Reflection = new SReflection(theme.Reflection); + SelReflection = new SReflection(theme.SelReflection); + } } public class CButton : IMenuElement @@ -396,7 +409,7 @@ namespace VocaluxeLib.Menu public SThemeButton GetTheme() { - return _Theme; + return new SThemeButton(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/CEqualizer.cs b/VocaluxeLib/Menu/CEqualizer.cs index d0fe220b..ae35dfb3 100644 --- a/VocaluxeLib/Menu/CEqualizer.cs +++ b/VocaluxeLib/Menu/CEqualizer.cs @@ -53,6 +53,20 @@ namespace VocaluxeLib.Menu public SThemeColor MaxColor; [XmlElement("Reflection")] public SReflection Reflection; + + public SThemeEqualizer(SThemeEqualizer theme) + { + Name = theme.Name; + TextureName = theme.TextureName; + Rect = new SRectF(theme.Rect); + NumBars = theme.NumBars; + Space = theme.Space; + Style = theme.Style; + DrawNegative = theme.DrawNegative; + Color = new SThemeColor(theme.Color); + MaxColor = new SThemeColor(theme.MaxColor); + Reflection = new SReflection(theme.Reflection); + } } public class CEqualizer : IMenuElement @@ -332,7 +346,7 @@ namespace VocaluxeLib.Menu public SThemeEqualizer GetTheme() { - return _Theme; + return new SThemeEqualizer(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/CLyric.cs b/VocaluxeLib/Menu/CLyric.cs index 8117f912..f215e588 100644 --- a/VocaluxeLib/Menu/CLyric.cs +++ b/VocaluxeLib/Menu/CLyric.cs @@ -35,6 +35,14 @@ namespace VocaluxeLib.Menu public SThemeColor Color; [XmlElement("SColor")] public SThemeColor SColor; + + public SThemeLyrics(SThemeLyrics theme) + { + Name = theme.Name; + Rect = new SRectF(theme.Rect); + Color = new SThemeColor(theme.Color); + SColor = new SThemeColor(theme.SColor); + } } public class CLyric : IMenuElement @@ -499,7 +507,7 @@ namespace VocaluxeLib.Menu public SThemeLyrics GetTheme() { - return _Theme; + return new SThemeLyrics(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/CNameSelection.cs b/VocaluxeLib/Menu/CNameSelection.cs index ab7f1a45..7e2fcbbd 100644 --- a/VocaluxeLib/Menu/CNameSelection.cs +++ b/VocaluxeLib/Menu/CNameSelection.cs @@ -40,6 +40,16 @@ namespace VocaluxeLib.Menu public string TextureTileSelectedName; [XmlElement("Tiles")] public SThemeNameSelectionTiles Tiles; + + public SThemeNameSelection(SThemeNameSelection theme) + { + Name = theme.Name; + Rect = new SRectF(theme.Rect); + TextureEmptyTileName = theme.TextureEmptyTileName; + ColorEmptyTile = new SThemeColor(theme.ColorEmptyTile); + TextureTileSelectedName = theme.TextureTileSelectedName; + Tiles = new SThemeNameSelectionTiles(theme.Tiles); + } } public struct SThemeNameSelectionTiles @@ -54,6 +64,15 @@ namespace VocaluxeLib.Menu public int NumH; [XmlElement("Name")] public SThemeNameSelectionName Name; + + public SThemeNameSelectionTiles(SThemeNameSelectionTiles theme) + { + W = theme.W; + H = theme.H; + NumW = theme.NumW; + NumH = theme.NumH; + Name = new SThemeNameSelectionName(theme.Name); + } } public struct SThemeNameSelectionName @@ -68,6 +87,15 @@ namespace VocaluxeLib.Menu public EStyle Style; [XmlElement("Color")] public SThemeColor Color; + + public SThemeNameSelectionName(SThemeNameSelectionName theme) + { + Space = theme.Space; + Height = theme.Height; + Font = theme.Font; + Style = theme.Style; + Color = new SThemeColor(theme.Color); + } } public class CNameSelection : IMenuElement @@ -609,7 +637,7 @@ namespace VocaluxeLib.Menu public SThemeNameSelection GetTheme() { - return _Theme; + return new SThemeNameSelection(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/CParticle.cs b/VocaluxeLib/Menu/CParticle.cs index ee555e7f..6be85739 100644 --- a/VocaluxeLib/Menu/CParticle.cs +++ b/VocaluxeLib/Menu/CParticle.cs @@ -42,6 +42,17 @@ namespace VocaluxeLib.Menu public float Size; [XmlElement("MaxNumber")] public int MaxNumber; + + public SThemeParticleEffect(SThemeParticleEffect theme) + { + Name = theme.Name; + TextureName = theme.TextureName; + Rect = new SRectF(theme.Rect); + Color = new SThemeColor(theme.Color); + Type = theme.Type; + Size = theme.Size; + MaxNumber = theme.MaxNumber; + } } public enum EParticleType @@ -632,7 +643,7 @@ namespace VocaluxeLib.Menu public SThemeParticleEffect GetTheme() { - return _Theme; + return new SThemeParticleEffect(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index 32f2c4b3..d8972b32 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -119,6 +119,37 @@ namespace VocaluxeLib.Menu public SThemeSelectSlide SSelectSlideGameMode; [XmlIgnore] public CSelectSlide SelectSlideGameMode; + + public SThemePlaylist(SThemePlaylist theme) + { + Name = theme.Name; + Rect = theme.Rect; + EntryHeight = theme.EntryHeight; + TextureBackgroundName = theme.TextureBackgroundName; + SelTextureBackgroundName = theme.SelTextureBackgroundName; + ColorBackground = new SThemeColor(theme.ColorBackground); + SelColorBackground = new SThemeColor(theme.SelColorBackground); + SText1 = new SThemeText(theme.SText1); + Text1 = new CText(theme.Text1); + SStaticCover = new SThemeStatic(theme.SStaticCover); + StaticCover = new CStatic(theme.StaticCover); + SStaticPlaylistHeader = new SThemeStatic(theme.SStaticPlaylistHeader); + StaticPlaylistHeader = new CStatic(theme.StaticPlaylistHeader); + SStaticPlaylistFooter = new SThemeStatic(theme.SStaticPlaylistFooter); + StaticPlaylistFooter = new CStatic(theme.StaticPlaylistFooter); + SButtonPlaylistName = new SThemeButton(theme.SButtonPlaylistName); + ButtonPlaylistName = new CButton(theme.ButtonPlaylistName); + SButtonPlaylistClose = new SThemeButton(theme.SButtonPlaylistClose); + ButtonPlaylistClose = new CButton(theme.ButtonPlaylistClose); + SButtonPlaylistSave = new SThemeButton(theme.SButtonPlaylistSave); + ButtonPlaylistSave = new CButton(theme.ButtonPlaylistSave); + SButtonPlaylistDelete = new SThemeButton(theme.SButtonPlaylistDelete); + ButtonPlaylistDelete = new CButton(theme.ButtonPlaylistDelete); + SButtonPlaylistSing = new SThemeButton(theme.SButtonPlaylistSing); + ButtonPlaylistSing = new CButton(theme.ButtonPlaylistSing); + SSelectSlideGameMode = new SThemeSelectSlide(theme.SSelectSlideGameMode); + SelectSlideGameMode = new CSelectSlide(theme.SelectSlideGameMode); + } } public class CPlaylist : IMenuElement @@ -1297,7 +1328,7 @@ namespace VocaluxeLib.Menu public SThemePlaylist GetTheme() { - return _Theme; + return new SThemePlaylist(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/CScreenSetting.cs b/VocaluxeLib/Menu/CScreenSetting.cs index 237493dd..4adea9f2 100644 --- a/VocaluxeLib/Menu/CScreenSetting.cs +++ b/VocaluxeLib/Menu/CScreenSetting.cs @@ -39,6 +39,13 @@ namespace VocaluxeLib.Menu public string Value; [XmlElement("Type")] public ESettingType Type; + + public SScreenSetting(SScreenSetting theme) + { + Name = theme.Name; + Value = theme.Value; + Type = theme.Type; + } } // ReSharper disable ClassNeverInstantiated.Global @@ -125,7 +132,7 @@ namespace VocaluxeLib.Menu public SScreenSetting GetTheme() { - return _Theme; + return new SScreenSetting(_Theme); } #region Private diff --git a/VocaluxeLib/Menu/CSelectSlide.cs b/VocaluxeLib/Menu/CSelectSlide.cs index 24f455e0..20d96052 100644 --- a/VocaluxeLib/Menu/CSelectSlide.cs +++ b/VocaluxeLib/Menu/CSelectSlide.cs @@ -87,6 +87,35 @@ namespace VocaluxeLib.Menu [XmlElement("NumVisible")] public int NumVisible; + + public SThemeSelectSlide(SThemeSelectSlide theme) + { + Name = theme.Name; + TextureName = theme.TextureName; + TextureArrowLeftName = theme.TextureArrowLeftName; + TextureArrowRightName = theme.TextureArrowRightName; + SelTextureName = theme.SelTextureName; + SelTextureArrowLeftName = theme.SelTextureArrowLeftName; + SelTextureArrowRightName = theme.SelTextureArrowRightName; + HighlightTextureName = theme.HighlightTextureName; + Rect = new SRectF(theme.Rect); + RectArrowLeft = new SRectF(theme.RectArrowLeft); + RectArrowRight = new SRectF(theme.RectArrowRight); + Color = new SThemeColor(theme.Color); + SColor = new SThemeColor(theme.SColor); + HColor = new SThemeColor(theme.HColor); + ArrowColor = new SThemeColor(theme.ArrowColor); + ArrowSColor = new SThemeColor(theme.ArrowSColor); + TextColor = new SThemeColor(theme.TextColor); + TextSColor = new SThemeColor(theme.TextSColor); + TextH = theme.TextH; + TextRelativeX = theme.TextRelativeX; + TextRelativeY = theme.TextRelativeY; + TextMaxW = theme.TextMaxW; + TextFont = theme.TextFont; + TextStyle = theme.TextStyle; + NumVisible = theme.NumVisible; + } } public class CSelectSlide : IMenuElement, ICloneable @@ -870,7 +899,7 @@ namespace VocaluxeLib.Menu public SThemeSelectSlide GetTheme() { - return _Theme; + return new SThemeSelectSlide(_Theme); } public void UnloadTextures() {} diff --git a/VocaluxeLib/Menu/CStatic.cs b/VocaluxeLib/Menu/CStatic.cs index de4bbe3a..f9ee10f5 100644 --- a/VocaluxeLib/Menu/CStatic.cs +++ b/VocaluxeLib/Menu/CStatic.cs @@ -32,6 +32,15 @@ namespace VocaluxeLib.Menu public SThemeColor Color; public SRectF Rect; public SReflection Reflection; + + public SThemeStatic(SThemeStatic theme) + { + Name = theme.Name; + TextureName = theme.TextureName; + Color = new SThemeColor(theme.Color); + Rect = new SRectF(theme.Rect); + Reflection = new SReflection(theme.Reflection); + } } public class CStatic : IMenuElement @@ -254,7 +263,7 @@ namespace VocaluxeLib.Menu public SThemeStatic GetTheme() { - return _Theme; + return new SThemeStatic(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/CText.cs b/VocaluxeLib/Menu/CText.cs index 5100e2b5..cf58092d 100644 --- a/VocaluxeLib/Menu/CText.cs +++ b/VocaluxeLib/Menu/CText.cs @@ -49,8 +49,23 @@ namespace VocaluxeLib.Menu [XmlElement("Text")] public string Text; public SReflection Reflection; - - + + public SThemeText(SThemeText theme) + { + Name = theme.Name; + X = theme.X; + Y = theme.Y; + Z = theme.Z; + Height = theme.Height; + Color = new SThemeColor(theme.Color); + SColor = new SThemeColor(theme.SColor); + Align = theme.Align; + ResizeAlign = theme.ResizeAlign; + Style = theme.Style; + Font = theme.Font; + Text = theme.Text; + Reflection = new SReflection(theme.Reflection); + } } public class CText : IMenuElement @@ -578,7 +593,7 @@ namespace VocaluxeLib.Menu public SThemeText GetTheme() { - return _Theme; + return new SThemeText(_Theme); } #region ThemeEdit diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs index f6f984d2..98648ed3 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs @@ -44,16 +44,27 @@ namespace VocaluxeLib.Menu.SongMenu public string MedleyCalcIcon; [XmlElement("MedleyTagIcon")] public string MedleyTagIcon; - [XmlElement("ColorName")] - public string ColorName; [XmlElement("Color")] - public SColorF Color; + public SThemeColor Color; //public SThemeSongMenuBook songMenuBook; //public SThemeSongMenuDreidel songMenuDreidel; //public SThemeSongMenuList songMenuList; [XmlElement("SongMenuTileBoard")] public SThemeSongMenuTileBoard SongMenuTileBoard; + + public SThemeSongMenu(SThemeSongMenu theme) + { + Name = theme.Name; + CoverBackgroundName = theme.CoverBackgroundName; + CoverBigBackgroundName = theme.CoverBigBackgroundName; + DuetIconName = theme.DuetIconName; + VideoIconName = theme.VideoIconName; + MedleyCalcIcon = theme.MedleyCalcIcon; + MedleyTagIcon = theme.MedleyTagIcon; + Color = new SThemeColor(theme.Color); + SongMenuTileBoard = new SThemeSongMenuTileBoard(theme.SongMenuTileBoard); + } } public struct SThemeSongMenuTileBoard @@ -136,6 +147,36 @@ namespace VocaluxeLib.Menu.SongMenu public SThemeStatic SStaticMedleyTagIcon; [XmlIgnore] public CStatic StaticMedleyTagIcon; + + public SThemeSongMenuTileBoard(SThemeSongMenuTileBoard theme) + { + NumW = theme.NumW; + NumH = theme.NumH; + NumWsmall = theme.NumWsmall; + NumHsmall = theme.NumHsmall; + SpaceW = theme.SpaceW; + SpaceH = theme.SpaceH; + TileRect = new SRectF(theme.TileRect); + TileRectSmall = new SRectF(theme.TileRectSmall); + STextArtist = new SThemeText(theme.STextArtist); + TextArtist = new CText(theme.TextArtist); + STextTitle = new SThemeText(theme.STextTitle); + TextTitle = new CText(theme.TextTitle); + STextSongLength = new SThemeText(theme.STextSongLength); + TextSongLength = new CText(theme.TextSongLength); + SStaticCoverBig = new SThemeStatic(theme.SStaticCoverBig); + StaticCoverBig = new CStatic(theme.StaticCoverBig); + SStaticTextBG = new SThemeStatic(theme.SStaticTextBG); + StaticTextBG = new CStatic(theme.StaticTextBG); + SStaticDuetIcon = new SThemeStatic(theme.SStaticDuetIcon); + StaticDuetIcon = new CStatic(theme.StaticDuetIcon); + SStaticVideoIcon = new SThemeStatic(theme.SStaticVideoIcon); + StaticVideoIcon = new CStatic(theme.StaticVideoIcon); + SStaticMedleyCalcIcon = new SThemeStatic(theme.SStaticMedleyCalcIcon); + StaticMedleyCalcIcon = new CStatic(theme.StaticMedleyCalcIcon); + SStaticMedleyTagIcon = new SThemeStatic(theme.SStaticMedleyTagIcon); + StaticMedleyTagIcon = new CStatic(theme.StaticMedleyTagIcon); + } } abstract class CSongMenuFramework : ISongMenu @@ -233,7 +274,7 @@ namespace VocaluxeLib.Menu.SongMenu public SThemeSongMenu GetTheme() { - return _Theme; + return new SThemeSongMenu(_Theme); } public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex) @@ -248,8 +289,8 @@ namespace VocaluxeLib.Menu.SongMenu _ThemeLoaded &= xmlReader.GetValue(item + "/MedleyCalcIcon", out _Theme.MedleyCalcIcon, String.Empty); _ThemeLoaded &= xmlReader.GetValue(item + "/MedleyTagIcon", out _Theme.MedleyTagIcon, String.Empty); - if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty)) - _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out _ColorInternal); + if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty)) + _ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out _ColorInternal); else { _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref _ColorInternal.R); @@ -257,7 +298,7 @@ namespace VocaluxeLib.Menu.SongMenu _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/B", ref _ColorInternal.B); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref _ColorInternal.A); } - _Theme.Color = new SColorF(_ColorInternal); + _Theme.Color.Color = new SColorF(_ColorInternal); #region SongMenuTileBoard _ThemeLoaded &= xmlReader.TryGetIntValue(item + "/SongMenuTileBoard/NumW", ref _Theme.SongMenuTileBoard.NumW); @@ -339,8 +380,8 @@ namespace VocaluxeLib.Menu.SongMenu writer.WriteComment(": Tile color from ColorScheme (high priority)"); writer.WriteComment("or , , , (lower priority)"); - if (!String.IsNullOrEmpty(_Theme.ColorName)) - writer.WriteElementString("Color", _Theme.ColorName); + if (!String.IsNullOrEmpty(_Theme.Color.Name)) + writer.WriteElementString("Color", _Theme.Color.Name); else { writer.WriteElementString("R", _Color.R.ToString("#0.00")); @@ -495,8 +536,8 @@ namespace VocaluxeLib.Menu.SongMenu { Init(); - if (!String.IsNullOrEmpty(_Theme.ColorName)) - _ColorInternal = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID); + if (!String.IsNullOrEmpty(_Theme.Color.Name)) + _ColorInternal = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID); } public void ReloadTextures() diff --git a/VocaluxeLib/Structs.cs b/VocaluxeLib/Structs.cs index 41803958..e31047e5 100644 --- a/VocaluxeLib/Structs.cs +++ b/VocaluxeLib/Structs.cs @@ -72,6 +72,11 @@ namespace VocaluxeLib public bool ColorSpecified { get { return Name == ""; } } public bool NameSpecified { get { return Name != ""; } } + public SThemeColor(SThemeColor theme) + { + Color = new SColorF(theme.Color); + Name = theme.Name; + } } public struct SRectF