Changed texture sizes to more reasonable int

This commit is contained in:
Flamefire committed 2013-05-03 20:07:53 +02:00
1 parent 1bfc76e4d3
commit 151fab8857
22 files changed
+67 -66

No files matched your search

+3 -3
View File
@@ -207,7 +207,7 @@ namespace VocaluxeLib.Menu
{
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
RectangleF rect;
CHelper.SetRect(bounds, out rect, texture.Width / texture.Height, EAspect.Crop);
CHelper.SetRect(bounds, out rect, (float)texture.Width / texture.Height, EAspect.Crop);
CBase.Drawing.DrawTexture(texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
return true;
@@ -222,7 +222,7 @@ namespace VocaluxeLib.Menu
{
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
RectangleF rect;
CHelper.SetRect(bounds, out rect, videoTexture.Width / videoTexture.Height, EAspect.Crop);
CHelper.SetRect(bounds, out rect, (float)videoTexture.Width / videoTexture.Height, EAspect.Crop);
CBase.Drawing.DrawTexture(videoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
return true;
@@ -237,7 +237,7 @@ namespace VocaluxeLib.Menu
{
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
RectangleF rect;
CHelper.SetRect(bounds, out rect, videoTexture.Width / videoTexture.Height, EAspect.Crop);
CHelper.SetRect(bounds, out rect, (float)videoTexture.Width / videoTexture.Height, EAspect.Crop);
CBase.Drawing.DrawTexture(videoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
return true;
+1 -1
View File
@@ -348,7 +348,7 @@ namespace VocaluxeLib.Menu
public void HandleMouse(SMouseEvent mevent)
{
for (int i = 0; i < _Tiles.Count; i++ )
for (int i = 0; i < _Tiles.Count; i++)
{
if (CHelper.IsInBounds(_Tiles[i].Avatar.Rect, mevent))
{
+1 -1
View File
@@ -253,7 +253,7 @@ namespace VocaluxeLib.Menu
{
RectangleF bounds2 = new RectangleF(bounds.X, bounds.Y, bounds.W, bounds.H);
RectangleF rect2;
CHelper.SetRect(bounds2, out rect2, texture.Width / texture.Height, aspect);
CHelper.SetRect(bounds2, out rect2, (float)texture.Width / texture.Height, aspect);
rect.X = rect2.X;
rect.Y = rect2.Y;
+3 -3
View File
@@ -169,7 +169,7 @@ namespace VocaluxeLib.Menu
}
/// <summary>
/// Do NOT read/write this anywhere but in _UpdateTextPosition!
/// Do NOT read/write this anywhere but in _UpdateTextPosition!
/// </summary>
private SRectF _Rect;
public SRectF Rect
@@ -499,8 +499,8 @@ namespace VocaluxeLib.Menu
public void DrawRelative(float rx, float ry, float reflectionHeight = 0f, float reflectionSpace = 0f, float rectHeight = 0f)
{
var oldReflectionSpace = ReflectionSpace;
var oldReflectionHeight = ReflectionHeight;
float oldReflectionSpace = ReflectionSpace;
float oldReflectionHeight = ReflectionHeight;
if (reflectionHeight > 0)
{
ReflectionSpace = (rectHeight - Rect.Y - Rect.H) * 2 + reflectionSpace;
@@ -459,7 +459,7 @@ namespace VocaluxeLib.Menu.SongMenu
_CoverBig.Draw(1f, EAspect.Crop);
RectangleF bounds = new RectangleF(_CoverBig.Rect.X, _CoverBig.Rect.Y, _CoverBig.Rect.W, _CoverBig.Rect.H);
RectangleF rect;
CHelper.SetRect(bounds, out rect, _Vidtex.Width / _Vidtex.Height, EAspect.Crop);
CHelper.SetRect(bounds, out rect, (float)_Vidtex.Width / _Vidtex.Height, EAspect.Crop);
SRectF vidRect = new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z);
SRectF vidRectBounds = new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f);
+8 -8
View File
@@ -108,12 +108,12 @@ namespace VocaluxeLib.Menu
public string TexturePath;
public float Width;
public float Height;
public int Width;
public int Height;
public SRectF Rect;
public float W2; //power of 2 width
public float H2; //power of 2 height
public int W2; //power of 2 width
public int H2; //power of 2 height
public float WidthRatio;
public float HeightRatio;
@@ -126,12 +126,12 @@ namespace VocaluxeLib.Menu
ID = -1;
TexturePath = String.Empty;
Width = 1f;
Height = 1f;
Width = 1;
Height = 1;
Rect = new SRectF(0f, 0f, 1f, 1f, 0f);
W2 = 2f;
H2 = 2f;
W2 = 1;
H2 = 1;
WidthRatio = 0.5f;
HeightRatio = 0.5f;