Introduce example for a more flexible deserialization
Also make the CoverGenerator themes serializeable Rest is automatic reformatting.
This commit is contained in:
1 parent
467b619f0a
commit
6ebbf7df6f
33 files changed
+428
-397
No files matched your search
@@ -18,6 +18,7 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
@@ -29,30 +30,20 @@ namespace VocaluxeLib.Menu
|
||||
[XmlType("Equalizer")]
|
||||
public struct SThemeEqualizer
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlElement("Skin")] public string TextureName;
|
||||
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
[XmlElement("Rect")] public SRectF Rect;
|
||||
|
||||
[XmlElement("NumBars")]
|
||||
public int NumBars;
|
||||
[XmlElement("Space")]
|
||||
public float Space;
|
||||
[XmlElement("Style")]
|
||||
public EEqualizerStyle Style;
|
||||
[XmlElement("DrawNegative")]
|
||||
public EOffOn DrawNegative;
|
||||
[XmlElement("NumBars")] public int NumBars;
|
||||
[XmlElement("Space")] public float Space;
|
||||
[XmlElement("Style")] public EEqualizerStyle Style;
|
||||
[XmlElement("DrawNegative")] public EOffOn DrawNegative;
|
||||
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("MaxColor")]
|
||||
public SThemeColor MaxColor;
|
||||
[XmlElement("Reflection")]
|
||||
public SReflection Reflection;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
[XmlElement("MaxColor")] public SThemeColor MaxColor;
|
||||
[XmlElement("Reflection")] public SReflection Reflection;
|
||||
}
|
||||
|
||||
public class CEqualizer : IMenuElement
|
||||
@@ -273,7 +264,7 @@ namespace VocaluxeLib.Menu
|
||||
Rect = _Theme.Rect;
|
||||
Space = _Theme.Space;
|
||||
Reflection = _Theme.Reflection.Enabled;
|
||||
if(Reflection)
|
||||
if (Reflection)
|
||||
{
|
||||
ReflectionHeight = _Theme.Reflection.Height;
|
||||
ReflectionSpace = _Theme.Reflection.Space;
|
||||
|
||||
Reference in new issue
Block a user