Introduced OrigSize for original size of textures
This commit is contained in:
1 parent
151fab8857
commit
5bbfd07e01
15 files changed
+206
-229
No files matched your search
@@ -203,11 +203,11 @@ namespace VocaluxeLib.Menu
|
||||
private bool _DrawTexture()
|
||||
{
|
||||
STexture texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
if (texture.Height > 0)
|
||||
if (texture.OrigSize.Height > 1)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
RectangleF rect;
|
||||
CHelper.SetRect(bounds, out rect, (float)texture.Width / texture.Height, EAspect.Crop);
|
||||
CHelper.SetRect(bounds, out rect, texture.OrigAspect, EAspect.Crop);
|
||||
|
||||
CBase.Drawing.DrawTexture(texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
@@ -218,11 +218,11 @@ namespace VocaluxeLib.Menu
|
||||
private bool _DrawVideo()
|
||||
{
|
||||
STexture videoTexture = CBase.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
if (videoTexture.Height > 0)
|
||||
if (videoTexture.OrigSize.Height > 1)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
RectangleF rect;
|
||||
CHelper.SetRect(bounds, out rect, (float)videoTexture.Width / videoTexture.Height, EAspect.Crop);
|
||||
CHelper.SetRect(bounds, out rect, videoTexture.OrigAspect, EAspect.Crop);
|
||||
|
||||
CBase.Drawing.DrawTexture(videoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
@@ -233,11 +233,11 @@ namespace VocaluxeLib.Menu
|
||||
private bool _DrawBackgroundMusicVideo()
|
||||
{
|
||||
STexture videoTexture = CBase.BackgroundMusic.GetVideoTexture();
|
||||
if (videoTexture.Height > 0)
|
||||
if (videoTexture.OrigSize.Height > 1)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
RectangleF rect;
|
||||
CHelper.SetRect(bounds, out rect, (float)videoTexture.Width / videoTexture.Height, EAspect.Crop);
|
||||
CHelper.SetRect(bounds, out rect, videoTexture.OrigAspect, EAspect.Crop);
|
||||
|
||||
CBase.Drawing.DrawTexture(videoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user