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
@@ -26,6 +26,44 @@ using VocaluxeLib.Songs;
|
||||
|
||||
namespace VocaluxeLib
|
||||
{
|
||||
public enum ECoverGeneratorType
|
||||
{
|
||||
Default,
|
||||
Folder,
|
||||
Artist,
|
||||
Letter,
|
||||
Edition,
|
||||
Genre,
|
||||
Language,
|
||||
Year,
|
||||
Decade,
|
||||
Date
|
||||
}
|
||||
|
||||
public struct SMargin
|
||||
{
|
||||
public int Default;
|
||||
public int Left, Right, Top, Bottom;
|
||||
}
|
||||
|
||||
public struct SThemeCoverGeneratorText
|
||||
{
|
||||
public string Text;
|
||||
public SThemeFont Font;
|
||||
public SThemeColor Color;
|
||||
public SMargin Margin;
|
||||
public int Indent;
|
||||
}
|
||||
|
||||
public struct SThemeCoverGenerator
|
||||
{
|
||||
public ECoverGeneratorType Type;
|
||||
public SThemeCoverGeneratorText Text;
|
||||
public SThemeColor BackgroundColor;
|
||||
public string Image;
|
||||
public float ImageAlpha;
|
||||
public bool ShowFirstCover;
|
||||
}
|
||||
|
||||
#region Drawing
|
||||
public struct SColorF
|
||||
@@ -82,6 +120,16 @@ namespace VocaluxeLib
|
||||
Color = new SColorF(theme.Color);
|
||||
Name = theme.Name;
|
||||
}
|
||||
|
||||
public bool Get(int partyModeId, out SColorF color)
|
||||
{
|
||||
if (String.IsNullOrEmpty(Name))
|
||||
{
|
||||
color = Color;
|
||||
return true;
|
||||
}
|
||||
return CBase.Theme.GetColor(Name, CBase.Theme.GetSkinIndex(partyModeId), out color);
|
||||
}
|
||||
}
|
||||
|
||||
public struct SRectF
|
||||
|
||||
Reference in new issue
Block a user