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 Color;
|
||||||
public SColorF SColor;
|
public SColorF SColor;
|
||||||
|
|
||||||
|
public bool SelText;
|
||||||
public CText Text;
|
public CText Text;
|
||||||
|
public CText SText;
|
||||||
|
|
||||||
public bool Reflection;
|
public bool Reflection;
|
||||||
public float ReflectionSpace;
|
public float ReflectionSpace;
|
||||||
@@ -60,7 +62,9 @@ namespace Vocaluxe.Menu
|
|||||||
Color = new SColorF();
|
Color = new SColorF();
|
||||||
SColor = new SColorF();
|
SColor = new SColorF();
|
||||||
|
|
||||||
|
SelText = false;
|
||||||
Text = new CText();
|
Text = new CText();
|
||||||
|
SText = new CText();
|
||||||
Selected = false;
|
Selected = false;
|
||||||
Visible = true;
|
Visible = true;
|
||||||
|
|
||||||
@@ -113,6 +117,13 @@ namespace Vocaluxe.Menu
|
|||||||
|
|
||||||
_ThemeLoaded &= Text.LoadTheme(item, "Text", navigator, SkinIndex, true);
|
_ThemeLoaded &= Text.LoadTheme(item, "Text", navigator, SkinIndex, true);
|
||||||
Text.Z = Rect.Z;
|
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
|
//Reflections
|
||||||
if (CHelper.ItemExistsInXML(item + "/Reflection", navigator))
|
if (CHelper.ItemExistsInXML(item + "/Reflection", navigator))
|
||||||
@@ -189,6 +200,8 @@ namespace Vocaluxe.Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text.SaveTheme(writer);
|
Text.SaveTheme(writer);
|
||||||
|
if (SelText)
|
||||||
|
SText.SaveTheme(writer);
|
||||||
|
|
||||||
writer.WriteComment("<Reflection> If exists:");
|
writer.WriteComment("<Reflection> If exists:");
|
||||||
writer.WriteComment(" <Space>: Reflection Space");
|
writer.WriteComment(" <Space>: Reflection Space");
|
||||||
@@ -240,25 +253,34 @@ namespace Vocaluxe.Menu
|
|||||||
{
|
{
|
||||||
texture = CTheme.GetSkinTexture(_Theme.TextureName);
|
texture = CTheme.GetSkinTexture(_Theme.TextureName);
|
||||||
CDraw.DrawTexture(texture, Rect, Color);
|
CDraw.DrawTexture(texture, Rect, Color);
|
||||||
|
Text.DrawRelative(Rect.X, Rect.Y);
|
||||||
if (Reflection)
|
if (Reflection)
|
||||||
{
|
{
|
||||||
CDraw.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
|
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);
|
texture = CTheme.GetSkinTexture(_Theme.STextureName);
|
||||||
CDraw.DrawTexture(texture, Rect, SColor);
|
CDraw.DrawTexture(texture, Rect, SColor);
|
||||||
|
Text.DrawRelative(Rect.X, Rect.Y);
|
||||||
if (Reflection)
|
if (Reflection)
|
||||||
{
|
{
|
||||||
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||||
|
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(SelText)
|
||||||
Text.DrawRelative(Rect.X, Rect.Y);
|
|
||||||
if (Reflection)
|
|
||||||
{
|
{
|
||||||
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