diff --git a/VocaluxeLib/Menu/CBackground.cs b/VocaluxeLib/Menu/CBackground.cs index c032cd0f..46efea95 100644 --- a/VocaluxeLib/Menu/CBackground.cs +++ b/VocaluxeLib/Menu/CBackground.cs @@ -37,10 +37,10 @@ namespace VocaluxeLib.Menu public struct SThemeBackground { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Type")] public EBackgroundTypes Type; + public EBackgroundTypes Type; [XmlArray] public List SlideShowTextures; [XmlElement("Video")] public string VideoName; - [XmlElement("Skin")] public string TextureName; + public string Skin; public SThemeColor Color; } @@ -95,7 +95,7 @@ namespace VocaluxeLib.Menu _ThemeLoaded &= xmlReader.TryGetEnumValue(item + "/Type", ref _Theme.Type); bool vid = xmlReader.GetValue(item + "/Video", out _Theme.VideoName, String.Empty); - bool tex = xmlReader.GetValue(item + "/Skin", out _Theme.TextureName, String.Empty); + bool tex = xmlReader.GetValue(item + "/Skin", out _Theme.Skin, String.Empty); _ThemeLoaded &= vid || tex || _Theme.Type == EBackgroundTypes.None; if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty)) @@ -165,7 +165,7 @@ namespace VocaluxeLib.Menu else if (_Theme.Type == EBackgroundTypes.SlideShow && _Theme.SlideShowTextures.Count > 0) ok = _DrawSlideShow(); - if (!String.IsNullOrEmpty(_Theme.TextureName) && (_Theme.Type == EBackgroundTypes.Texture || !ok)) + if (!String.IsNullOrEmpty(_Theme.Skin) && (_Theme.Type == EBackgroundTypes.Texture || !ok)) ok = _DrawTexture(); if (_Theme.Type == EBackgroundTypes.Color || !ok) @@ -237,7 +237,7 @@ namespace VocaluxeLib.Menu private bool _DrawTexture() { - CTextureRef texture = CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID); + CTextureRef texture = CBase.Themes.GetSkinTexture(_Theme.Skin, _PartyModeID); if (texture != null) { CBase.Drawing.DrawTexture(texture, _GetDrawRect(), EAspect.Crop); diff --git a/VocaluxeLib/Menu/CButton.cs b/VocaluxeLib/Menu/CButton.cs index 8d47555d..23000d0e 100644 --- a/VocaluxeLib/Menu/CButton.cs +++ b/VocaluxeLib/Menu/CButton.cs @@ -28,16 +28,16 @@ namespace VocaluxeLib.Menu { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Skin")] public string TextureName; - [XmlElement("SkinSelected")] public string SelTextureName; + public string Skin; + public string SkinSelected; public SRectF Rect; - [XmlElement("Color")] public SThemeColor Color; - [XmlElement("SelColor")] public SThemeColor SelColor; - [XmlElement("Text")] public SThemeText Text; - [XmlElement("SText")] public SThemeText SText; + public SThemeColor Color; + public SThemeColor SelColor; + public SThemeText Text; + public SThemeText SText; public bool STextSpecified; - [XmlElement("Reflection")] public SReflection Reflection; - [XmlElement("SelReflection")] public SReflection SelReflection; + public SReflection Reflection; + public SReflection SelReflection; } public class CButton : IMenuElement @@ -137,8 +137,8 @@ namespace VocaluxeLib.Menu _PartyModeID = button._PartyModeID; _Theme = new SThemeButton { - TextureName = button._Theme.TextureName, - SelTextureName = button._Theme.SelTextureName + Skin = button._Theme.Skin, + SkinSelected = button._Theme.SkinSelected }; Rect = new SRectF(button.Rect); @@ -167,8 +167,8 @@ namespace VocaluxeLib.Menu string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.TextureName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinSelected", out _Theme.SelTextureName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.Skin, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinSelected", out _Theme.SkinSelected, String.Empty); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref Rect.X); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Y", ref Rect.Y); @@ -258,7 +258,7 @@ namespace VocaluxeLib.Menu if (!Selected && !Pressed || !_Enabled) { - texture = Texture ?? CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID); + texture = Texture ?? CBase.Themes.GetSkinTexture(_Theme.Skin, _PartyModeID); CBase.Drawing.DrawTexture(texture, Rect, Color); @@ -272,7 +272,7 @@ namespace VocaluxeLib.Menu } else if (!_Theme.STextSpecified) { - texture = Texture ?? CBase.Themes.GetSkinTexture(_Theme.SelTextureName, _PartyModeID); + texture = Texture ?? CBase.Themes.GetSkinTexture(_Theme.SkinSelected, _PartyModeID); CBase.Drawing.DrawTexture(texture, Rect, SelColor); @@ -286,7 +286,7 @@ namespace VocaluxeLib.Menu } else if (_Theme.STextSpecified) { - texture = SelTexture ?? CBase.Themes.GetSkinTexture(_Theme.SelTextureName, _PartyModeID); + texture = SelTexture ?? CBase.Themes.GetSkinTexture(_Theme.SkinSelected, _PartyModeID); CBase.Drawing.DrawTexture(texture, Rect, SelColor); diff --git a/VocaluxeLib/Menu/CEqualizer.cs b/VocaluxeLib/Menu/CEqualizer.cs index 3a6bf9f2..407e92ab 100644 --- a/VocaluxeLib/Menu/CEqualizer.cs +++ b/VocaluxeLib/Menu/CEqualizer.cs @@ -32,18 +32,18 @@ namespace VocaluxeLib.Menu { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Skin")] public string TextureName; + public string Skin; - [XmlElement("Rect")] public SRectF Rect; + public SRectF Rect; - [XmlElement("NumBars")] public int NumBars; - [XmlElement("Space")] public float Space; - [XmlElement("Style")] public EEqualizerStyle Style; - [XmlElement("DrawNegative")] public EOffOn DrawNegative; + public int NumBars; + public float Space; + public EEqualizerStyle Style; + public EOffOn DrawNegative; - [XmlElement("Color")] public SThemeColor Color; - [XmlElement("MaxColor")] public SThemeColor MaxColor; - [XmlElement("Reflection")] public SReflection Reflection; + public SThemeColor Color; + public SThemeColor MaxColor; + public SReflection Reflection; } public class CEqualizer : IMenuElement @@ -114,7 +114,7 @@ namespace VocaluxeLib.Menu string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.TextureName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.Skin, String.Empty); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref Rect.X); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Y", ref Rect.Y); diff --git a/VocaluxeLib/Menu/CLyric.cs b/VocaluxeLib/Menu/CLyric.cs index 0caf9c87..837eda13 100644 --- a/VocaluxeLib/Menu/CLyric.cs +++ b/VocaluxeLib/Menu/CLyric.cs @@ -27,10 +27,10 @@ namespace VocaluxeLib.Menu { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Rect")] public SRectF Rect; + public SRectF Rect; - [XmlElement("Color")] public SThemeColor Color; - [XmlElement("SColor")] public SThemeColor SColor; + public SThemeColor Color; + public SThemeColor SColor; } public class CLyric : IMenuElement diff --git a/VocaluxeLib/Menu/CMenu.cs b/VocaluxeLib/Menu/CMenu.cs index babe28fb..a82126b6 100644 --- a/VocaluxeLib/Menu/CMenu.cs +++ b/VocaluxeLib/Menu/CMenu.cs @@ -37,7 +37,7 @@ namespace VocaluxeLib.Menu [XmlType("Screen")] public struct STheme { - [XmlElement("Informations")] public SScreenInformation ScreenInformation; + public SScreenInformation Informations; [XmlArray("Backgrounds")] public List Backgrounds; [XmlArray("Statics")] public List Statics; [XmlArray("Texts")] public List Texts; @@ -219,7 +219,7 @@ namespace VocaluxeLib.Menu string file = Path.Combine(xmlPath, ThemeName + ".xml"); - Theme.ScreenInformation = new SScreenInformation(); + Theme.Informations = new SScreenInformation(); Theme.Backgrounds = new List(); Theme.Statics = new List(); Theme.Texts = new List(); @@ -319,8 +319,8 @@ namespace VocaluxeLib.Menu _LoadThemeElement(_ThemeScreenSettings, _AddScreenSetting, xmlReader); } - Theme.ScreenInformation.ScreenName = ThemeName; - Theme.ScreenInformation.ScreenVersion = _ScreenVersion; + Theme.Informations.ScreenName = ThemeName; + Theme.Informations.ScreenVersion = _ScreenVersion; Theme.Backgrounds = new List(); Theme.Statics = new List(); Theme.Texts = new List(); diff --git a/VocaluxeLib/Menu/CNameSelection.cs b/VocaluxeLib/Menu/CNameSelection.cs index c0976af6..0af78137 100644 --- a/VocaluxeLib/Menu/CNameSelection.cs +++ b/VocaluxeLib/Menu/CNameSelection.cs @@ -30,31 +30,31 @@ namespace VocaluxeLib.Menu public struct SThemeNameSelection { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Rect")] public SRectF Rect; - [XmlElement("SkinEmptyTile")] public string TextureEmptyTileName; - [XmlElement("ColorEmptyTile")] public SThemeColor ColorEmptyTile; - [XmlElement("SkinTileSelected")] public string TextureTileSelectedName; - [XmlElement("Tiles")] public SThemeNameSelectionTiles Tiles; + public SRectF Rect; + public string SkinEmptyTile; + public SThemeColor ColorEmptyTile; + public string SkinTileSelected; + public SThemeNameSelectionTiles Tiles; } public struct SThemeNameSelectionTiles { - [XmlElement("W")] public int W; - [XmlElement("H")] public int H; - [XmlElement("NumW")] public int NumW; - [XmlElement("NumH")] public int NumH; - [XmlElement("SpaceW")] public float SpaceW; - [XmlElement("SpaceH")] public float SpaceH; - [XmlElement("Name")] public SThemeNameSelectionName Name; + public int W; + public int H; + public int NumW; + public int NumH; + public float SpaceW; + public float SpaceH; + public SThemeNameSelectionName Name; } public struct SThemeNameSelectionName { - [XmlElement("Space")] public float Space; + public float Space; [XmlElement("H")] public float Height; - [XmlElement("Font")] public string Font; - [XmlElement("Style")] public EStyle Style; - [XmlElement("Color")] public SThemeColor Color; + public string Font; + public EStyle Style; + public SThemeColor Color; } public class CNameSelection : IMenuElement @@ -165,7 +165,7 @@ namespace VocaluxeLib.Menu _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref Rect.W); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinEmptyTile", out _Theme.TextureEmptyTileName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinEmptyTile", out _Theme.SkinEmptyTile, String.Empty); if (xmlReader.GetValue(item + "/ColorEmptyTile", out _Theme.ColorEmptyTile.Name, String.Empty)) _ThemeLoaded &= _Theme.ColorEmptyTile.Get(_PartyModeID, out _ColorEmptyTile); @@ -177,7 +177,7 @@ namespace VocaluxeLib.Menu _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref _ColorEmptyTile.A); } - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinTileSelected", out _Theme.TextureTileSelectedName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinTileSelected", out _Theme.SkinTileSelected, String.Empty); _ThemeLoaded &= xmlReader.TryGetIntValue(item + "/Tiles/W", ref _Theme.Tiles.W); _ThemeLoaded &= xmlReader.TryGetIntValue(item + "/Tiles/H", ref _Theme.Tiles.H); @@ -429,8 +429,8 @@ namespace VocaluxeLib.Menu public void LoadTextures() { - _TextureEmptyTile = CBase.Themes.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID); - _TextureTileSelected = CBase.Themes.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID); + _TextureEmptyTile = CBase.Themes.GetSkinTexture(_Theme.SkinEmptyTile, _PartyModeID); + _TextureTileSelected = CBase.Themes.GetSkinTexture(_Theme.SkinTileSelected, _PartyModeID); _Theme.ColorEmptyTile.Get(_PartyModeID, out _ColorEmptyTile); _Theme.Tiles.Name.Color.Get(_PartyModeID, out _ColorNameTile); diff --git a/VocaluxeLib/Menu/CParticle.cs b/VocaluxeLib/Menu/CParticle.cs index 251c29de..38f3a37a 100644 --- a/VocaluxeLib/Menu/CParticle.cs +++ b/VocaluxeLib/Menu/CParticle.cs @@ -18,7 +18,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Xml; using System.Xml.Serialization; using VocaluxeLib.Draw; using VocaluxeLib.Xml; @@ -30,12 +29,12 @@ namespace VocaluxeLib.Menu { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Skin")] public string TextureName; - [XmlElement("Rect")] public SRectF Rect; - [XmlElement("Color")] public SThemeColor Color; - [XmlElement("Type")] public EParticleType Type; - [XmlElement("Size")] public float Size; - [XmlElement("MaxNumber")] public int MaxNumber; + public string Skin; + public SRectF Rect; + public SThemeColor Color; + public EParticleType Type; + public float Size; + public int MaxNumber; } public enum EParticleType @@ -346,14 +345,14 @@ namespace VocaluxeLib.Menu Visible = true; } - public CParticleEffect(int partyModeID, int maxNumber, SColorF color, SRectF rect, string textureName, float size, EParticleType type) + public CParticleEffect(int partyModeID, int maxNumber, SColorF color, SRectF rect, string skin, float size, EParticleType type) { _PartyModeID = partyModeID; _Theme = new SThemeParticleEffect(); _Stars = new List(); Rect = rect; Color = color; - _Theme.TextureName = textureName; + _Theme.Skin = skin; _Theme.MaxNumber = maxNumber; _Theme.Size = size; _Theme.Type = type; @@ -369,7 +368,7 @@ namespace VocaluxeLib.Menu _Stars = new List(); Rect = rect; Color = color; - _Theme.TextureName = String.Empty; + _Theme.Skin = String.Empty; Texture = texture; _Theme.MaxNumber = maxNumber; _Theme.Size = size; @@ -396,7 +395,7 @@ namespace VocaluxeLib.Menu string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.TextureName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.Skin, String.Empty); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref Rect.X); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Y", ref Rect.Y); @@ -516,9 +515,9 @@ namespace VocaluxeLib.Menu h = 0; CParticle star; - if (!String.IsNullOrEmpty(_Theme.TextureName)) + if (!String.IsNullOrEmpty(_Theme.Skin)) { - star = new CParticle(_PartyModeID, _Theme.TextureName, Color, + star = new CParticle(_PartyModeID, _Theme.Skin, Color, CBase.Game.GetRandom(w) + Rect.X - size / 4f, CBase.Game.GetRandom(h) + Rect.Y - size / 4f, size, lifetime, Rect.Z, vx, vy, vr, vsize, _Theme.Type); @@ -579,8 +578,8 @@ namespace VocaluxeLib.Menu { _Theme.Color.Get(_PartyModeID, out Color); - if (!String.IsNullOrEmpty(_Theme.TextureName)) - Texture = CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID); + if (!String.IsNullOrEmpty(_Theme.Skin)) + Texture = CBase.Themes.GetSkinTexture(_Theme.Skin, _PartyModeID); Rect = _Theme.Rect; } diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index 13bf5d4e..aa10d4c6 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -59,29 +59,29 @@ namespace VocaluxeLib.Menu { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Rect")] public SRectF Rect; + public SRectF Rect; - [XmlElement("EntryHeight")] public float EntryHeight; + public float EntryHeight; - [XmlElement("SkinBackground")] public string TextureBackgroundName; - [XmlElement("SkinBackgroundSelected")] public string SelTextureBackgroundName; + public string SkinBackground; + public string SkinBackgroundSelected; - [XmlElement("ColorBackground")] public SThemeColor ColorBackground; + public SThemeColor ColorBackground; [XmlElement("SColorBackground")] public SThemeColor SelColorBackground; - [XmlElement("Text1")] public SThemeText SText1; + public SThemeText Text1; - [XmlElement("StaticCover")] public SThemeStatic SStaticCover; - [XmlElement("StaticPlaylistHeader")] public SThemeStatic SStaticPlaylistHeader; - [XmlElement("StaticPlaylistFooter")] public SThemeStatic SStaticPlaylistFooter; + public SThemeStatic StaticCover; + public SThemeStatic StaticPlaylistHeader; + public SThemeStatic StaticPlaylistFooter; - [XmlElement("ButtonPlaylistName")] public SThemeButton SButtonPlaylistName; - [XmlElement("ButtonPlaylistClose")] public SThemeButton SButtonPlaylistClose; - [XmlElement("ButtonPlaylistSave")] public SThemeButton SButtonPlaylistSave; - [XmlElement("ButtonPlaylistDelete")] public SThemeButton SButtonPlaylistDelete; - [XmlElement("ButtonPlaylistSing")] public SThemeButton SButtonPlaylistSing; + public SThemeButton ButtonPlaylistName; + public SThemeButton ButtonPlaylistClose; + public SThemeButton ButtonPlaylistSave; + public SThemeButton ButtonPlaylistDelete; + public SThemeButton ButtonPlaylistSing; - [XmlElement("SelectSlideGameMode")] public SThemeSelectSlide SSelectSlideGameMode; + public SThemeSelectSlide SelectSlideGameMode; } public class CPlaylist : IMenuElement @@ -260,16 +260,16 @@ namespace VocaluxeLib.Menu _Interactions = new CObjectInteractions(); _ChangeOrderElement = new CPlaylistElement(); - Text1 = new CText(_Theme.SText1, _PartyModeID); - StaticCover = new CStatic(_Theme.SStaticCover, _PartyModeID); - StaticPlaylistFooter = new CStatic(_Theme.SStaticPlaylistFooter, _PartyModeID); - StaticPlaylistHeader = new CStatic(_Theme.SStaticPlaylistHeader, _PartyModeID); - ButtonPlaylistName = new CButton(_Theme.SButtonPlaylistName, _PartyModeID); - ButtonPlaylistClose = new CButton(_Theme.SButtonPlaylistClose, _PartyModeID); - ButtonPlaylistDelete = new CButton(_Theme.SButtonPlaylistDelete, _PartyModeID); - ButtonPlaylistSave = new CButton(_Theme.SButtonPlaylistSave, _PartyModeID); - ButtonPlaylistSing = new CButton(_Theme.SButtonPlaylistSing, _PartyModeID); - SelectSlideGameMode = new CSelectSlide(_Theme.SSelectSlideGameMode, _PartyModeID); + Text1 = new CText(_Theme.Text1, _PartyModeID); + StaticCover = new CStatic(_Theme.StaticCover, _PartyModeID); + StaticPlaylistFooter = new CStatic(_Theme.StaticPlaylistFooter, _PartyModeID); + StaticPlaylistHeader = new CStatic(_Theme.StaticPlaylistHeader, _PartyModeID); + ButtonPlaylistName = new CButton(_Theme.ButtonPlaylistName, _PartyModeID); + ButtonPlaylistClose = new CButton(_Theme.ButtonPlaylistClose, _PartyModeID); + ButtonPlaylistDelete = new CButton(_Theme.ButtonPlaylistDelete, _PartyModeID); + ButtonPlaylistSave = new CButton(_Theme.ButtonPlaylistSave, _PartyModeID); + ButtonPlaylistSing = new CButton(_Theme.ButtonPlaylistSing, _PartyModeID); + SelectSlideGameMode = new CSelectSlide(_Theme.SelectSlideGameMode, _PartyModeID); Visible = false; @@ -297,8 +297,8 @@ namespace VocaluxeLib.Menu string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackground", out _Theme.TextureBackgroundName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundSelected", out _Theme.SelTextureBackgroundName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackground", out _Theme.SkinBackground, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundSelected", out _Theme.SkinBackgroundSelected, String.Empty); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref Rect.X); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Y", ref Rect.Y); @@ -345,15 +345,15 @@ namespace VocaluxeLib.Menu _Theme.Rect = Rect; _Theme.ColorBackground.Color = BackgroundColor; _Theme.SelColorBackground.Color = BackgroundSelColor; - _Theme.SText1 = Text1.GetTheme(); - _Theme.SStaticCover = StaticCover.GetTheme(); - _Theme.SStaticPlaylistFooter = StaticPlaylistFooter.GetTheme(); - _Theme.SStaticPlaylistHeader = StaticPlaylistHeader.GetTheme(); - _Theme.SButtonPlaylistName = ButtonPlaylistName.GetTheme(); - _Theme.SButtonPlaylistSing = ButtonPlaylistSing.GetTheme(); - _Theme.SButtonPlaylistClose = ButtonPlaylistClose.GetTheme(); - _Theme.SButtonPlaylistSave = ButtonPlaylistSave.GetTheme(); - _Theme.SButtonPlaylistDelete = ButtonPlaylistDelete.GetTheme(); + _Theme.Text1 = Text1.GetTheme(); + _Theme.StaticCover = StaticCover.GetTheme(); + _Theme.StaticPlaylistFooter = StaticPlaylistFooter.GetTheme(); + _Theme.StaticPlaylistHeader = StaticPlaylistHeader.GetTheme(); + _Theme.ButtonPlaylistName = ButtonPlaylistName.GetTheme(); + _Theme.ButtonPlaylistSing = ButtonPlaylistSing.GetTheme(); + _Theme.ButtonPlaylistClose = ButtonPlaylistClose.GetTheme(); + _Theme.ButtonPlaylistSave = ButtonPlaylistSave.GetTheme(); + _Theme.ButtonPlaylistDelete = ButtonPlaylistDelete.GetTheme(); LoadTextures(); } @@ -371,12 +371,12 @@ namespace VocaluxeLib.Menu { if (i == CurrentPlaylistElement && _Selected) { - _PlaylistElements[i].Background.Texture = CBase.Themes.GetSkinTexture(_Theme.SelTextureBackgroundName, _PartyModeID); + _PlaylistElements[i].Background.Texture = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundSelected, _PartyModeID); _PlaylistElements[i].Background.Color = BackgroundSelColor; } else { - _PlaylistElements[i].Background.Texture = CBase.Themes.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID); + _PlaylistElements[i].Background.Texture = CBase.Themes.GetSkinTexture(_Theme.SkinBackground, _PartyModeID); _PlaylistElements[i].Background.Color = BackgroundColor; } } @@ -909,7 +909,7 @@ namespace VocaluxeLib.Menu _ChangeOrderElement.SelectSlide.RectArrowRight.Z = CBase.Settings.GetZNear(); _ChangeOrderElement.Text1.Z = CBase.Settings.GetZNear(); - _ChangeOrderElement.Background.Texture = CBase.Themes.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID); + _ChangeOrderElement.Background.Texture = CBase.Themes.GetSkinTexture(_Theme.SkinBackground, _PartyModeID); _ChangeOrderElement.Background.Color = BackgroundColor; _OldMousePosX = mouseEvent.X; @@ -1051,7 +1051,7 @@ namespace VocaluxeLib.Menu { var en = new CPlaylistElement { - Background = new CStatic(_PartyModeID, _Theme.TextureBackgroundName, BackgroundColor, + Background = new CStatic(_PartyModeID, _Theme.SkinBackground, BackgroundColor, new SRectF(Rect.X, Rect.Y + (i * _Theme.EntryHeight), Rect.W, _Theme.EntryHeight, Rect.Z)), Cover = new CStatic(StaticCover) }; diff --git a/VocaluxeLib/Menu/CScreenSetting.cs b/VocaluxeLib/Menu/CScreenSetting.cs index 18b34436..be3f7fe1 100644 --- a/VocaluxeLib/Menu/CScreenSetting.cs +++ b/VocaluxeLib/Menu/CScreenSetting.cs @@ -16,7 +16,6 @@ #endregion using System; -using System.Xml; using System.Xml.Serialization; using VocaluxeLib.Draw; using VocaluxeLib.Xml; @@ -35,8 +34,8 @@ namespace VocaluxeLib.Menu public struct SScreenSetting { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Value")] public string Value; - [XmlElement("Type")] public ESettingType Type; + public string Value; + public ESettingType Type; } // ReSharper disable ClassNeverInstantiated.Global diff --git a/VocaluxeLib/Menu/CSelectSlide.cs b/VocaluxeLib/Menu/CSelectSlide.cs index 5e3e314a..99ef66b8 100644 --- a/VocaluxeLib/Menu/CSelectSlide.cs +++ b/VocaluxeLib/Menu/CSelectSlide.cs @@ -29,39 +29,39 @@ namespace VocaluxeLib.Menu { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Skin")] public string TextureName; - [XmlElement("SkinArrowLeft")] public string TextureArrowLeftName; - [XmlElement("SkinArrowRight")] public string TextureArrowRightName; + public string Skin; + public string SkinArrowLeft; + public string SkinArrowRight; - [XmlElement("SkinSelected")] public string SelTextureName; - [XmlElement("SkinArrowLeftSelected")] public string SelTextureArrowLeftName; - [XmlElement("SkinArrowRightSelected")] public string SelTextureArrowRightName; + public string SkinSelected; + public string SkinArrowLeftSelected; + public string SkinArrowRightSelected; - [XmlElement("SkinHighlighted")] public string HighlightTextureName; + public string SkinHighlighted; - [XmlElement("Rect")] public SRectF Rect; - [XmlElement("RectArrowLeft")] public SRectF RectArrowLeft; - [XmlElement("RectArrowRight")] public SRectF RectArrowRight; + public SRectF Rect; + public SRectF RectArrowLeft; + public SRectF RectArrowRight; - [XmlElement("Color")] public SThemeColor Color; - [XmlElement("SColor")] public SThemeColor SColor; - [XmlElement("HColor")] public SThemeColor HColor; + public SThemeColor Color; + public SThemeColor SColor; + public SThemeColor HColor; - [XmlElement("ArrowColor")] public SThemeColor ArrowColor; - [XmlElement("ArrowSColor")] public SThemeColor ArrowSColor; + public SThemeColor ArrowColor; + public SThemeColor ArrowSColor; - [XmlElement("TextColor")] public SThemeColor TextColor; - [XmlElement("TextSColor")] public SThemeColor TextSColor; + public SThemeColor TextColor; + public SThemeColor TextSColor; - [XmlElement("TextH")] public float TextH; - [XmlElement("TextRelativeX")] public float TextRelativeX; - [XmlElement("TextRelativeY")] public float TextRelativeY; - [XmlElement("TextMaxW")] public float TextMaxW; + public float TextH; + public float TextRelativeX; + public float TextRelativeY; + public float TextMaxW; - [XmlElement("TextFont")] public string TextFont; - [XmlElement("TextStyle")] public EStyle TextStyle; + public string TextFont; + public EStyle TextStyle; - [XmlElement("NumVisible")] public int NumVisible; + public int NumVisible; } public class CSelectSlide : IMenuElement, ICloneable @@ -209,8 +209,8 @@ namespace VocaluxeLib.Menu _PartyModeID = slide._PartyModeID; _Theme = new SThemeSelectSlide { - TextureArrowLeftName = slide._Theme.TextureArrowLeftName, - TextureArrowRightName = slide._Theme.TextureArrowRightName, + SkinArrowLeft = slide._Theme.SkinArrowLeft, + SkinArrowRight = slide._Theme.SkinArrowRight, Color = slide._Theme.Color, SColor = slide._Theme.SColor, HColor = slide._Theme.HColor, @@ -218,10 +218,10 @@ namespace VocaluxeLib.Menu ArrowSColor = slide._Theme.ArrowSColor, TextColor = slide._Theme.TextColor, TextSColor = slide._Theme.TextSColor, - SelTextureName = slide._Theme.SelTextureName, - SelTextureArrowLeftName = slide._Theme.SelTextureArrowLeftName, - SelTextureArrowRightName = slide._Theme.SelTextureArrowRightName, - HighlightTextureName = slide._Theme.HighlightTextureName, + SkinSelected = slide._Theme.SkinSelected, + SkinArrowLeftSelected = slide._Theme.SkinArrowLeftSelected, + SkinArrowRightSelected = slide._Theme.SkinArrowRightSelected, + SkinHighlighted = slide._Theme.SkinHighlighted, TextFont = slide._Theme.TextFont, TextStyle = slide._Theme.TextStyle }; @@ -277,15 +277,15 @@ namespace VocaluxeLib.Menu string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.TextureName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowLeft", out _Theme.TextureArrowLeftName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowRight", out _Theme.TextureArrowRightName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.Skin, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowLeft", out _Theme.SkinArrowLeft, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowRight", out _Theme.SkinArrowRight, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinSelected", out _Theme.SelTextureName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowLeftSelected", out _Theme.SelTextureArrowLeftName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowRightSelected", out _Theme.SelTextureArrowRightName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinSelected", out _Theme.SkinSelected, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowLeftSelected", out _Theme.SkinArrowLeftSelected, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinArrowRightSelected", out _Theme.SkinArrowRightSelected, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinHighlighted", out _Theme.HighlightTextureName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinHighlighted", out _Theme.SkinHighlighted, String.Empty); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref Rect.X); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Y", ref Rect.Y); @@ -599,15 +599,15 @@ namespace VocaluxeLib.Menu if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme) return; - CTextureRef texture = CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID); - CTextureRef textureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID); - CTextureRef textureArrowRight = CBase.Themes.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID); + CTextureRef texture = CBase.Themes.GetSkinTexture(_Theme.Skin, _PartyModeID); + CTextureRef textureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.SkinArrowLeft, _PartyModeID); + CTextureRef textureArrowRight = CBase.Themes.GetSkinTexture(_Theme.SkinArrowRight, _PartyModeID); - CTextureRef selTexture = CBase.Themes.GetSkinTexture(_Theme.SelTextureName, _PartyModeID); - CTextureRef selTextureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.SelTextureArrowLeftName, _PartyModeID); - CTextureRef selTextureArrowRight = CBase.Themes.GetSkinTexture(_Theme.SelTextureArrowRightName, _PartyModeID); + CTextureRef selTexture = CBase.Themes.GetSkinTexture(_Theme.SkinSelected, _PartyModeID); + CTextureRef selTextureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.SkinArrowLeftSelected, _PartyModeID); + CTextureRef selTextureArrowRight = CBase.Themes.GetSkinTexture(_Theme.SkinArrowRightSelected, _PartyModeID); - CTextureRef highlightTexture = CBase.Themes.GetSkinTexture(_Theme.HighlightTextureName, _PartyModeID); + CTextureRef highlightTexture = CBase.Themes.GetSkinTexture(_Theme.SkinHighlighted, _PartyModeID); if (Selected) { diff --git a/VocaluxeLib/Menu/CStatic.cs b/VocaluxeLib/Menu/CStatic.cs index 9da7aa03..5f058f58 100644 --- a/VocaluxeLib/Menu/CStatic.cs +++ b/VocaluxeLib/Menu/CStatic.cs @@ -26,7 +26,7 @@ namespace VocaluxeLib.Menu public struct SThemeStatic { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("Skin")] public string TextureName; + public string Skin; public SThemeColor Color; public SRectF Rect; public SReflection Reflection; @@ -52,7 +52,7 @@ namespace VocaluxeLib.Menu private CTextureRef _Texture; public CTextureRef Texture { - get { return _Texture ?? CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID); } + get { return _Texture ?? CBase.Themes.GetSkinTexture(_Theme.Skin, _PartyModeID); } set { _Texture = value; } } @@ -104,7 +104,7 @@ namespace VocaluxeLib.Menu public CStatic(int partyModeID, string textureSkinName, SColorF color, SRectF rect) { _PartyModeID = partyModeID; - _Theme.TextureName = textureSkinName; + _Theme.Skin = textureSkinName; Color = color; Rect = rect; } @@ -122,7 +122,7 @@ namespace VocaluxeLib.Menu string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.TextureName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.Skin, String.Empty); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref Rect.X); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Y", ref Rect.Y); diff --git a/VocaluxeLib/Menu/CText.cs b/VocaluxeLib/Menu/CText.cs index 57a651cb..b3c9c359 100644 --- a/VocaluxeLib/Menu/CText.cs +++ b/VocaluxeLib/Menu/CText.cs @@ -27,18 +27,18 @@ namespace VocaluxeLib.Menu { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("X")] public float X; - [XmlElement("Y")] public float Y; - [XmlElement("Z")] public float Z; + public float X; + public float Y; + public float Z; [XmlElement("H")] public float FontHeight; [XmlElement("MaxW")] public float MaxWidth; public SThemeColor Color; public SThemeColor SColor; //for Buttons - [XmlElement("Align")] public EAlignment Align; - [XmlElement("ResizeAlign")] public EHAlignment ResizeAlign; + public EAlignment Align; + public EHAlignment ResizeAlign; [XmlElement("Style")] public EStyle FontStyle; [XmlElement("Font")] public string FontFamily; - [XmlElement("Text")] public string Text; + public string Text; public SReflection Reflection; } diff --git a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs index 26d2dba1..d8942556 100644 --- a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs +++ b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs @@ -53,17 +53,17 @@ namespace VocaluxeLib.Menu.SingNotes { [XmlAttribute(AttributeName = "Name")] public string Name; - [XmlElement("SkinLeft")] public string SkinLeftName; - [XmlElement("SkinMiddle")] public string SkinMiddleName; - [XmlElement("SkinRight")] public string SkinRightName; + public string SkinLeft; + public string SkinMiddle; + public string SkinRight; - [XmlElement("SkinBackgroundLeft")] public string SkinBackgroundLeftName; - [XmlElement("SkinBackgroundMiddle")] public string SkinBackgroundMiddleName; - [XmlElement("SkinBackgroundRight")] public string SkinBackgroundRightName; + public string SkinBackgroundLeft; + public string SkinBackgroundMiddle; + public string SkinBackgroundRight; - [XmlElement("SkinGoldenStar")] public string SkinGoldenStarName; - [XmlElement("SkinToneHelper")] public string SkinToneHelperName; - [XmlElement("SkinPerfectNoteStart")] public string SkinPerfectNoteStarName; + public string SkinGoldenStar; + public string SkinToneHelper; + public string SkinPerfectNoteStart; [XmlArray("BarPositions")] public SBarPosition[] BarPos; } @@ -124,17 +124,17 @@ namespace VocaluxeLib.Menu.SingNotes string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinLeft", out _Theme.SkinLeftName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinMiddle", out _Theme.SkinMiddleName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinRight", out _Theme.SkinRightName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinLeft", out _Theme.SkinLeft, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinMiddle", out _Theme.SkinMiddle, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinRight", out _Theme.SkinRight, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundLeft", out _Theme.SkinBackgroundLeftName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundMiddle", out _Theme.SkinBackgroundMiddleName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundRight", out _Theme.SkinBackgroundRightName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundLeft", out _Theme.SkinBackgroundLeft, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundMiddle", out _Theme.SkinBackgroundMiddle, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundRight", out _Theme.SkinBackgroundRight, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinGoldenStar", out _Theme.SkinGoldenStarName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinToneHelper", out _Theme.SkinToneHelperName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/SkinPerfectNoteStar", out _Theme.SkinPerfectNoteStarName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinGoldenStar", out _Theme.SkinGoldenStar, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinToneHelper", out _Theme.SkinToneHelper, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/SkinPerfectNoteStar", out _Theme.SkinPerfectNoteStart, String.Empty); int i = 0; BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(),CBase.Settings.GetMaxNumPlayer()]; @@ -455,9 +455,9 @@ namespace VocaluxeLib.Menu.SingNotes var noteRect = new SRectF(rect.X + dw, rect.Y + dh, rect.W - 2 * dw, rect.H - 2 * dh, rect.Z); - CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID); - CTextureRef noteMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID); - CTextureRef noteEnd = CBase.Themes.GetSkinTexture(_Theme.SkinRightName, _PartyModeID); + CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeft, _PartyModeID); + CTextureRef noteMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinMiddle, _PartyModeID); + CTextureRef noteEnd = CBase.Themes.GetSkinTexture(_Theme.SkinRight, _PartyModeID); //Width of each of the ends (round parts) //Need 2 of them so use minimum @@ -502,9 +502,9 @@ namespace VocaluxeLib.Menu.SingNotes rect.Z ); - CTextureRef noteBackgroundBegin = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID); - CTextureRef noteBackgroundMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID); - CTextureRef noteBackgroundEnd = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID); + CTextureRef noteBackgroundBegin = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundLeft, _PartyModeID); + CTextureRef noteBackgroundMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundMiddle, _PartyModeID); + CTextureRef noteBackgroundEnd = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundRight, _PartyModeID); float dx = r.H * noteBackgroundBegin.OrigAspect; if (2 * dx > r.W) @@ -553,7 +553,7 @@ namespace VocaluxeLib.Menu.SingNotes ); var numstars = (int)(r.W * 0.25f); - var stars = new CParticleEffect(_PartyModeID, numstars, new SColorF(1f, 1f, 0f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticleType.Star); + var stars = new CParticleEffect(_PartyModeID, numstars, new SColorF(1f, 1f, 0f, 1f), r, _Theme.SkinGoldenStar, 20, EParticleType.Star); _PlayerNotes[n].GoldenStars.Add(stars); } } @@ -576,7 +576,7 @@ namespace VocaluxeLib.Menu.SingNotes rect.Z ); - var flares = new CParticleEffect(_PartyModeID, 15, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticleType.Flare); + var flares = new CParticleEffect(_PartyModeID, 15, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinGoldenStar, 20, EParticleType.Flare); _PlayerNotes[n].Flares.Add(flares); } @@ -598,7 +598,7 @@ namespace VocaluxeLib.Menu.SingNotes rect.Z ); - CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID); + CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeft, _PartyModeID); float dx = r.H * noteBegin.OrigAspect; if (2 * dx > r.W) dx = r.W / 2; @@ -611,14 +611,14 @@ namespace VocaluxeLib.Menu.SingNotes rect.Z ); - var stars = new CParticleEffect(_PartyModeID, CBase.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, + var stars = new CParticleEffect(_PartyModeID, CBase.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStart, 35, EParticleType.PerfNoteStar); _PlayerNotes[n].PerfectNoteEffect.Add(stars); } private void _AddPerfectLine(int n) { - var twinkle = new CParticleEffect(_PartyModeID, 200, _PlayerNotes[n].Color, _PlayerNotes[n].Rect, _Theme.SkinGoldenStarName, 25, EParticleType.Twinkle); + var twinkle = new CParticleEffect(_PartyModeID, 200, _PlayerNotes[n].Color, _PlayerNotes[n].Rect, _Theme.SkinGoldenStar, 25, EParticleType.Twinkle); _PlayerNotes[n].PerfectLineTwinkle.Add(twinkle); } @@ -655,7 +655,7 @@ namespace VocaluxeLib.Menu.SingNotes _PlayerNotes[n].Color.B, _PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha); - CTextureRef toneHelper = CBase.Themes.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID); + CTextureRef toneHelper = CBase.Themes.GetSkinTexture(_Theme.SkinToneHelper, _PartyModeID); CBase.Drawing.DrawTexture(toneHelper, drawRect, color); diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs index b0f2097a..f1861c46 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs @@ -17,10 +17,7 @@ using System; using System.Diagnostics; -using System.IO; -using System.Xml; using System.Xml.Serialization; -using VocaluxeLib.Draw; using VocaluxeLib.PartyModes; using VocaluxeLib.Songs; using VocaluxeLib.Xml; @@ -32,26 +29,26 @@ namespace VocaluxeLib.Menu.SongMenu { [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; + public string CoverBackground; + public string CoverBigBackground; + public string DuetIcon; + public string VideoIcon; + public string MedleyCalcIcon; + public string MedleyTagIcon; + public SThemeColor Color; //public SThemeSongMenuBook songMenuBook; //public SThemeSongMenuDreidel songMenuDreidel; //public SThemeSongMenuList songMenuList; - [XmlElement("SongMenuTileBoard")] public SThemeSongMenuTileBoard SongMenuTileBoard; + public SThemeSongMenuTileBoard SongMenuTileBoard; public SThemeSongMenu(SThemeSongMenu theme) { Name = theme.Name; - CoverBackgroundName = theme.CoverBackgroundName; - CoverBigBackgroundName = theme.CoverBigBackgroundName; - DuetIconName = theme.DuetIconName; - VideoIconName = theme.VideoIconName; + CoverBackground = theme.CoverBackground; + CoverBigBackground = theme.CoverBigBackground; + DuetIcon = theme.DuetIcon; + VideoIcon = theme.VideoIcon; MedleyCalcIcon = theme.MedleyCalcIcon; MedleyTagIcon = theme.MedleyTagIcon; Color = new SThemeColor(theme.Color); @@ -64,46 +61,46 @@ namespace VocaluxeLib.Menu.SongMenu /// /// Number of tiles horizontal /// - [XmlElement("NumW")] public int NumW; + public int NumW; /// /// Number of tiles vertical /// - [XmlElement("NumH")] public int NumH; + public int NumH; /// /// Number of tiles horizontal in small-modus /// - [XmlElement("NumWsmall")] public int NumWsmall; + public int NumWsmall; /// /// Number of tiles vertical in small-modus /// - [XmlElement("NumHsmall")] public int NumHsmall; + public int NumHsmall; /// /// Space between tiles horizontal /// - [XmlElement("SpaceW")] public float SpaceW; + public float SpaceW; /// /// Space between tiles vertical /// - [XmlElement("SpaceH")] public float SpaceH; + public float SpaceH; - [XmlElement("TileRect")] public SRectF TileRect; - [XmlElement("TileRectSmall")] public SRectF TileRectSmall; + public SRectF TileRect; + public SRectF TileRectSmall; - [XmlElement("TextArtist")] public SThemeText TextArtist; - [XmlElement("TextTitle")] public SThemeText TextTitle; - [XmlElement("TextSongLength")] public SThemeText TextSongLength; + public SThemeText TextArtist; + public SThemeText TextTitle; + 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; + public SThemeStatic StaticCoverBig; + public SThemeStatic StaticTextBG; + public SThemeStatic StaticDuetIcon; + public SThemeStatic StaticVideoIcon; + public SThemeStatic StaticMedleyCalcIcon; + public SThemeStatic StaticMedleyTagIcon; } abstract class CSongMenuFramework : ISongMenu @@ -203,10 +200,10 @@ namespace VocaluxeLib.Menu.SongMenu string item = xmlPath + "/" + elementName; _ThemeLoaded = true; - _ThemeLoaded &= xmlReader.GetValue(item + "/CoverBackground", out _Theme.CoverBackgroundName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/CoverBigBackground", out _Theme.CoverBigBackgroundName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/DuetIcon", out _Theme.DuetIconName, String.Empty); - _ThemeLoaded &= xmlReader.GetValue(item + "/VideoIcon", out _Theme.VideoIconName, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/CoverBackground", out _Theme.CoverBackground, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/CoverBigBackground", out _Theme.CoverBigBackground, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/DuetIcon", out _Theme.DuetIcon, String.Empty); + _ThemeLoaded &= xmlReader.GetValue(item + "/VideoIcon", out _Theme.VideoIcon, String.Empty); _ThemeLoaded &= xmlReader.GetValue(item + "/MedleyCalcIcon", out _Theme.MedleyCalcIcon, String.Empty); _ThemeLoaded &= xmlReader.GetValue(item + "/MedleyTagIcon", out _Theme.MedleyTagIcon, String.Empty); @@ -271,7 +268,7 @@ namespace VocaluxeLib.Menu.SongMenu public virtual void OnHide() { - if(CBase.Graphics.GetNextScreen() != EScreens.ScreenNames || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF) + if (CBase.Graphics.GetNextScreen() != EScreens.ScreenNames || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF) _ResetPreview(); } diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs index 31e780bd..cbe38ddf 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs @@ -187,8 +187,8 @@ namespace VocaluxeLib.Menu.SongMenu _TileW = (int)((Rect.W - _Theme.SongMenuTileBoard.SpaceW * (_NumW - 1)) / _NumW); _TileH = (int)((Rect.H - _Theme.SongMenuTileBoard.SpaceH * (_NumH - 1)) / _NumH); - _CoverBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID); - _CoverBigBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID); + _CoverBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBackground, _PartyModeID); + _CoverBigBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBigBackground, _PartyModeID); _Tiles = new List(); for (int i = 0; i < _NumH; i++) diff --git a/VocaluxeLib/Structs.cs b/VocaluxeLib/Structs.cs index 8b316ece..82554470 100644 --- a/VocaluxeLib/Structs.cs +++ b/VocaluxeLib/Structs.cs @@ -76,10 +76,10 @@ namespace VocaluxeLib #region Drawing public struct SColorF { - [XmlElement("R")] public float R; - [XmlElement("G")] public float G; - [XmlElement("B")] public float B; - [XmlElement("A")] public float A; + public float R; + public float G; + public float B; + public float A; public SColorF(float r, float g, float b, float a) {