Cleanup not required XML attributes

This commit is contained in:
Flamefire committed 2014-10-16 21:27:09 +02:00
1 parent f01005ea60
commit 86fb73ca48
16 files changed
+237 -242

No files matched your search

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