Changed theme-color-handling.
This commit is contained in:
1 parent
a55d724620
commit
96e50f7723
11 files changed
+208
-245
No files matched your search
@@ -47,9 +47,7 @@ namespace VocaluxeLib.Menu
|
||||
public string VideoName;
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
public SColorF Color;
|
||||
public SThemeColor Color;
|
||||
}
|
||||
|
||||
public class CBackground : IMenuElement
|
||||
@@ -96,8 +94,8 @@ namespace VocaluxeLib.Menu
|
||||
bool tex = xmlReader.GetValue(item + "/Skin", out _Theme.TextureName, String.Empty);
|
||||
_ThemeLoaded &= vid || tex || _Theme.Type == EBackgroundTypes.None;
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
bool success = true;
|
||||
@@ -110,7 +108,7 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= success;
|
||||
}
|
||||
|
||||
_Theme.Color = new SColorF(Color);
|
||||
_Theme.Color.Color = new SColorF(Color);
|
||||
|
||||
int i = 1;
|
||||
|
||||
@@ -152,8 +150,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Background color for type \"Color\" from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
if (_Theme.Type != EBackgroundTypes.None)
|
||||
@@ -222,8 +220,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
|
||||
foreach (string s in _Theme.SlideShowTextures)
|
||||
_SlideShowTextures.Add(CBase.Theme.GetSkinTexture(s, _PartyModeID));
|
||||
|
||||
+16
-22
@@ -33,14 +33,10 @@ namespace VocaluxeLib.Menu
|
||||
[XmlElement("SkinSelected")]
|
||||
public string SelTextureName;
|
||||
public SRectF Rect;
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
[XmlElement("Color")]
|
||||
public SColorF Color;
|
||||
[XmlElement("SelColorName")]
|
||||
public string SelColorName;
|
||||
public SThemeColor Color;
|
||||
[XmlElement("SelColor")]
|
||||
public SColorF SelColor;
|
||||
public SThemeColor SelColor;
|
||||
[XmlElement("Text")]
|
||||
public SThemeText Text;
|
||||
[XmlElement("Reflection")]
|
||||
@@ -133,8 +129,6 @@ namespace VocaluxeLib.Menu
|
||||
_PartyModeID = button._PartyModeID;
|
||||
_Theme = new SThemeButton
|
||||
{
|
||||
ColorName = button._Theme.ColorName,
|
||||
SelColorName = button._Theme.SelColorName,
|
||||
TextureName = button._Theme.TextureName,
|
||||
SelTextureName = button._Theme.SelTextureName
|
||||
};
|
||||
@@ -174,8 +168,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref Rect.W);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
|
||||
@@ -184,8 +178,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorName, skinIndex, out SelColor);
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColor.Name, skinIndex, out SelColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref SelColor.R);
|
||||
@@ -237,8 +231,8 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.Rect = new SRectF(Rect);
|
||||
_Theme.Color = new SColorF(Color);
|
||||
_Theme.SelColor = new SColorF(SelColor);
|
||||
_Theme.Color.Color = new SColorF(Color);
|
||||
_Theme.SelColor.Color = new SColorF(SelColor);
|
||||
_Theme.Text = Text.GetTheme();
|
||||
|
||||
LoadTextures();
|
||||
@@ -267,8 +261,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Button color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", Color.R.ToString("#0.00"));
|
||||
@@ -279,8 +273,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Selected button color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColor.Name))
|
||||
writer.WriteElementString("SColor", _Theme.SelColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("SR", SelColor.R.ToString("#0.00"));
|
||||
@@ -387,11 +381,11 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
Text.LoadTextures();
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColor.Name))
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SelColor.Name, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -47,14 +47,10 @@ namespace VocaluxeLib.Menu
|
||||
[XmlElement("DrawNegative")]
|
||||
public EOffOn DrawNegative;
|
||||
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
[XmlElement("Color")]
|
||||
public SColorF Color;
|
||||
[XmlElement("MaxColorName")]
|
||||
public string MaxColorName;
|
||||
public SThemeColor Color;
|
||||
[XmlElement("MaxColor")]
|
||||
public SColorF MaxColor;
|
||||
public SThemeColor MaxColor;
|
||||
[XmlElement("Reflection")]
|
||||
public SReflection Reflection;
|
||||
}
|
||||
@@ -132,8 +128,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
_ThemeLoaded &= xmlReader.TryGetEnumValue(item + "/DrawNegative", ref _Theme.DrawNegative);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
|
||||
@@ -142,8 +138,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/MaxColor", out _Theme.MaxColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/MaxColor", out _Theme.MaxColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.MaxColor.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/MaxR", ref MaxColor.R);
|
||||
@@ -171,8 +167,8 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.Space = Space;
|
||||
_Theme.Color = new SColorF(Color);
|
||||
_Theme.MaxColor = new SColorF(MaxColor);
|
||||
_Theme.Color.Color = new SColorF(Color);
|
||||
_Theme.MaxColor.Color = new SColorF(MaxColor);
|
||||
_Theme.Rect = Rect;
|
||||
|
||||
_Bars = new float[_Theme.NumBars];
|
||||
@@ -210,8 +206,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Equalizer color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", Color.R.ToString("#0.00"));
|
||||
@@ -221,8 +217,8 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
writer.WriteComment("<MaxColor>: Equalizer color for maximal volume from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <MaxR>, <MaxG>, <MaxB>, <MaxA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("MaxColor", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.MaxColor.Name))
|
||||
writer.WriteElementString("MaxColor", _Theme.MaxColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("MaxR", Color.R.ToString("#0.00"));
|
||||
@@ -321,11 +317,11 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.MaxColorName))
|
||||
MaxColor = CBase.Theme.GetColor(_Theme.MaxColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.MaxColor.Name))
|
||||
MaxColor = CBase.Theme.GetColor(_Theme.MaxColor.Name, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+16
-20
@@ -31,14 +31,10 @@ namespace VocaluxeLib.Menu
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
[XmlElement("Color")]
|
||||
public SColorF Color;
|
||||
[XmlElement("SColorName")]
|
||||
public string SelColorName;
|
||||
public SThemeColor Color;
|
||||
[XmlElement("SColor")]
|
||||
public SColorF SColor;
|
||||
public SThemeColor SColor;
|
||||
}
|
||||
|
||||
public class CLyric : IMenuElement
|
||||
@@ -135,8 +131,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref _MaxW);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref _H);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out _Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out _Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref _Color.R);
|
||||
@@ -145,8 +141,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref _Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorName, skinIndex, out _ColorProcessed);
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColor.Name, skinIndex, out _ColorProcessed);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref _ColorProcessed.R);
|
||||
@@ -158,8 +154,8 @@ namespace VocaluxeLib.Menu
|
||||
if (_ThemeLoaded)
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.Color = new SColorF(_Color);
|
||||
_Theme.SColor = new SColorF(_ColorProcessed);
|
||||
_Theme.Color.Color = new SColorF(_Color);
|
||||
_Theme.SColor.Color = new SColorF(_ColorProcessed);
|
||||
_Theme.Rect = new SRectF(Rect);
|
||||
|
||||
LoadTextures();
|
||||
@@ -183,8 +179,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Lyric text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", _Color.R.ToString("#0.00"));
|
||||
@@ -195,8 +191,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Highlighted lyric color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||
writer.WriteElementString("SColor", _Theme.SColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("SR", _ColorProcessed.R.ToString("#0.00"));
|
||||
@@ -488,11 +484,11 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
_Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
_Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
_ColorProcessed = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||
_ColorProcessed = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -34,10 +34,8 @@ namespace VocaluxeLib.Menu
|
||||
public SRectF Rect;
|
||||
[XmlElement("SkinEmptyTile")]
|
||||
public string TextureEmptyTileName;
|
||||
[XmlElement("ColorNameEmptyTile")]
|
||||
public string ColorEmptyTileName;
|
||||
[XmlElement("ColorEmptyTile")]
|
||||
public SColorF ColorEmptyTile;
|
||||
public SThemeColor ColorEmptyTile;
|
||||
[XmlElement("SkinTileSelected")]
|
||||
public string TextureTileSelectedName;
|
||||
[XmlElement("Tiles")]
|
||||
@@ -68,10 +66,8 @@ namespace VocaluxeLib.Menu
|
||||
public string Font;
|
||||
[XmlElement("Style")]
|
||||
public EStyle Style;
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
[XmlElement("Color")]
|
||||
public SColorF Color;
|
||||
public SThemeColor Color;
|
||||
}
|
||||
|
||||
public class CNameSelection : IMenuElement
|
||||
@@ -180,8 +176,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinEmptyTile", out _Theme.TextureEmptyTileName, String.Empty);
|
||||
|
||||
if (xmlReader.GetValue(item + "/ColorEmptyTile", out _Theme.ColorEmptyTileName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorEmptyTileName, skinIndex, out ColorEmptyTile);
|
||||
if (xmlReader.GetValue(item + "/ColorEmptyTile", out _Theme.ColorEmptyTile.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorEmptyTile.Name, skinIndex, out ColorEmptyTile);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref ColorEmptyTile.R);
|
||||
@@ -202,15 +198,15 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Tiles/Name/H", ref _Theme.Tiles.Name.Height);
|
||||
_ThemeLoaded &= xmlReader.GetValue(item + "/Tiles/Name/Font", out _Theme.Tiles.Name.Font, "Normal");
|
||||
_ThemeLoaded &= xmlReader.TryGetEnumValue(item + "/Tiles/Name/Style", ref _Theme.Tiles.Name.Style);
|
||||
if (xmlReader.GetValue(item + "/Tiles/Name/Color", out _Theme.Tiles.Name.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Tiles.Name.ColorName, skinIndex, out _Theme.Tiles.Name.Color);
|
||||
if (xmlReader.GetValue(item + "/Tiles/Name/Color", out _Theme.Tiles.Name.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Tiles.Name.Color.Name, skinIndex, out _Theme.Tiles.Name.Color.Color);
|
||||
else
|
||||
{
|
||||
if (xmlReader.TryGetFloatValue(item + "/Tiles/Name/R", ref _Theme.Tiles.Name.Color.R))
|
||||
if (xmlReader.TryGetFloatValue(item + "/Tiles/Name/R", ref _Theme.Tiles.Name.Color.Color.R))
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Tiles/Name/G", ref _Theme.Tiles.Name.Color.G);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Tiles/Name/B", ref _Theme.Tiles.Name.Color.B);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Tiles/Name/A", ref _Theme.Tiles.Name.Color.A);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Tiles/Name/G", ref _Theme.Tiles.Name.Color.Color.G);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Tiles/Name/B", ref _Theme.Tiles.Name.Color.Color.B);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Tiles/Name/A", ref _Theme.Tiles.Name.Color.Color.A);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +220,7 @@ namespace VocaluxeLib.Menu
|
||||
_Theme.Tiles.W = _TileW;
|
||||
_Theme.Tiles.NumH = _NumH;
|
||||
_Theme.Tiles.NumW = _NumW;
|
||||
_Theme.ColorEmptyTile = new SColorF(ColorEmptyTile);
|
||||
_Theme.ColorEmptyTile.Color = new SColorF(ColorEmptyTile);
|
||||
|
||||
LoadTextures();
|
||||
}
|
||||
@@ -249,8 +245,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ColorEmptyTile>: Static color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorEmptyTileName))
|
||||
writer.WriteElementString("ColorEmptyTile", _Theme.ColorEmptyTileName);
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorEmptyTile.Name))
|
||||
writer.WriteElementString("ColorEmptyTile", _Theme.ColorEmptyTile.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", ColorEmptyTile.R.ToString("#0.00"));
|
||||
@@ -280,14 +276,14 @@ namespace VocaluxeLib.Menu
|
||||
writer.WriteComment("<Font>: Text font name");
|
||||
writer.WriteElementString("Font", _Theme.Tiles.Name.Font);
|
||||
writer.WriteComment("<Color>: Text color from ColorScheme (high priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.Tiles.Name.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.Tiles.Name.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Tiles.Name.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Tiles.Name.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", _Theme.Tiles.Name.Color.R.ToString("#0.00"));
|
||||
writer.WriteElementString("G", _Theme.Tiles.Name.Color.G.ToString("#0.00"));
|
||||
writer.WriteElementString("B", _Theme.Tiles.Name.Color.B.ToString("#0.00"));
|
||||
writer.WriteElementString("A", _Theme.Tiles.Name.Color.A.ToString("#0.00"));
|
||||
writer.WriteElementString("R", _Theme.Tiles.Name.Color.Color.R.ToString("#0.00"));
|
||||
writer.WriteElementString("G", _Theme.Tiles.Name.Color.Color.G.ToString("#0.00"));
|
||||
writer.WriteElementString("B", _Theme.Tiles.Name.Color.Color.B.ToString("#0.00"));
|
||||
writer.WriteElementString("A", _Theme.Tiles.Name.Color.Color.A.ToString("#0.00"));
|
||||
}
|
||||
writer.WriteComment("<Style>: Text style: " + CHelper.ListStrings(Enum.GetNames(typeof(EStyle))));
|
||||
writer.WriteElementString("Style", _Theme.Tiles.Name.Style.ToString());
|
||||
@@ -520,11 +516,11 @@ namespace VocaluxeLib.Menu
|
||||
_TextureEmptyTile = CBase.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
|
||||
_TextureTileSelected = CBase.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorEmptyTileName))
|
||||
ColorEmptyTile = CBase.Theme.GetColor(_Theme.ColorEmptyTileName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorEmptyTile.Name))
|
||||
ColorEmptyTile = CBase.Theme.GetColor(_Theme.ColorEmptyTile.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.Tiles.Name.ColorName))
|
||||
_Theme.Tiles.Name.Color = CBase.Theme.GetColor(_Theme.Tiles.Name.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Tiles.Name.Color.Name))
|
||||
_Theme.Tiles.Name.Color.Color = CBase.Theme.GetColor(_Theme.Tiles.Name.Color.Name, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -587,7 +583,7 @@ namespace VocaluxeLib.Menu
|
||||
var rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
|
||||
var tileStatic = new CStatic(_PartyModeID, _TextureEmptyTile, ColorEmptyTile, rect) {Aspect = EAspect.Crop};
|
||||
var tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.Tiles.Name.Space, rect.Z, _Theme.Tiles.Name.Height, rect.W, EAlignment.Center, _Theme.Tiles.Name.Style,
|
||||
_Theme.Tiles.Name.Font, _Theme.Tiles.Name.Color, "");
|
||||
_Theme.Tiles.Name.Font, _Theme.Tiles.Name.Color.Color, "");
|
||||
_Tiles.Add(new CTile(tileStatic, tileText, -1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,10 +34,8 @@ namespace VocaluxeLib.Menu
|
||||
public string TextureName;
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
[XmlElement("Color")]
|
||||
public SColorF Color;
|
||||
public SThemeColor Color;
|
||||
[XmlElement("Type")]
|
||||
public EParticleType Type;
|
||||
[XmlElement("Size")]
|
||||
@@ -403,8 +401,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref Rect.W);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
|
||||
@@ -421,7 +419,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.Rect = new SRectF(Rect);
|
||||
_Theme.Color = new SColorF(Color);
|
||||
_Theme.Color.Color = new SColorF(Color);
|
||||
_Theme.Type = _Type;
|
||||
_Theme.Size = _Size;
|
||||
_Theme.MaxNumber = _MaxNumber;
|
||||
@@ -448,8 +446,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: ParticleEffect color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", Color.R.ToString("#0.00"));
|
||||
@@ -620,8 +618,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.TextureName))
|
||||
Texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
}
|
||||
|
||||
@@ -71,14 +71,10 @@ namespace VocaluxeLib.Menu
|
||||
[XmlElement("SkinBackgroundSelected")]
|
||||
public string SelTextureBackgroundName;
|
||||
|
||||
[XmlElement("ColorNameBackground")]
|
||||
public string ColorBackgroundName;
|
||||
[XmlElement("ColorBackground")]
|
||||
public SColorF ColorBackground;
|
||||
[XmlElement("SColorNameBackground")]
|
||||
public string SelColorBackgroundName;
|
||||
public SThemeColor ColorBackground;
|
||||
[XmlElement("SColorBackground")]
|
||||
public SColorF SelColorBackground;
|
||||
public SThemeColor SelColorBackground;
|
||||
|
||||
[XmlElement("Text1")]
|
||||
public SThemeText SText1;
|
||||
@@ -307,8 +303,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Z", ref Rect.Z);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref Rect.W);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
|
||||
if (xmlReader.GetValue(item + "/ColorBackground", out _Theme.ColorBackgroundName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorBackgroundName, skinIndex, out BackgroundColor);
|
||||
if (xmlReader.GetValue(item + "/ColorBackground", out _Theme.ColorBackground.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorBackground.Name, skinIndex, out BackgroundColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/BackgroundR", ref BackgroundColor.R);
|
||||
@@ -316,8 +312,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/BackgroundB", ref BackgroundColor.B);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/BackgroundA", ref BackgroundColor.A);
|
||||
}
|
||||
if (xmlReader.GetValue(item + "/SColorBackground", out _Theme.SelColorBackgroundName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorBackgroundName, skinIndex, out BackgroundSelColor);
|
||||
if (xmlReader.GetValue(item + "/SColorBackground", out _Theme.SelColorBackground.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorBackground.Name, skinIndex, out BackgroundSelColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SBackgroundR", ref BackgroundSelColor.R);
|
||||
@@ -345,8 +341,8 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.Rect = Rect;
|
||||
_Theme.ColorBackground = BackgroundColor;
|
||||
_Theme.SelColorBackground = BackgroundSelColor;
|
||||
_Theme.ColorBackground.Color = BackgroundColor;
|
||||
_Theme.SelColorBackground.Color = BackgroundSelColor;
|
||||
_Theme.SText1 = _Theme.Text1.GetTheme();
|
||||
_Theme.SStaticCover = _Theme.StaticCover.GetTheme();
|
||||
_Theme.SStaticPlaylistFooter = _Theme.StaticPlaylistFooter.GetTheme();
|
||||
@@ -432,8 +428,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ColorBackground>: Button color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <BackgroundR>, <BackgroundG>, <BackgroundB>, <BackgroundA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorBackgroundName))
|
||||
writer.WriteElementString("ColorBackground", _Theme.ColorBackgroundName);
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorBackground.Name))
|
||||
writer.WriteElementString("ColorBackground", _Theme.ColorBackground.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("BackgroundR", BackgroundColor.R.ToString("#0.00"));
|
||||
@@ -444,8 +440,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColorBackground>: Selected paylist-entry color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SBackgroundR>, <SBackgroundG>, <SBackgroundB>, <SBackgroundA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorBackgroundName))
|
||||
writer.WriteElementString("SColorBackground", _Theme.SelColorBackgroundName);
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorBackground.Name))
|
||||
writer.WriteElementString("SColorBackground", _Theme.SelColorBackground.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("SBackgroundR", BackgroundSelColor.R.ToString("#0.00"));
|
||||
@@ -523,11 +519,11 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorBackgroundName))
|
||||
BackgroundColor = CBase.Theme.GetColor(_Theme.ColorBackgroundName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorBackground.Name))
|
||||
BackgroundColor = CBase.Theme.GetColor(_Theme.ColorBackground.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorBackgroundName))
|
||||
BackgroundSelColor = CBase.Theme.GetColor(_Theme.SelColorBackgroundName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorBackground.Name))
|
||||
BackgroundSelColor = CBase.Theme.GetColor(_Theme.SelColorBackground.Name, _PartyModeID);
|
||||
|
||||
_Theme.Text1.LoadTextures();
|
||||
_Theme.ButtonPlaylistClose.LoadTextures();
|
||||
|
||||
@@ -54,36 +54,22 @@ namespace VocaluxeLib.Menu
|
||||
[XmlElement("RectArrowRight")]
|
||||
public SRectF RectArrowRight;
|
||||
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
[XmlElement("Color")]
|
||||
public SColorF Color;
|
||||
[XmlElement("SColorName")]
|
||||
public string SelColorName;
|
||||
public SThemeColor Color;
|
||||
[XmlElement("SColor")]
|
||||
public SColorF SColor;
|
||||
[XmlElement("HColorName")]
|
||||
public string HighlightColorName;
|
||||
public SThemeColor SColor;
|
||||
[XmlElement("HColor")]
|
||||
public SColorF HColor;
|
||||
public SThemeColor HColor;
|
||||
|
||||
[XmlElement("ArrowColorName")]
|
||||
public string ArrowColorName;
|
||||
[XmlElement("ArrowColor")]
|
||||
public SColorF ArrowColor;
|
||||
[XmlElement("ArrowSColorName")]
|
||||
public string SelArrowColorName;
|
||||
public SThemeColor ArrowColor;
|
||||
[XmlElement("ArrowSColor")]
|
||||
public SColorF ArrowSColor;
|
||||
public SThemeColor ArrowSColor;
|
||||
|
||||
[XmlElement("TextColorName")]
|
||||
public string TextColorName;
|
||||
[XmlElement("TextColor")]
|
||||
public SColorF TextColor;
|
||||
[XmlElement("TextSColorName")]
|
||||
public string SelTextColorName;
|
||||
public SThemeColor TextColor;
|
||||
[XmlElement("TextSColor")]
|
||||
public SColorF TextSColor;
|
||||
public SThemeColor TextSColor;
|
||||
|
||||
[XmlElement("TextH")]
|
||||
public float TextH;
|
||||
@@ -249,17 +235,17 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
TextureArrowLeftName = slide._Theme.TextureArrowLeftName,
|
||||
TextureArrowRightName = slide._Theme.TextureArrowRightName,
|
||||
Color = slide._Theme.Color,
|
||||
SColor = slide._Theme.SColor,
|
||||
HColor = slide._Theme.HColor,
|
||||
ArrowColor = slide._Theme.ArrowColor,
|
||||
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,
|
||||
ColorName = slide._Theme.ColorName,
|
||||
SelColorName = slide._Theme.SelColorName,
|
||||
HighlightColorName = slide._Theme.HighlightColorName,
|
||||
ArrowColorName = slide._Theme.ArrowColorName,
|
||||
SelArrowColorName = slide._Theme.SelArrowColorName,
|
||||
TextColorName = slide._Theme.TextColorName,
|
||||
SelTextColorName = slide._Theme.SelTextColorName,
|
||||
TextFont = slide._Theme.TextFont,
|
||||
TextStyle = slide._Theme.TextStyle
|
||||
};
|
||||
@@ -317,8 +303,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref Rect.W);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
|
||||
@@ -327,8 +313,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorName, skinIndex, out SelColor);
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColor.Name, skinIndex, out SelColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref SelColor.R);
|
||||
@@ -337,8 +323,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SA", ref SelColor.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/HColor", out _Theme.HighlightColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.HighlightColorName, skinIndex, out HighlightColor);
|
||||
if (xmlReader.GetValue(item + "/HColor", out _Theme.HColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.HColor.Name, skinIndex, out HighlightColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/HR", ref HighlightColor.R);
|
||||
@@ -359,8 +345,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightW", ref RectArrowRight.W);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightH", ref RectArrowRight.H);
|
||||
|
||||
if (xmlReader.GetValue(item + "/ArrowColor", out _Theme.ArrowColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowColorName, skinIndex, out ColorArrow);
|
||||
if (xmlReader.GetValue(item + "/ArrowColor", out _Theme.ArrowColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowColor.Name, skinIndex, out ColorArrow);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowR", ref ColorArrow.R);
|
||||
@@ -369,8 +355,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowA", ref ColorArrow.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/ArrowSColor", out _Theme.SelArrowColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelArrowColorName, skinIndex, out SelColorArrow);
|
||||
if (xmlReader.GetValue(item + "/ArrowSColor", out _Theme.ArrowSColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowSColor.Name, skinIndex, out SelColorArrow);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowSR", ref SelColorArrow.R);
|
||||
@@ -379,8 +365,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowSA", ref SelColorArrow.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/TextColor", out _Theme.TextColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextColorName, skinIndex, out TextColor);
|
||||
if (xmlReader.GetValue(item + "/TextColor", out _Theme.TextColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextColor.Name, skinIndex, out TextColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextR", ref TextColor.R);
|
||||
@@ -389,8 +375,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextA", ref TextColor.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/TextSColor", out _Theme.SelTextColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelTextColorName, skinIndex, out SelTextColor);
|
||||
if (xmlReader.GetValue(item + "/TextSColor", out _Theme.TextSColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextSColor.Name, skinIndex, out SelTextColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextSR", ref SelTextColor.R);
|
||||
@@ -413,21 +399,21 @@ namespace VocaluxeLib.Menu
|
||||
if (_ThemeLoaded)
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.ArrowColor = new SColorF(ColorArrow);
|
||||
_Theme.ArrowSColor = new SColorF(SelColorArrow);
|
||||
_Theme.Color = new SColorF(Color);
|
||||
_Theme.HColor = new SColorF(HighlightColor);
|
||||
_Theme.ArrowColor.Color = new SColorF(ColorArrow);
|
||||
_Theme.ArrowSColor.Color = new SColorF(SelColorArrow);
|
||||
_Theme.Color.Color = new SColorF(Color);
|
||||
_Theme.HColor.Color = new SColorF(HighlightColor);
|
||||
_Theme.NumVisible = _NumVisible;
|
||||
_Theme.Rect = new SRectF(Rect);
|
||||
_Theme.RectArrowLeft = new SRectF(RectArrowLeft);
|
||||
_Theme.RectArrowRight = new SRectF(RectArrowRight);
|
||||
_Theme.SColor = new SColorF(SelColor);
|
||||
_Theme.TextColor = new SColorF(TextColor);
|
||||
_Theme.SColor.Color = new SColorF(SelColor);
|
||||
_Theme.TextColor.Color = new SColorF(TextColor);
|
||||
_Theme.TextH = TextH;
|
||||
_Theme.TextMaxW = MaxW;
|
||||
_Theme.TextRelativeX = TextRelativeX;
|
||||
_Theme.TextRelativeY = TextRelativeY;
|
||||
_Theme.TextSColor = new SColorF(SelTextColor);
|
||||
_Theme.TextSColor.Color = new SColorF(SelTextColor);
|
||||
|
||||
LoadTextures();
|
||||
}
|
||||
@@ -485,8 +471,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: SelectSlide color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", Color.R.ToString("#0.00"));
|
||||
@@ -497,8 +483,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Selected SelectSlide color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||
writer.WriteElementString("SColor", _Theme.SColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("SR", SelColor.R.ToString("#0.00"));
|
||||
@@ -509,8 +495,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <HR>, <HG>, <HB>, <HA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.HighlightColorName))
|
||||
writer.WriteElementString("HColor", _Theme.HighlightColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.HColor.Name))
|
||||
writer.WriteElementString("HColor", _Theme.HColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("HR", HighlightColor.R.ToString("#0.00"));
|
||||
@@ -521,8 +507,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ArrowColor>: Arrow color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ArrowColorName))
|
||||
writer.WriteElementString("ArrowColor", _Theme.ArrowColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.ArrowColor.Name))
|
||||
writer.WriteElementString("ArrowColor", _Theme.ArrowColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("ArrowR", ColorArrow.R.ToString("#0.00"));
|
||||
@@ -533,8 +519,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ArrowSColor>: Selected arrow color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelArrowColorName))
|
||||
writer.WriteElementString("ArrowSColor", _Theme.SelArrowColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.ArrowSColor.Name))
|
||||
writer.WriteElementString("ArrowSColor", _Theme.ArrowSColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("ArrowSR", SelColorArrow.R.ToString("#0.00"));
|
||||
@@ -545,8 +531,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<TextColor>: Text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.TextColorName))
|
||||
writer.WriteElementString("TextColor", _Theme.TextColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.TextColor.Name))
|
||||
writer.WriteElementString("TextColor", _Theme.TextColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("TextR", TextColor.R.ToString("#0.00"));
|
||||
@@ -557,8 +543,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<TextSColor>: Selected text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelTextColorName))
|
||||
writer.WriteElementString("TextSColor", _Theme.SelTextColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.TextSColor.Name))
|
||||
writer.WriteElementString("TextSColor", _Theme.TextSColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("TextSR", SelTextColor.R.ToString("#0.00"));
|
||||
@@ -891,26 +877,26 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.HighlightColorName))
|
||||
HighlightColor = CBase.Theme.GetColor(_Theme.HighlightColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.HColor.Name))
|
||||
HighlightColor = CBase.Theme.GetColor(_Theme.HColor.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.ArrowColorName))
|
||||
ColorArrow = CBase.Theme.GetColor(_Theme.ArrowColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.ArrowColor.Name))
|
||||
ColorArrow = CBase.Theme.GetColor(_Theme.ArrowColor.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.SelArrowColorName))
|
||||
SelColorArrow = CBase.Theme.GetColor(_Theme.SelArrowColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.ArrowSColor.Name))
|
||||
SelColorArrow = CBase.Theme.GetColor(_Theme.ArrowSColor.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.TextColorName))
|
||||
TextColor = CBase.Theme.GetColor(_Theme.TextColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.TextColor.Name))
|
||||
TextColor = CBase.Theme.GetColor(_Theme.TextColor.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
SelTextColor = CBase.Theme.GetColor(_Theme.SelTextColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.TextSColor.Name))
|
||||
SelTextColor = CBase.Theme.GetColor(_Theme.TextSColor.Name, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -29,9 +29,7 @@ namespace VocaluxeLib.Menu
|
||||
public string Name;
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
public SColorF Color;
|
||||
public SThemeColor Color;
|
||||
public SRectF Rect;
|
||||
public SReflection Reflection;
|
||||
}
|
||||
@@ -133,8 +131,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
_Theme.Rect = new SRectF(Rect);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
|
||||
@@ -143,7 +141,7 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
|
||||
}
|
||||
|
||||
_Theme.Color = new SColorF(Color);
|
||||
_Theme.Color.Color = new SColorF(Color);
|
||||
|
||||
if (xmlReader.ItemExists(item + "/Reflection"))
|
||||
{
|
||||
@@ -184,8 +182,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Static color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", Color.R.ToString("#0.00"));
|
||||
@@ -244,8 +242,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+16
-20
@@ -36,12 +36,8 @@ namespace VocaluxeLib.Menu
|
||||
public float Z;
|
||||
[XmlElement("H")]
|
||||
public float Height;
|
||||
[XmlElement("ColorName")]
|
||||
public string ColorName;
|
||||
public SColorF Color;
|
||||
[XmlElement("SColorName")]
|
||||
public string SelColorName; //for Buttons
|
||||
public SColorF SColor;
|
||||
public SThemeColor Color;
|
||||
public SThemeColor SColor; //for Buttons
|
||||
[XmlElement("Align")]
|
||||
public EAlignment Align;
|
||||
[XmlElement("ResizeAlign")]
|
||||
@@ -358,8 +354,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref _Height);
|
||||
xmlReader.TryGetFloatValue(item + "/MaxW", ref _MaxWidth);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
|
||||
@@ -368,8 +364,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorName, skinIndex, out SelColor);
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColor.Name, skinIndex, out SelColor);
|
||||
else
|
||||
{
|
||||
if (xmlReader.TryGetFloatValue(item + "/SR", ref SelColor.R))
|
||||
@@ -399,10 +395,10 @@ namespace VocaluxeLib.Menu
|
||||
// Set values
|
||||
_Theme.Name = elementName;
|
||||
_Theme.Align = _Align;
|
||||
_Theme.Color = Color;
|
||||
_Theme.Color.Color = Color;
|
||||
_Theme.Font = _Font;
|
||||
_Theme.ResizeAlign = _ResizeAlign;
|
||||
_Theme.SColor = SelColor;
|
||||
_Theme.SColor.Color = SelColor;
|
||||
_Theme.Style = _Style;
|
||||
_Theme.X = _X;
|
||||
_Theme.Y = _Y;
|
||||
@@ -442,8 +438,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
writer.WriteElementString("Color", _Theme.Color.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("R", Color.R.ToString("#0.00"));
|
||||
@@ -454,8 +450,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Selected Text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||
writer.WriteElementString("SColor", _Theme.SColor.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("SR", SelColor.R.ToString("#0.00"));
|
||||
@@ -567,11 +563,11 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorName))
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorName))
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+17
-8
@@ -61,18 +61,25 @@ namespace VocaluxeLib
|
||||
}
|
||||
}
|
||||
|
||||
[XmlRoot()]
|
||||
//Use for holding theme-colors
|
||||
[XmlRoot("Color")]
|
||||
public struct SThemeColor
|
||||
{
|
||||
public SColorF Color;
|
||||
public string Name;
|
||||
|
||||
//Needed for serialization
|
||||
public bool ColorSpecified { get { return Name == ""; } }
|
||||
public bool NameSpecified { get { return Name != ""; } }
|
||||
|
||||
}
|
||||
|
||||
public struct SRectF
|
||||
{
|
||||
[XmlElement("X")]
|
||||
public float X;
|
||||
[XmlElement("Y")]
|
||||
public float Y;
|
||||
[XmlElement("W")]
|
||||
public float W;
|
||||
[XmlElement("H")]
|
||||
public float H;
|
||||
[XmlElement("Z")]
|
||||
public float Z;
|
||||
[XmlIgnore]
|
||||
public float Rotation; //0..360°
|
||||
@@ -103,11 +110,13 @@ namespace VocaluxeLib
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Enabled")]
|
||||
public bool Enabled;
|
||||
[XmlElement("Height")]
|
||||
public float Height;
|
||||
[XmlElement("Space")]
|
||||
public float Space;
|
||||
|
||||
//Needed for serialization
|
||||
public bool HeightSpecified { get { return Enabled; } }
|
||||
public bool SpaceSpecified { get { return Enabled; } }
|
||||
|
||||
public SReflection(bool enabled, float height, float space)
|
||||
{
|
||||
Enabled = enabled;
|
||||
|
||||
Reference in new issue
Block a user