Draw background like all other elements

Few fixes
This commit is contained in:
Flamefire committed 2014-10-22 13:47:26 +02:00
1 parent 8c3a50c18f
commit 67d081d1c1
5 files changed
+29 -56

No files matched your search

+24 -10
View File
@@ -231,16 +231,30 @@ namespace VocaluxeLib.Menu
#endregion public
#region internal
private static SRectF _GetDrawRect()
public override float X
{
SRectF rect = CBase.Settings.GetRenderRect();
rect.Z = CBase.Settings.GetZFar() / 4;
return rect;
get { return 0; }
}
public override float Y
{
get { return 0; }
}
public override float Z
{
get { return CBase.Settings.GetZFar() / 4; }
}
public override float W
{
get { return CBase.Settings.GetRenderW(); }
}
public override float H
{
get { return CBase.Settings.GetRenderH(); }
}
private void _DrawColor()
{
CBase.Drawing.DrawRect(Color, _GetDrawRect());
CBase.Drawing.DrawRect(Color, Rect);
}
private bool _DrawTexture()
@@ -248,7 +262,7 @@ namespace VocaluxeLib.Menu
CTextureRef texture = CBase.Themes.GetSkinTexture(_Theme.Skin, _PartyModeID);
if (texture != null)
{
CBase.Drawing.DrawTexture(texture, _GetDrawRect(), EAspect.Crop);
CBase.Drawing.DrawTexture(texture, Rect, EAspect.Crop);
return true;
}
return false;
@@ -278,7 +292,7 @@ namespace VocaluxeLib.Menu
if (texture == null)
return false;
CBase.Drawing.DrawTexture(texture, _GetDrawRect(), EAspect.Crop);
CBase.Drawing.DrawTexture(texture, Rect, EAspect.Crop);
if (_SlideShowTimer.ElapsedMilliseconds >= CBase.Settings.GetSlideShowImageTime())
{
@@ -293,7 +307,7 @@ namespace VocaluxeLib.Menu
{
SColorF color = texture.Color;
color.A = (_SlideShowTimer.ElapsedMilliseconds - CBase.Settings.GetSlideShowImageTime()) / CBase.Settings.GetSlideShowFadeTime();
CBase.Drawing.DrawTexture(texture, _GetDrawRect(), EAspect.Crop, color);
CBase.Drawing.DrawTexture(texture, Rect, EAspect.Crop, color);
}
}
@@ -307,7 +321,7 @@ namespace VocaluxeLib.Menu
CBase.Video.GetFrame(_VideoStream, _VideoStream.VideoTime);
if (_VideoStream.Texture != null)
{
CBase.Drawing.DrawTexture(_VideoStream.Texture, _GetDrawRect(), EAspect.Crop);
CBase.Drawing.DrawTexture(_VideoStream.Texture, Rect, EAspect.Crop);
return true;
}
return false;
@@ -318,7 +332,7 @@ namespace VocaluxeLib.Menu
CTextureRef videoTexture = CBase.BackgroundMusic.GetVideoTexture();
if (videoTexture != null)
{
CBase.Drawing.DrawTexture(videoTexture, _GetDrawRect(), EAspect.Crop);
CBase.Drawing.DrawTexture(videoTexture, Rect, EAspect.Crop);
return true;
}
return false;
-21
View File
@@ -38,27 +38,6 @@ namespace VocaluxeLib.Menu
public readonly int Num;
public readonly EType Type;
public bool ThemeEditorOnly
{
get
{
return Type == EType.Background ||
Type == EType.NameSelection ||
Type == EType.Text ||
Type == EType.Static ||
Type == EType.SongMenu ||
Type == EType.Lyric ||
Type == EType.SingNote ||
Type == EType.Equalizer ||
Type == EType.Playlist;
}
}
public bool DrawAsForeground
{
get { return Type != EType.Background && Type != EType.SingNote; }
}
public CInteraction(int num, EType type)
{
Num = num;
+1 -1
View File
@@ -33,7 +33,7 @@ namespace VocaluxeLib.Menu
public virtual float Y { get; set; }
public virtual float Z { get; set; }
public virtual float W { get; set; }
public float H { get; set; }
public virtual float H { get; set; }
public virtual SRectF MaxRect
{