Unify name of selected color to SelColor
This commit is contained in:
1 parent
714b28294f
commit
10c456cbff
42 files changed
+914
-914
No files matched your search
@@ -33,8 +33,8 @@ namespace VocaluxeLib.Menu
|
||||
public SThemeColor Color;
|
||||
public SThemeColor SelColor;
|
||||
public SThemeText Text;
|
||||
public SThemeText SText;
|
||||
[XmlIgnore] public bool STextSpecified;
|
||||
public SThemeText SelText;
|
||||
[XmlIgnore] public bool SelTextSpecified;
|
||||
public SReflection Reflection;
|
||||
public SReflection SelReflection;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ namespace VocaluxeLib.Menu
|
||||
_Theme = theme;
|
||||
|
||||
Text = new CText(_Theme.Text, _PartyModeID, buttonText);
|
||||
_SelText = _Theme.STextSpecified ? new CText(_Theme.SText, _PartyModeID, buttonText) : null;
|
||||
_SelText = _Theme.SelTextSpecified ? new CText(_Theme.SelText, _PartyModeID, buttonText) : null;
|
||||
|
||||
Selected = false;
|
||||
EditMode = false;
|
||||
@@ -196,7 +196,7 @@ namespace VocaluxeLib.Menu
|
||||
Text.Z = Rect.Z;
|
||||
if (xmlReader.ItemExists(item + "/SText"))
|
||||
{
|
||||
_Theme.STextSpecified = true;
|
||||
_Theme.SelTextSpecified = true;
|
||||
_ThemeLoaded &= _SelText.LoadTheme(item, "SText", xmlReader, true);
|
||||
_SelText.Z = Rect.Z;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ namespace VocaluxeLib.Menu
|
||||
_Theme.Color.Color = Color;
|
||||
_Theme.SelColor.Color = SelColor;
|
||||
_Theme.Text = Text.GetTheme();
|
||||
_Theme.SText = _SelText.GetTheme();
|
||||
_Theme.SelText = _SelText.GetTheme();
|
||||
|
||||
LoadSkin();
|
||||
}
|
||||
@@ -265,7 +265,7 @@ namespace VocaluxeLib.Menu
|
||||
else
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
}
|
||||
else if (!_Theme.STextSpecified)
|
||||
else if (!_Theme.SelTextSpecified)
|
||||
{
|
||||
texture = SelTexture ?? CBase.Themes.GetSkinTexture(_Theme.SkinSelected, _PartyModeID);
|
||||
|
||||
@@ -310,9 +310,9 @@ namespace VocaluxeLib.Menu
|
||||
Text = new CText(_Theme.Text, _PartyModeID);
|
||||
Text.LoadSkin();
|
||||
|
||||
if (_Theme.STextSpecified)
|
||||
if (_Theme.SelTextSpecified)
|
||||
{
|
||||
_SelText = new CText(_Theme.SText, _PartyModeID);
|
||||
_SelText = new CText(_Theme.SelText, _PartyModeID);
|
||||
_SelText.LoadSkin();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace VocaluxeLib.Menu
|
||||
public SRectF Rect;
|
||||
|
||||
public SThemeColor Color;
|
||||
public SThemeColor SColor;
|
||||
public SThemeColor SelColor;
|
||||
}
|
||||
|
||||
public class CLyric : CMenuElementBase, IMenuElement, IThemeable
|
||||
@@ -130,8 +130,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref _Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.SColor.Get(_PartyModeID, out _ColorProcessed);
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.SelColor.Get(_PartyModeID, out _ColorProcessed);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref _ColorProcessed.R);
|
||||
@@ -144,7 +144,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.Color.Color = _Color;
|
||||
_Theme.SColor.Color = _ColorProcessed;
|
||||
_Theme.SelColor.Color = _ColorProcessed;
|
||||
LoadSkin();
|
||||
}
|
||||
return _ThemeLoaded;
|
||||
@@ -429,7 +429,7 @@ namespace VocaluxeLib.Menu
|
||||
public void LoadSkin()
|
||||
{
|
||||
_Theme.Color.Get(_PartyModeID, out _Color);
|
||||
_Theme.SColor.Get(_PartyModeID, out _ColorProcessed);
|
||||
_Theme.SelColor.Get(_PartyModeID, out _ColorProcessed);
|
||||
|
||||
MaxRect = _Theme.Rect;
|
||||
_Text = new CText(X, Y, Z, H, W, EAlignment.Left, EStyle.Bold, "Normal", _Color, String.Empty);
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace VocaluxeLib.Menu
|
||||
public string SkinBackgroundSelected;
|
||||
|
||||
public SThemeColor ColorBackground;
|
||||
[XmlElement("SColorBackground")] public SThemeColor SelColorBackground;
|
||||
public SThemeColor SelColorBackground;
|
||||
|
||||
public SThemeText Text1;
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@ namespace VocaluxeLib.Menu
|
||||
public SRectF RectArrowRight;
|
||||
|
||||
public SThemeColor Color;
|
||||
public SThemeColor SColor;
|
||||
public SThemeColor SelColor;
|
||||
|
||||
public SThemeColor ArrowColor;
|
||||
public SThemeColor ArrowSColor;
|
||||
public SThemeColor ArrowSelColor;
|
||||
|
||||
public SThemeColor TextColor;
|
||||
public SThemeColor TextSColor;
|
||||
public SThemeColor TextSelColor;
|
||||
|
||||
public float TextH;
|
||||
public float TextRelativeX;
|
||||
@@ -299,8 +299,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref _Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.SColor.Get(_PartyModeID, out _SelColor);
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.SelColor.Get(_PartyModeID, out _SelColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref _SelColor.R);
|
||||
@@ -331,8 +331,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowA", ref _ColorArrow.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/ArrowSColor", out _Theme.ArrowSColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.ArrowSColor.Get(_PartyModeID, out _SelColorArrow);
|
||||
if (xmlReader.GetValue(item + "/ArrowSColor", out _Theme.ArrowSelColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.ArrowSelColor.Get(_PartyModeID, out _SelColorArrow);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowSR", ref _SelColorArrow.R);
|
||||
@@ -351,8 +351,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextA", ref _TextColor.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/TextSColor", out _Theme.TextSColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.TextSColor.Get(_PartyModeID, out _SelTextColor);
|
||||
if (xmlReader.GetValue(item + "/TextSColor", out _Theme.TextSelColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.TextSelColor.Get(_PartyModeID, out _SelTextColor);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextSR", ref _SelTextColor.R);
|
||||
@@ -374,13 +374,13 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
_Theme.ArrowColor.Color = _ColorArrow;
|
||||
_Theme.ArrowSColor.Color = _SelColorArrow;
|
||||
_Theme.ArrowSelColor.Color = _SelColorArrow;
|
||||
_Theme.Color.Color = _Color;
|
||||
_Theme.RectArrowLeft = RectArrowLeft;
|
||||
_Theme.RectArrowRight = RectArrowRight;
|
||||
_Theme.SColor.Color = _SelColor;
|
||||
_Theme.SelColor.Color = _SelColor;
|
||||
_Theme.TextColor.Color = _TextColor;
|
||||
_Theme.TextSColor.Color = _SelTextColor;
|
||||
_Theme.TextSelColor.Color = _SelTextColor;
|
||||
LoadSkin();
|
||||
}
|
||||
return _ThemeLoaded;
|
||||
@@ -666,11 +666,11 @@ namespace VocaluxeLib.Menu
|
||||
public void LoadSkin()
|
||||
{
|
||||
_Theme.Color.Get(_PartyModeID, out _Color);
|
||||
_Theme.SColor.Get(_PartyModeID, out _SelColor);
|
||||
_Theme.SelColor.Get(_PartyModeID, out _SelColor);
|
||||
_Theme.ArrowColor.Get(_PartyModeID, out _ColorArrow);
|
||||
_Theme.ArrowSColor.Get(_PartyModeID, out _SelColorArrow);
|
||||
_Theme.ArrowSelColor.Get(_PartyModeID, out _SelColorArrow);
|
||||
_Theme.TextColor.Get(_PartyModeID, out _TextColor);
|
||||
_Theme.TextSColor.Get(_PartyModeID, out _SelTextColor);
|
||||
_Theme.TextSelColor.Get(_PartyModeID, out _SelTextColor);
|
||||
|
||||
MaxRect = _Theme.Rect;
|
||||
RectArrowLeft = _Theme.RectArrowLeft;
|
||||
|
||||
+26
-26
@@ -33,7 +33,7 @@ namespace VocaluxeLib.Menu
|
||||
[XmlElement("H")] public float FontHeight;
|
||||
[XmlElement("MaxW")] public float MaxWidth;
|
||||
public SThemeColor Color;
|
||||
public SThemeColor SColor; //for Buttons
|
||||
public SThemeColor SelColor; //for Buttons
|
||||
public EAlignment Align;
|
||||
public EHAlignment ResizeAlign;
|
||||
[XmlElement("Style")] public EStyle FontStyle;
|
||||
@@ -163,8 +163,8 @@ namespace VocaluxeLib.Menu
|
||||
public SColorF Color; //normal Color
|
||||
public SColorF SelColor; //selected Color for Buttons
|
||||
|
||||
public float ReflectionSpace;
|
||||
public float ReflectionHeight;
|
||||
private float _ReflectionSpace;
|
||||
private float _ReflectionHeight;
|
||||
|
||||
private string _Text = String.Empty;
|
||||
public string Text
|
||||
@@ -251,8 +251,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
Color = text.Color;
|
||||
SelColor = text.SelColor;
|
||||
ReflectionSpace = text.ReflectionSpace;
|
||||
ReflectionHeight = text.ReflectionHeight;
|
||||
_ReflectionSpace = text._ReflectionSpace;
|
||||
_ReflectionHeight = text._ReflectionHeight;
|
||||
|
||||
Text = text.Text;
|
||||
Visible = text.Visible;
|
||||
@@ -283,8 +283,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
Selected = false;
|
||||
|
||||
ReflectionSpace = rspace;
|
||||
ReflectionHeight = rheight;
|
||||
_ReflectionSpace = rspace;
|
||||
_ReflectionHeight = rheight;
|
||||
}
|
||||
|
||||
public CText(SThemeText theme, int partyModeID, bool buttonText = false)
|
||||
@@ -326,8 +326,8 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.SColor.Get(_PartyModeID, out SelColor);
|
||||
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColor.Name, String.Empty))
|
||||
_ThemeLoaded &= _Theme.SelColor.Get(_PartyModeID, out SelColor);
|
||||
else
|
||||
{
|
||||
if (xmlReader.TryGetFloatValue(item + "/SR", ref SelColor.R))
|
||||
@@ -348,9 +348,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (xmlReader.ItemExists(item + "/Reflection") && !buttonText)
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Space", ref ReflectionSpace);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Height", ref ReflectionHeight);
|
||||
_Theme.Reflection = new SReflection(true, ReflectionHeight, ReflectionSpace);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Space", ref _ReflectionSpace);
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Height", ref _ReflectionHeight);
|
||||
_Theme.Reflection = new SReflection(true, _ReflectionHeight, _ReflectionSpace);
|
||||
}
|
||||
else
|
||||
_Theme.Reflection = new SReflection(false, 0f, 0f);
|
||||
@@ -361,7 +361,7 @@ namespace VocaluxeLib.Menu
|
||||
_Theme.Align = _Align;
|
||||
_Theme.Color.Color = Color;
|
||||
_Theme.ResizeAlign = _ResizeAlign;
|
||||
_Theme.SColor.Color = SelColor;
|
||||
_Theme.SelColor.Color = SelColor;
|
||||
|
||||
_ButtonText = buttonText;
|
||||
_PositionNeedsUpdate = true;
|
||||
@@ -389,8 +389,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
CBase.Fonts.DrawText(_Text, CalculatedFont, Rect.X, Rect.Y, Z, color);
|
||||
|
||||
if (ReflectionHeight > 0)
|
||||
CBase.Fonts.DrawTextReflection(_Text, CalculatedFont, Rect.X, Rect.Y, Z, color, ReflectionSpace, ReflectionHeight);
|
||||
if (_ReflectionHeight > 0)
|
||||
CBase.Fonts.DrawTextReflection(_Text, CalculatedFont, Rect.X, Rect.Y, Z, color, _ReflectionSpace, _ReflectionHeight);
|
||||
|
||||
if (Selected && (CBase.Settings.GetProgramState() == EProgramState.EditTheme))
|
||||
CBase.Drawing.DrawRect(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(Rect.X, Rect.Y, Rect.W, Rect.H, Z));
|
||||
@@ -403,7 +403,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
CBase.Fonts.DrawText(Text, CalculatedFont, Rect.X, Rect.Y, Z, color, begin, end);
|
||||
|
||||
if (ReflectionHeight > 0)
|
||||
if (_ReflectionHeight > 0)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
@@ -414,20 +414,20 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void DrawRelative(float rx, float ry, float reflectionHeight = 0f, float reflectionSpace = 0f, float rectHeight = 0f)
|
||||
{
|
||||
float oldReflectionSpace = ReflectionSpace;
|
||||
float oldReflectionHeight = ReflectionHeight;
|
||||
float oldReflectionSpace = _ReflectionSpace;
|
||||
float oldReflectionHeight = _ReflectionHeight;
|
||||
if (reflectionHeight > 0)
|
||||
{
|
||||
ReflectionSpace = (rectHeight - Rect.Y - Rect.H) * 2 + reflectionSpace;
|
||||
ReflectionHeight = reflectionHeight - (rectHeight - Rect.Y) + Rect.H;
|
||||
_ReflectionSpace = (rectHeight - Rect.Y - Rect.H) * 2 + reflectionSpace;
|
||||
_ReflectionHeight = reflectionHeight - (rectHeight - Rect.Y) + Rect.H;
|
||||
}
|
||||
else
|
||||
ReflectionHeight = 0;
|
||||
_ReflectionHeight = 0;
|
||||
X += rx;
|
||||
Y += ry;
|
||||
_Draw(true);
|
||||
ReflectionSpace = oldReflectionSpace;
|
||||
ReflectionHeight = oldReflectionHeight;
|
||||
_ReflectionSpace = oldReflectionSpace;
|
||||
_ReflectionHeight = oldReflectionHeight;
|
||||
X -= rx;
|
||||
Y -= ry;
|
||||
}
|
||||
@@ -437,7 +437,7 @@ namespace VocaluxeLib.Menu
|
||||
public void LoadSkin()
|
||||
{
|
||||
_Theme.Color.Get(_PartyModeID, out Color);
|
||||
_Theme.SColor.Get(_PartyModeID, out SelColor);
|
||||
_Theme.SelColor.Get(_PartyModeID, out SelColor);
|
||||
|
||||
X = _Theme.X;
|
||||
Y = _Theme.Y;
|
||||
@@ -451,8 +451,8 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_Theme.Reflection.Enabled)
|
||||
{
|
||||
ReflectionSpace = _Theme.Reflection.Space;
|
||||
ReflectionHeight = _Theme.Reflection.Height;
|
||||
_ReflectionSpace = _Theme.Reflection.Space;
|
||||
_ReflectionHeight = _Theme.Reflection.Height;
|
||||
}
|
||||
|
||||
Text = _Theme.Text;
|
||||
|
||||
Reference in new issue
Block a user