Remove bounds from DrawTextureReflection because it was never used
This commit is contained in:
1 parent
c9c907e3f0
commit
f5f1a91481
11 files changed
+37
-77
No files matched your search
@@ -300,7 +300,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_Reflection)
|
||||
{
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, _ReflectionSpace, _ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, Color, _ReflectionSpace, _ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, _ReflectionHeight, _ReflectionSpace, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -314,7 +314,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_Reflection)
|
||||
{
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, Rect, _ReflectionSpace, _ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, _ReflectionSpace, _ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, _ReflectionHeight, _ReflectionSpace, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -328,7 +328,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_Reflection)
|
||||
{
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, Rect, _ReflectionSpace, _ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, _ReflectionSpace, _ReflectionHeight);
|
||||
_SelText.DrawRelative(Rect.X, Rect.Y, _ReflectionHeight, _ReflectionSpace, Rect.H);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -193,22 +193,19 @@ namespace VocaluxeLib.Menu
|
||||
public void Draw(EAspect aspect, float scale = 1f, float zModify = 0f, bool forceDraw = false)
|
||||
{
|
||||
CTextureRef texture = Texture;
|
||||
SRectF bounds = Rect.Scale(scale);
|
||||
SRectF rect;
|
||||
if (aspect != EAspect.Stretch && texture != null)
|
||||
CHelper.SetRect(bounds, out rect, texture.OrigAspect, aspect);
|
||||
else
|
||||
rect = bounds;
|
||||
rect.Z = Rect.Z + zModify;
|
||||
SRectF rect = Rect.Scale(scale);
|
||||
rect.Z += zModify;
|
||||
if (texture != null)
|
||||
CHelper.SetRect(rect, out rect, texture.OrigAspect, aspect);
|
||||
|
||||
var color = new SColorF(Color.R, Color.G, Color.B, Color.A * Alpha);
|
||||
if (Visible || forceDraw || (CBase.Settings.GetProgramState() == EProgramState.EditTheme))
|
||||
{
|
||||
if (texture != null)
|
||||
{
|
||||
CBase.Drawing.DrawTexture(texture, rect, color, bounds);
|
||||
CBase.Drawing.DrawTexture(texture, rect, color);
|
||||
if (Reflection)
|
||||
CBase.Drawing.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, rect, color, ReflectionSpace, ReflectionHeight);
|
||||
}
|
||||
else
|
||||
CBase.Drawing.DrawColor(color, rect);
|
||||
|
||||
@@ -473,14 +473,11 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
if (vidtex.Color.A < 1)
|
||||
_CoverBig.Draw(EAspect.Crop);
|
||||
var bounds = new RectangleF(_CoverBig.Rect.X, _CoverBig.Rect.Y, _CoverBig.Rect.W, _CoverBig.Rect.H);
|
||||
RectangleF rect;
|
||||
CHelper.SetRect(bounds, out rect, vidtex.OrigAspect, EAspect.Crop);
|
||||
var vidRect = new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z);
|
||||
var vidRectBounds = new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f);
|
||||
SRectF rect;
|
||||
CHelper.SetRect(_CoverBig.Rect, out rect, vidtex.OrigAspect, EAspect.Crop);
|
||||
|
||||
CBase.Drawing.DrawTexture(vidtex, vidRect, vidtex.Color, vidRectBounds);
|
||||
CBase.Drawing.DrawTextureReflection(vidtex, vidRect, vidtex.Color, vidRectBounds, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
CBase.Drawing.DrawTexture(vidtex, rect);
|
||||
CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
}
|
||||
else
|
||||
_CoverBig.Draw(EAspect.Crop);
|
||||
|
||||
Reference in new issue
Block a user