Removed unnecessary Reflection bool
fixed typo
This commit is contained in:
1 parent
8ffff107e2
commit
5df160971d
2 files changed
+6
-17
No files matched your search
@@ -44,14 +44,14 @@ namespace Vocaluxe.Base.Font
|
|||||||
get { return _BoundingBox.Height * _GetFactor(); }
|
get { return _BoundingBox.Height * _GetFactor(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public CGlyph(char chr, float maxHigh)
|
public CGlyph(char chr, float maxHeight)
|
||||||
{
|
{
|
||||||
float oldHeight = CFonts.Height;
|
float oldHeight = CFonts.Height;
|
||||||
float outline = CFonts.Outline;
|
float outline = CFonts.Outline;
|
||||||
float outlineSize = outline * maxHigh;
|
float outlineSize = outline * maxHeight;
|
||||||
string chrString = chr.ToString();
|
string chrString = chr.ToString();
|
||||||
|
|
||||||
CFonts.Height = maxHigh; // *factor;
|
CFonts.Height = maxHeight; // *factor;
|
||||||
//float factor = _GetFactor(chr, flags);
|
//float factor = _GetFactor(chr, flags);
|
||||||
System.Drawing.Font fo = CFonts.GetFont();
|
System.Drawing.Font fo = CFonts.GetFont();
|
||||||
SizeF fullSize, boundingSize;
|
SizeF fullSize, boundingSize;
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ namespace VocaluxeLib.Menu
|
|||||||
public SColorF Color; //normal Color
|
public SColorF Color; //normal Color
|
||||||
public SColorF SelColor; //selected Color for Buttons
|
public SColorF SelColor; //selected Color for Buttons
|
||||||
|
|
||||||
public bool Reflection;
|
|
||||||
public float ReflectionSpace;
|
public float ReflectionSpace;
|
||||||
public float ReflectionHeight;
|
public float ReflectionHeight;
|
||||||
|
|
||||||
@@ -296,7 +295,6 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
Color = new SColorF(text.Color);
|
Color = new SColorF(text.Color);
|
||||||
SelColor = new SColorF(text.SelColor);
|
SelColor = new SColorF(text.SelColor);
|
||||||
Reflection = text.Reflection;
|
|
||||||
ReflectionSpace = text.ReflectionSpace;
|
ReflectionSpace = text.ReflectionSpace;
|
||||||
ReflectionHeight = text.ReflectionHeight;
|
ReflectionHeight = text.ReflectionHeight;
|
||||||
|
|
||||||
@@ -341,7 +339,6 @@ namespace VocaluxeLib.Menu
|
|||||||
else
|
else
|
||||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||||
|
|
||||||
Reflection = true;
|
|
||||||
ReflectionSpace = rspace;
|
ReflectionSpace = rspace;
|
||||||
ReflectionHeight = rheight;
|
ReflectionHeight = rheight;
|
||||||
}
|
}
|
||||||
@@ -377,8 +374,6 @@ namespace VocaluxeLib.Menu
|
|||||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||||
else
|
else
|
||||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||||
|
|
||||||
Reflection = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text, float rspace, float rheight)
|
public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text, float rspace, float rheight)
|
||||||
@@ -413,7 +408,6 @@ namespace VocaluxeLib.Menu
|
|||||||
else
|
else
|
||||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||||
|
|
||||||
Reflection = true;
|
|
||||||
ReflectionSpace = rspace;
|
ReflectionSpace = rspace;
|
||||||
ReflectionHeight = rheight;
|
ReflectionHeight = rheight;
|
||||||
}
|
}
|
||||||
@@ -449,8 +443,6 @@ namespace VocaluxeLib.Menu
|
|||||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||||
else
|
else
|
||||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||||
|
|
||||||
Reflection = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
|
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
|
||||||
@@ -503,12 +495,9 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
if (xmlReader.ItemExists(item + "/Reflection") && !buttonText)
|
if (xmlReader.ItemExists(item + "/Reflection") && !buttonText)
|
||||||
{
|
{
|
||||||
Reflection = true;
|
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Space", ref ReflectionSpace);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Space", ref ReflectionSpace);
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Height", ref ReflectionHeight);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Height", ref ReflectionHeight);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Reflection = false;
|
|
||||||
|
|
||||||
// Set values
|
// Set values
|
||||||
_Theme.Name = elementName;
|
_Theme.Name = elementName;
|
||||||
@@ -598,7 +587,7 @@ namespace VocaluxeLib.Menu
|
|||||||
writer.WriteComment(" <Height>: Reflection Height");
|
writer.WriteComment(" <Height>: Reflection Height");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Reflection && !_ButtonText)
|
if (ReflectionHeight > 0 && !_ButtonText)
|
||||||
{
|
{
|
||||||
writer.WriteStartElement("Reflection");
|
writer.WriteStartElement("Reflection");
|
||||||
writer.WriteElementString("Space", ReflectionSpace.ToString("#0"));
|
writer.WriteElementString("Space", ReflectionSpace.ToString("#0"));
|
||||||
@@ -635,7 +624,7 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
CBase.Fonts.DrawText(_Text, _DrawPosition.TextHeight, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
CBase.Fonts.DrawText(_Text, _DrawPosition.TextHeight, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||||
|
|
||||||
if (Reflection)
|
if (ReflectionHeight > 0)
|
||||||
{
|
{
|
||||||
float factor = 0f;
|
float factor = 0f;
|
||||||
switch (HAlign)
|
switch (HAlign)
|
||||||
@@ -688,7 +677,7 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
CBase.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
CBase.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
||||||
|
|
||||||
if (Reflection)
|
if (ReflectionHeight > 0)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user