Added SText to buttons.
This commit is contained in:
1 parent
889dacc32e
commit
ebef44745a
1 file changed
+27
-5
@@ -30,7 +30,9 @@ namespace Vocaluxe.Menu
|
||||
public SColorF Color;
|
||||
public SColorF SColor;
|
||||
|
||||
public bool SelText;
|
||||
public CText Text;
|
||||
public CText SText;
|
||||
|
||||
public bool Reflection;
|
||||
public float ReflectionSpace;
|
||||
@@ -60,7 +62,9 @@ namespace Vocaluxe.Menu
|
||||
Color = new SColorF();
|
||||
SColor = new SColorF();
|
||||
|
||||
SelText = false;
|
||||
Text = new CText();
|
||||
SText = new CText();
|
||||
Selected = false;
|
||||
Visible = true;
|
||||
|
||||
@@ -113,6 +117,13 @@ namespace Vocaluxe.Menu
|
||||
|
||||
_ThemeLoaded &= Text.LoadTheme(item, "Text", navigator, SkinIndex, true);
|
||||
Text.Z = Rect.Z;
|
||||
if (CHelper.ItemExistsInXML(item + "/SText", navigator))
|
||||
{
|
||||
SelText = true;
|
||||
_ThemeLoaded &= SText.LoadTheme(item, "SText", navigator, SkinIndex, true);
|
||||
SText.Z = Rect.Z;
|
||||
}
|
||||
|
||||
|
||||
//Reflections
|
||||
if (CHelper.ItemExistsInXML(item + "/Reflection", navigator))
|
||||
@@ -189,6 +200,8 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
|
||||
Text.SaveTheme(writer);
|
||||
if (SelText)
|
||||
SText.SaveTheme(writer);
|
||||
|
||||
writer.WriteComment("<Reflection> If exists:");
|
||||
writer.WriteComment(" <Space>: Reflection Space");
|
||||
@@ -240,25 +253,34 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
texture = CTheme.GetSkinTexture(_Theme.TextureName);
|
||||
CDraw.DrawTexture(texture, Rect, Color);
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
if (Reflection)
|
||||
{
|
||||
CDraw.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(!SelText)
|
||||
{
|
||||
texture = CTheme.GetSkinTexture(_Theme.STextureName);
|
||||
CDraw.DrawTexture(texture, Rect, SColor);
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
if (Reflection)
|
||||
{
|
||||
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
}
|
||||
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
if (Reflection)
|
||||
else if(SelText)
|
||||
{
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
texture = CTheme.GetSkinTexture(_Theme.STextureName);
|
||||
CDraw.DrawTexture(texture, Rect, SColor);
|
||||
SText.DrawRelative(Rect.X, Rect.Y);
|
||||
if (Reflection)
|
||||
{
|
||||
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
SText.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user