Draw background like all other elements
Few fixes
This commit is contained in:
1 parent
8c3a50c18f
commit
67d081d1c1
5 files changed
+29
-56
No files matched your search
@@ -149,9 +149,7 @@ namespace Vocaluxe.Screens
|
||||
_BuildStaticStrings(ref statics);
|
||||
_ThemeStatics = statics.ToArray();
|
||||
|
||||
var buttons = new List<string> {_ButtonCancel, _ButtonContinue, _ButtonSkip};
|
||||
_ThemeButtons = buttons.ToArray();
|
||||
|
||||
_ThemeButtons = new string[] {_ButtonCancel, _ButtonContinue, _ButtonSkip};
|
||||
_ThemeLyrics = new string[] {_LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop};
|
||||
_ThemeSingNotes = new string[] {_SingBars};
|
||||
|
||||
@@ -161,23 +159,6 @@ namespace Vocaluxe.Screens
|
||||
_TimerDuetText2 = new Stopwatch();
|
||||
}
|
||||
|
||||
public override void LoadTheme(string xmlPath)
|
||||
{
|
||||
base.LoadTheme(xmlPath);
|
||||
|
||||
_Statics[_StaticTimeLine].Visible = false;
|
||||
_Statics[_StaticTimeLineExpandedNormal].Visible = false;
|
||||
_Statics[_StaticTimeLineExpandedHighlighted].Visible = false;
|
||||
_Statics[_StaticPauseBG].Visible = false;
|
||||
_Texts[_TextPause].Visible = false;
|
||||
|
||||
_Statics[_StaticPauseBG].Visible = false;
|
||||
_Texts[_TextPause].Visible = false;
|
||||
|
||||
_Buttons[_ButtonCancel].Visible = false;
|
||||
_Buttons[_ButtonContinue].Visible = false;
|
||||
}
|
||||
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
{
|
||||
base.HandleInput(keyEvent);
|
||||
@@ -189,13 +170,13 @@ namespace Vocaluxe.Screens
|
||||
case Keys.Escape:
|
||||
_TogglePause();
|
||||
if (_Pause)
|
||||
_SetInteractionToButton(_Buttons[_ButtonCancel]);
|
||||
_SelectElement(_Buttons[_ButtonCancel]);
|
||||
break;
|
||||
|
||||
case Keys.P:
|
||||
_TogglePause();
|
||||
if (_Pause)
|
||||
_SetInteractionToButton(_Buttons[_ButtonContinue]);
|
||||
_SelectElement(_Buttons[_ButtonContinue]);
|
||||
break;
|
||||
|
||||
case Keys.T:
|
||||
@@ -297,7 +278,7 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
_TogglePause();
|
||||
if (_Pause)
|
||||
_SetInteractionToButton(_Buttons[_ButtonContinue]);
|
||||
_SelectElement(_Buttons[_ButtonContinue]);
|
||||
}
|
||||
|
||||
if (mouseEvent.LB && _IsMouseOverCurSelection(mouseEvent) && _Pause)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace VocaluxeLib
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user