Merge branch 'Better_Graphics_Handling' into develop
Conflicts: Vocaluxe/Base/Fonts/CFontStyle.cs
This commit is contained in:
commit
2e25bf6610
21 files changed
+338
-510
No files matched your search
@@ -221,7 +221,9 @@ namespace VocaluxeLib.Menu
|
||||
#region internal
|
||||
private static SRectF _GetDrawRect()
|
||||
{
|
||||
return new SRectF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), CBase.Settings.GetZFar() / 4);
|
||||
SRectF rect = CBase.Settings.GetRenderRect();
|
||||
rect.Z = CBase.Settings.GetZFar() / 4;
|
||||
return rect;
|
||||
}
|
||||
|
||||
private void _DrawColor()
|
||||
|
||||
@@ -264,7 +264,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_Reflection)
|
||||
{
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, Color, _ReflectionSpace, _ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, _ReflectionSpace, _ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, _ReflectionHeight, _ReflectionSpace, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -278,7 +278,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_Reflection)
|
||||
{
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, _ReflectionSpace, _ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, Rect, _ReflectionSpace, _ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, _ReflectionHeight, _ReflectionSpace, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -292,7 +292,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_Reflection)
|
||||
{
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, _ReflectionSpace, _ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SelColor, Rect, _ReflectionSpace, _ReflectionHeight);
|
||||
_SelText.DrawRelative(Rect.X, Rect.Y, _ReflectionHeight, _ReflectionSpace, Rect.H);
|
||||
}
|
||||
else
|
||||
|
||||
+18
-31
@@ -34,37 +34,24 @@ namespace VocaluxeLib.Menu
|
||||
public string ScreenName;
|
||||
public int ScreenVersion;
|
||||
}
|
||||
|
||||
[XmlType("Screen")]
|
||||
public struct STheme
|
||||
{
|
||||
[XmlElement("Informations")]
|
||||
public SScreenInformation ScreenInformation;
|
||||
[XmlArray("Backgrounds")]
|
||||
public List<SThemeBackground> Backgrounds;
|
||||
[XmlArray("Statics")]
|
||||
public List<SThemeStatic> Statics;
|
||||
[XmlArray("Texts")]
|
||||
public List<SThemeText> Texts;
|
||||
[XmlArray("Buttons")]
|
||||
public List<SThemeButton> Buttons;
|
||||
[XmlArray("SongMenus")]
|
||||
public List<SThemeSongMenu> SongMenus;
|
||||
[XmlArray("Lyrics")]
|
||||
public List<SThemeLyrics> Lyrics;
|
||||
[XmlArray("SelectSlides")]
|
||||
public List<SThemeSelectSlide> SelectSlides;
|
||||
[XmlArray("SingNotes")]
|
||||
public List<SThemeSingBar> SingNotes;
|
||||
[XmlArray("NameSelections")]
|
||||
public List<SThemeNameSelection> NameSelections;
|
||||
[XmlArray("Equalizers")]
|
||||
public List<SThemeEqualizer> Equalizers;
|
||||
[XmlArray("Playlists")]
|
||||
public List<SThemePlaylist> Playlists;
|
||||
[XmlArray("ParticleEffects")]
|
||||
public List<SThemeParticleEffect> ParticleEffects;
|
||||
[XmlArray("ScreenSettings")]
|
||||
public List<SScreenSetting> ScreenSettings;
|
||||
[XmlElement("Informations")] public SScreenInformation ScreenInformation;
|
||||
[XmlArray("Backgrounds")] public List<SThemeBackground> Backgrounds;
|
||||
[XmlArray("Statics")] public List<SThemeStatic> Statics;
|
||||
[XmlArray("Texts")] public List<SThemeText> Texts;
|
||||
[XmlArray("Buttons")] public List<SThemeButton> Buttons;
|
||||
[XmlArray("SongMenus")] public List<SThemeSongMenu> SongMenus;
|
||||
[XmlArray("Lyrics")] public List<SThemeLyrics> Lyrics;
|
||||
[XmlArray("SelectSlides")] public List<SThemeSelectSlide> SelectSlides;
|
||||
[XmlArray("SingNotes")] public List<SThemeSingBar> SingNotes;
|
||||
[XmlArray("NameSelections")] public List<SThemeNameSelection> NameSelections;
|
||||
[XmlArray("Equalizers")] public List<SThemeEqualizer> Equalizers;
|
||||
[XmlArray("Playlists")] public List<SThemePlaylist> Playlists;
|
||||
[XmlArray("ParticleEffects")] public List<SThemeParticleEffect> ParticleEffects;
|
||||
[XmlArray("ScreenSettings")] public List<SScreenSetting> ScreenSettings;
|
||||
}
|
||||
|
||||
struct SZSort
|
||||
@@ -158,7 +145,7 @@ namespace VocaluxeLib.Menu
|
||||
_MouseDY = 0;
|
||||
|
||||
_Active = false;
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), 0f);
|
||||
_ScreenArea = CBase.Settings.GetRenderRect();
|
||||
|
||||
_ThemeBackgrounds = null;
|
||||
_ThemeStatics = null;
|
||||
@@ -250,7 +237,7 @@ namespace VocaluxeLib.Menu
|
||||
foreach (SThemeParticleEffect pe in Theme.ParticleEffects)
|
||||
_AddParticleEffect(new CParticleEffect(pe, _PartyModeID), pe.Name);
|
||||
|
||||
foreach(SThemePlaylist pl in Theme.Playlists)
|
||||
foreach (SThemePlaylist pl in Theme.Playlists)
|
||||
_AddPlaylist(new CPlaylist(pl, _PartyModeID), pl.Name);
|
||||
|
||||
foreach (SScreenSetting ss in Theme.ScreenSettings)
|
||||
@@ -269,7 +256,7 @@ namespace VocaluxeLib.Menu
|
||||
_AddStatic(new CStatic(st, _PartyModeID), st.Name);
|
||||
|
||||
foreach (SThemeText te in Theme.Texts)
|
||||
_AddText(new CText(te, _PartyModeID), te.Name);
|
||||
_AddText(new CText(te, _PartyModeID), te.Name);
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace VocaluxeLib.Menu
|
||||
_MouseDY = 0;
|
||||
|
||||
Active = false;
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), 0f);
|
||||
_ScreenArea = CBase.Settings.GetRenderRect();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
|
||||
@@ -176,19 +176,17 @@ namespace VocaluxeLib.Menu
|
||||
public void Draw(EAspect aspect, float scale = 1f, float zModify = 0f, bool forceDraw = false)
|
||||
{
|
||||
CTextureRef texture = Texture;
|
||||
SRectF rect = Rect.Scale(scale);
|
||||
rect.Z += zModify;
|
||||
if (texture != null)
|
||||
rect = CHelper.FitInBounds(rect, texture.OrigAspect, aspect);
|
||||
|
||||
SRectF bounds = Rect.Scale(scale);
|
||||
bounds.Z += zModify;
|
||||
SRectF rect = texture == null ? bounds : CHelper.FitInBounds(bounds, 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);
|
||||
CBase.Drawing.DrawTexture(texture, rect, color, bounds);
|
||||
if (Reflection)
|
||||
CBase.Drawing.DrawTextureReflection(texture, rect, color, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight);
|
||||
}
|
||||
else
|
||||
CBase.Drawing.DrawRect(color, rect);
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Tiles.Add(tile);
|
||||
}
|
||||
}
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), Rect.Z);
|
||||
_ScrollRect = CBase.Settings.GetRenderRect();
|
||||
}
|
||||
|
||||
public override void Update(SScreenSongOptions songOptions)
|
||||
@@ -501,9 +501,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (vidtex.Color.A < 1)
|
||||
_CoverBig.Draw(EAspect.Crop);
|
||||
SRectF rect = CHelper.FitInBounds(_CoverBig.Rect, vidtex.OrigAspect, EAspect.Crop);
|
||||
|
||||
CBase.Drawing.DrawTexture(vidtex, rect);
|
||||
CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
CBase.Drawing.DrawTexture(vidtex, rect, vidtex.Color, _CoverBig.Rect);
|
||||
CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _CoverBig.Rect, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
}
|
||||
else
|
||||
_CoverBig.Draw(EAspect.Crop);
|
||||
|
||||
Reference in new issue
Block a user