Load complete theme-date with de-serialization.
This commit is contained in:
1 parent
4f8c482645
commit
c07441bc63
55 files changed
+19978
-21762
No files matched your search
@@ -377,71 +377,6 @@ namespace VocaluxeLib.Menu
|
||||
return _ThemeLoaded;
|
||||
}
|
||||
|
||||
public bool SaveTheme(XmlWriter writer)
|
||||
{
|
||||
if (_ThemeLoaded)
|
||||
{
|
||||
writer.WriteStartElement(_Theme.Name);
|
||||
|
||||
writer.WriteComment("<X>, <Y>, <Z>, <W>, <H>: Playlist position, width and height");
|
||||
writer.WriteElementString("X", Rect.X.ToString("#0"));
|
||||
writer.WriteElementString("Y", Rect.Y.ToString("#0"));
|
||||
writer.WriteElementString("Z", Rect.Z.ToString("#0.00"));
|
||||
writer.WriteElementString("W", Rect.W.ToString("#0"));
|
||||
writer.WriteElementString("H", Rect.H.ToString("#0"));
|
||||
|
||||
writer.WriteElementString("EntryHeight", _Theme.EntryHeight.ToString("#0.00"));
|
||||
|
||||
writer.WriteComment("<SkinBackground>: Texture name");
|
||||
writer.WriteElementString("SkinBackground", _Theme.TextureBackgroundName);
|
||||
|
||||
writer.WriteComment("<SkinBackgroundSelected>: Texture name for selected playlist-entry");
|
||||
writer.WriteElementString("SkinBackgroundSelected", _Theme.SelTextureBackgroundName);
|
||||
|
||||
writer.WriteComment("<ColorBackground>: Button color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <BackgroundR>, <BackgroundG>, <BackgroundB>, <BackgroundA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.ColorBackground.Name))
|
||||
writer.WriteElementString("ColorBackground", _Theme.ColorBackground.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("BackgroundR", BackgroundColor.R.ToString("#0.00"));
|
||||
writer.WriteElementString("BackgroundG", BackgroundColor.G.ToString("#0.00"));
|
||||
writer.WriteElementString("BackgroundB", BackgroundColor.B.ToString("#0.00"));
|
||||
writer.WriteElementString("BackgroundA", BackgroundColor.A.ToString("#0.00"));
|
||||
}
|
||||
|
||||
writer.WriteComment("<SColorBackground>: Selected paylist-entry color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SBackgroundR>, <SBackgroundG>, <SBackgroundB>, <SBackgroundA> (lower priority)");
|
||||
if (!String.IsNullOrEmpty(_Theme.SelColorBackground.Name))
|
||||
writer.WriteElementString("SColorBackground", _Theme.SelColorBackground.Name);
|
||||
else
|
||||
{
|
||||
writer.WriteElementString("SBackgroundR", BackgroundSelColor.R.ToString("#0.00"));
|
||||
writer.WriteElementString("SBackgroundG", BackgroundSelColor.G.ToString("#0.00"));
|
||||
writer.WriteElementString("SBackgroundB", BackgroundSelColor.B.ToString("#0.00"));
|
||||
writer.WriteElementString("SBackgroundA", BackgroundSelColor.A.ToString("#0.00"));
|
||||
}
|
||||
|
||||
writer.WriteComment("Positions of <TextPart1>, <TextPart2>, <TextPart3>, <StaticCover> and <SelectSlideGameMode> are relative to playlist-entry!");
|
||||
writer.WriteComment("Use placeholders for Text of <TextPart1>, <TextPart2> and <TextPart3>: %t, %a, %l");
|
||||
Text1.SaveTheme(writer);
|
||||
StaticPlaylistFooter.SaveTheme(writer);
|
||||
StaticPlaylistHeader.SaveTheme(writer);
|
||||
StaticCover.SaveTheme(writer);
|
||||
SelectSlideGameMode.SaveTheme(writer);
|
||||
ButtonPlaylistName.SaveTheme(writer);
|
||||
ButtonPlaylistClose.SaveTheme(writer);
|
||||
ButtonPlaylistDelete.SaveTheme(writer);
|
||||
ButtonPlaylistSave.SaveTheme(writer);
|
||||
ButtonPlaylistSing.SaveTheme(writer);
|
||||
|
||||
writer.WriteEndElement();
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Draw(bool forceDraw = false)
|
||||
{
|
||||
if (_PlaylistElements.Count <= 0)
|
||||
|
||||
Reference in new issue
Block a user