Introduce example for a more flexible deserialization
Also make the CoverGenerator themes serializeable Rest is automatic reformatting.
This commit is contained in:
1 parent
467b619f0a
commit
6ebbf7df6f
33 files changed
+428
-397
No files matched your search
@@ -21,6 +21,7 @@ using System.Xml.Serialization;
|
||||
using System.Diagnostics;
|
||||
using System.Collections.Generic;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
@@ -36,16 +37,11 @@ namespace VocaluxeLib.Menu
|
||||
[XmlType("Background")]
|
||||
public struct SThemeBackground
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlElement("Type")]
|
||||
public EBackgroundTypes Type;
|
||||
[XmlArray]
|
||||
public List<string> SlideShowTextures;
|
||||
[XmlElement("Video")]
|
||||
public string VideoName;
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
[XmlElement("Type")] public EBackgroundTypes Type;
|
||||
[XmlArray] public List<string> SlideShowTextures;
|
||||
[XmlElement("Video")] public string VideoName;
|
||||
[XmlElement("Skin")] public string TextureName;
|
||||
public SThemeColor Color;
|
||||
}
|
||||
|
||||
|
||||
+10
-19
@@ -19,33 +19,25 @@ using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
[XmlType("Button")]
|
||||
public struct SThemeButton
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlElement("SkinSelected")]
|
||||
public string SelTextureName;
|
||||
[XmlElement("Skin")] public string TextureName;
|
||||
[XmlElement("SkinSelected")] public string SelTextureName;
|
||||
public SRectF Rect;
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("SelColor")]
|
||||
public SThemeColor SelColor;
|
||||
[XmlElement("Text")]
|
||||
public SThemeText Text;
|
||||
[XmlElement("SText")]
|
||||
public SThemeText SText;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
[XmlElement("SelColor")] public SThemeColor SelColor;
|
||||
[XmlElement("Text")] public SThemeText Text;
|
||||
[XmlElement("SText")] public SThemeText SText;
|
||||
public bool STextSpecified;
|
||||
[XmlElement("Reflection")]
|
||||
public SReflection Reflection;
|
||||
[XmlElement("SelReflection")]
|
||||
public SReflection SelReflection;
|
||||
[XmlElement("Reflection")] public SReflection Reflection;
|
||||
[XmlElement("SelReflection")] public SReflection SelReflection;
|
||||
}
|
||||
|
||||
public class CButton : IMenuElement
|
||||
@@ -257,7 +249,6 @@ namespace VocaluxeLib.Menu
|
||||
return _ThemeLoaded;
|
||||
}
|
||||
|
||||
|
||||
public void Draw(bool forceDraw = false)
|
||||
{
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme && !forceDraw)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
@@ -29,30 +30,20 @@ namespace VocaluxeLib.Menu
|
||||
[XmlType("Equalizer")]
|
||||
public struct SThemeEqualizer
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlElement("Skin")] public string TextureName;
|
||||
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
[XmlElement("Rect")] public SRectF Rect;
|
||||
|
||||
[XmlElement("NumBars")]
|
||||
public int NumBars;
|
||||
[XmlElement("Space")]
|
||||
public float Space;
|
||||
[XmlElement("Style")]
|
||||
public EEqualizerStyle Style;
|
||||
[XmlElement("DrawNegative")]
|
||||
public EOffOn DrawNegative;
|
||||
[XmlElement("NumBars")] public int NumBars;
|
||||
[XmlElement("Space")] public float Space;
|
||||
[XmlElement("Style")] public EEqualizerStyle Style;
|
||||
[XmlElement("DrawNegative")] public EOffOn DrawNegative;
|
||||
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("MaxColor")]
|
||||
public SThemeColor MaxColor;
|
||||
[XmlElement("Reflection")]
|
||||
public SReflection Reflection;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
[XmlElement("MaxColor")] public SThemeColor MaxColor;
|
||||
[XmlElement("Reflection")] public SReflection Reflection;
|
||||
}
|
||||
|
||||
public class CEqualizer : IMenuElement
|
||||
@@ -273,7 +264,7 @@ namespace VocaluxeLib.Menu
|
||||
Rect = _Theme.Rect;
|
||||
Space = _Theme.Space;
|
||||
Reflection = _Theme.Reflection.Enabled;
|
||||
if(Reflection)
|
||||
if (Reflection)
|
||||
{
|
||||
ReflectionHeight = _Theme.Reflection.Height;
|
||||
ReflectionSpace = _Theme.Reflection.Space;
|
||||
|
||||
@@ -19,22 +19,19 @@ using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
[XmlType("Lyric")]
|
||||
public struct SThemeLyrics
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
[XmlElement("Rect")] public SRectF Rect;
|
||||
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("SColor")]
|
||||
public SThemeColor SColor;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
[XmlElement("SColor")] public SThemeColor SColor;
|
||||
}
|
||||
|
||||
public class CLyric : IMenuElement
|
||||
@@ -192,7 +189,7 @@ namespace VocaluxeLib.Menu
|
||||
private void _SetText(CSongNote note)
|
||||
{
|
||||
_Text.Text = note.Text;
|
||||
_Text.Font.Style = (note.Type == ENoteType.Freestyle)? EStyle.BoldItalic:EStyle.Bold;
|
||||
_Text.Font.Style = (note.Type == ENoteType.Freestyle) ? EStyle.BoldItalic : EStyle.Bold;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
@@ -338,7 +335,7 @@ namespace VocaluxeLib.Menu
|
||||
float tz = _Text.Z;
|
||||
|
||||
SRectF normalRect = _Text.Rect;
|
||||
_Text.Font.Height *= 1f+ p * 0.4f;
|
||||
_Text.Font.Height *= 1f + p * 0.4f;
|
||||
_Text.X -= (_Text.Rect.W - normalRect.W) / 2f;
|
||||
_Text.Y -= (_Text.Rect.H - normalRect.H) / 2f;
|
||||
_Text.Z -= 0.1f;
|
||||
|
||||
@@ -25,6 +25,7 @@ using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu.SingNotes;
|
||||
using VocaluxeLib.Menu.SongMenu;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
|
||||
@@ -22,56 +22,39 @@ using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Profile;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
[XmlType("NameSelection")]
|
||||
public struct SThemeNameSelection
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
[XmlElement("SkinEmptyTile")]
|
||||
public string TextureEmptyTileName;
|
||||
[XmlElement("ColorEmptyTile")]
|
||||
public SThemeColor ColorEmptyTile;
|
||||
[XmlElement("SkinTileSelected")]
|
||||
public string TextureTileSelectedName;
|
||||
[XmlElement("Tiles")]
|
||||
public SThemeNameSelectionTiles Tiles;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
[XmlElement("Rect")] public SRectF Rect;
|
||||
[XmlElement("SkinEmptyTile")] public string TextureEmptyTileName;
|
||||
[XmlElement("ColorEmptyTile")] public SThemeColor ColorEmptyTile;
|
||||
[XmlElement("SkinTileSelected")] public string TextureTileSelectedName;
|
||||
[XmlElement("Tiles")] public SThemeNameSelectionTiles Tiles;
|
||||
}
|
||||
|
||||
public struct SThemeNameSelectionTiles
|
||||
{
|
||||
[XmlElement("W")]
|
||||
public int W;
|
||||
[XmlElement("H")]
|
||||
public int H;
|
||||
[XmlElement("NumW")]
|
||||
public int NumW;
|
||||
[XmlElement("NumH")]
|
||||
public int NumH;
|
||||
[XmlElement("SpaceW")]
|
||||
public float SpaceW;
|
||||
[XmlElement("SpaceH")]
|
||||
public float SpaceH;
|
||||
[XmlElement("Name")]
|
||||
public SThemeNameSelectionName Name;
|
||||
[XmlElement("W")] public int W;
|
||||
[XmlElement("H")] public int H;
|
||||
[XmlElement("NumW")] public int NumW;
|
||||
[XmlElement("NumH")] public int NumH;
|
||||
[XmlElement("SpaceW")] public float SpaceW;
|
||||
[XmlElement("SpaceH")] public float SpaceH;
|
||||
[XmlElement("Name")] public SThemeNameSelectionName Name;
|
||||
}
|
||||
|
||||
public struct SThemeNameSelectionName
|
||||
{
|
||||
[XmlElement("Space")]
|
||||
public float Space;
|
||||
[XmlElement("H")]
|
||||
public float Height;
|
||||
[XmlElement("Font")]
|
||||
public string Font;
|
||||
[XmlElement("Style")]
|
||||
public EStyle Style;
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("Space")] public float Space;
|
||||
[XmlElement("H")] public float Height;
|
||||
[XmlElement("Font")] public string Font;
|
||||
[XmlElement("Style")] public EStyle Style;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
}
|
||||
|
||||
public class CNameSelection : IMenuElement
|
||||
@@ -119,7 +102,6 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public SColorF ColorEmptyTile;
|
||||
|
||||
|
||||
public int Offset;
|
||||
private int _ActualSelection = -1;
|
||||
public int Selection = -1;
|
||||
@@ -517,9 +499,11 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
for (int j = 0; j < _Theme.Tiles.NumW; j++)
|
||||
{
|
||||
var rect = new SRectF(Rect.X + j * (_Theme.Tiles.W + _Theme.Tiles.SpaceW), Rect.Y + i * (_Theme.Tiles.H + _Theme.Tiles.SpaceH), _Theme.Tiles.W, _Theme.Tiles.H, Rect.Z);
|
||||
var rect = new SRectF(Rect.X + j * (_Theme.Tiles.W + _Theme.Tiles.SpaceW), Rect.Y + i * (_Theme.Tiles.H + _Theme.Tiles.SpaceH), _Theme.Tiles.W, _Theme.Tiles.H,
|
||||
Rect.Z);
|
||||
var tileStatic = new CStatic(_PartyModeID, _TextureEmptyTile, ColorEmptyTile, rect) {Aspect = EAspect.Crop};
|
||||
var tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.Tiles.Name.Space, rect.Z, _Theme.Tiles.Name.Height, rect.W, EAlignment.Center, _Theme.Tiles.Name.Style,
|
||||
var tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.Tiles.Name.Space, rect.Z, _Theme.Tiles.Name.Height, rect.W, EAlignment.Center,
|
||||
_Theme.Tiles.Name.Style,
|
||||
_Theme.Tiles.Name.Font, _Theme.Tiles.Name.Color.Color, "");
|
||||
_Tiles.Add(new CTile(tileStatic, tileText, -1));
|
||||
}
|
||||
|
||||
@@ -21,27 +21,21 @@ using System.Diagnostics;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
[XmlType("ParticleEffect")]
|
||||
public struct SThemeParticleEffect
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("Type")]
|
||||
public EParticleType Type;
|
||||
[XmlElement("Size")]
|
||||
public float Size;
|
||||
[XmlElement("MaxNumber")]
|
||||
public int MaxNumber;
|
||||
[XmlElement("Skin")] public string TextureName;
|
||||
[XmlElement("Rect")] public SRectF Rect;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
[XmlElement("Type")] public EParticleType Type;
|
||||
[XmlElement("Size")] public float Size;
|
||||
[XmlElement("MaxNumber")] public int MaxNumber;
|
||||
}
|
||||
|
||||
public enum EParticleType
|
||||
@@ -159,8 +153,6 @@ namespace VocaluxeLib.Menu
|
||||
_MaxAge = maxage;
|
||||
_Rotation = (float)(CBase.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
public void Update()
|
||||
|
||||
@@ -21,6 +21,7 @@ using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
@@ -57,48 +58,31 @@ namespace VocaluxeLib.Menu
|
||||
[XmlType("Playlist")]
|
||||
public struct SThemePlaylist
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("Rect")]
|
||||
public SRectF Rect;
|
||||
[XmlElement("Rect")] public SRectF Rect;
|
||||
|
||||
[XmlElement("EntryHeight")]
|
||||
public float EntryHeight;
|
||||
[XmlElement("EntryHeight")] public float EntryHeight;
|
||||
|
||||
[XmlElement("SkinBackground")]
|
||||
public string TextureBackgroundName;
|
||||
[XmlElement("SkinBackgroundSelected")]
|
||||
public string SelTextureBackgroundName;
|
||||
[XmlElement("SkinBackground")] public string TextureBackgroundName;
|
||||
[XmlElement("SkinBackgroundSelected")] public string SelTextureBackgroundName;
|
||||
|
||||
[XmlElement("ColorBackground")]
|
||||
public SThemeColor ColorBackground;
|
||||
[XmlElement("SColorBackground")]
|
||||
public SThemeColor SelColorBackground;
|
||||
[XmlElement("ColorBackground")] public SThemeColor ColorBackground;
|
||||
[XmlElement("SColorBackground")] public SThemeColor SelColorBackground;
|
||||
|
||||
[XmlElement("Text1")]
|
||||
public SThemeText SText1;
|
||||
[XmlElement("Text1")] public SThemeText SText1;
|
||||
|
||||
[XmlElement("StaticCover")]
|
||||
public SThemeStatic SStaticCover;
|
||||
[XmlElement("StaticPlaylistHeader")]
|
||||
public SThemeStatic SStaticPlaylistHeader;
|
||||
[XmlElement("StaticPlaylistFooter")]
|
||||
public SThemeStatic SStaticPlaylistFooter;
|
||||
[XmlElement("StaticCover")] public SThemeStatic SStaticCover;
|
||||
[XmlElement("StaticPlaylistHeader")] public SThemeStatic SStaticPlaylistHeader;
|
||||
[XmlElement("StaticPlaylistFooter")] public SThemeStatic SStaticPlaylistFooter;
|
||||
|
||||
[XmlElement("ButtonPlaylistName")]
|
||||
public SThemeButton SButtonPlaylistName;
|
||||
[XmlElement("ButtonPlaylistClose")]
|
||||
public SThemeButton SButtonPlaylistClose;
|
||||
[XmlElement("ButtonPlaylistSave")]
|
||||
public SThemeButton SButtonPlaylistSave;
|
||||
[XmlElement("ButtonPlaylistDelete")]
|
||||
public SThemeButton SButtonPlaylistDelete;
|
||||
[XmlElement("ButtonPlaylistSing")]
|
||||
public SThemeButton SButtonPlaylistSing;
|
||||
[XmlElement("ButtonPlaylistName")] public SThemeButton SButtonPlaylistName;
|
||||
[XmlElement("ButtonPlaylistClose")] public SThemeButton SButtonPlaylistClose;
|
||||
[XmlElement("ButtonPlaylistSave")] public SThemeButton SButtonPlaylistSave;
|
||||
[XmlElement("ButtonPlaylistDelete")] public SThemeButton SButtonPlaylistDelete;
|
||||
[XmlElement("ButtonPlaylistSing")] public SThemeButton SButtonPlaylistSing;
|
||||
|
||||
[XmlElement("SelectSlideGameMode")]
|
||||
public SThemeSelectSlide SSelectSlideGameMode;
|
||||
[XmlElement("SelectSlideGameMode")] public SThemeSelectSlide SSelectSlideGameMode;
|
||||
}
|
||||
|
||||
public class CPlaylist : IMenuElement
|
||||
@@ -187,7 +171,7 @@ namespace VocaluxeLib.Menu
|
||||
public SColorF BackgroundSelColor;
|
||||
|
||||
public CButton ButtonPlaylistName;
|
||||
public CButton ButtonPlaylistClose;
|
||||
public CButton ButtonPlaylistClose;
|
||||
public CButton ButtonPlaylistSave;
|
||||
public CButton ButtonPlaylistDelete;
|
||||
public CButton ButtonPlaylistSing;
|
||||
@@ -353,7 +337,7 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= ButtonPlaylistSave.LoadTheme(item, "ButtonPlaylistSave", xmlReader, skinIndex);
|
||||
_ThemeLoaded &= ButtonPlaylistDelete.LoadTheme(item, "ButtonPlaylistDelete", xmlReader, skinIndex);
|
||||
|
||||
_ThemeLoaded &=SelectSlideGameMode.LoadTheme(item, "SelectSlideGameMode", xmlReader, skinIndex);
|
||||
_ThemeLoaded &= SelectSlideGameMode.LoadTheme(item, "SelectSlideGameMode", xmlReader, skinIndex);
|
||||
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/EntryHeight", ref _Theme.EntryHeight);
|
||||
if (_ThemeLoaded)
|
||||
@@ -366,11 +350,11 @@ namespace VocaluxeLib.Menu
|
||||
_Theme.SStaticCover = StaticCover.GetTheme();
|
||||
_Theme.SStaticPlaylistFooter = StaticPlaylistFooter.GetTheme();
|
||||
_Theme.SStaticPlaylistHeader = StaticPlaylistHeader.GetTheme();
|
||||
_Theme.SButtonPlaylistName =ButtonPlaylistName.GetTheme();
|
||||
_Theme.SButtonPlaylistSing =ButtonPlaylistSing.GetTheme();
|
||||
_Theme.SButtonPlaylistClose =ButtonPlaylistClose.GetTheme();
|
||||
_Theme.SButtonPlaylistSave =ButtonPlaylistSave.GetTheme();
|
||||
_Theme.SButtonPlaylistDelete =ButtonPlaylistDelete.GetTheme();
|
||||
_Theme.SButtonPlaylistName = ButtonPlaylistName.GetTheme();
|
||||
_Theme.SButtonPlaylistSing = ButtonPlaylistSing.GetTheme();
|
||||
_Theme.SButtonPlaylistClose = ButtonPlaylistClose.GetTheme();
|
||||
_Theme.SButtonPlaylistSave = ButtonPlaylistSave.GetTheme();
|
||||
_Theme.SButtonPlaylistDelete = ButtonPlaylistDelete.GetTheme();
|
||||
|
||||
LoadTextures();
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
@@ -33,12 +34,9 @@ namespace VocaluxeLib.Menu
|
||||
[XmlType("ScreenSetting")]
|
||||
public struct SScreenSetting
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlElement("Value")]
|
||||
public string Value;
|
||||
[XmlElement("Type")]
|
||||
public ESettingType Type;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
[XmlElement("Value")] public string Value;
|
||||
[XmlElement("Type")] public ESettingType Type;
|
||||
}
|
||||
|
||||
// ReSharper disable ClassNeverInstantiated.Global
|
||||
|
||||
@@ -20,6 +20,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
|
||||
@@ -19,16 +19,15 @@ using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
[XmlType("Static")]
|
||||
public struct SThemeStatic
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlElement("Skin")]
|
||||
public string TextureName;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
[XmlElement("Skin")] public string TextureName;
|
||||
public SThemeColor Color;
|
||||
public SRectF Rect;
|
||||
public SReflection Reflection;
|
||||
@@ -73,10 +72,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public EAspect Aspect = EAspect.Stretch;
|
||||
|
||||
public CStatic()
|
||||
{
|
||||
|
||||
}
|
||||
public CStatic() {}
|
||||
|
||||
public CStatic(int partyModeID)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#endregion
|
||||
|
||||
using System.Xml;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ using System.Diagnostics;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu.SingNotes
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
using System.Xml;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
|
||||
@@ -23,34 +23,26 @@ using System.Xml.Serialization;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
[XmlType("SongMenu")]
|
||||
public struct SThemeSongMenu
|
||||
{
|
||||
[XmlAttributeAttribute(AttributeName = "Name")]
|
||||
public string Name;
|
||||
[XmlAttribute(AttributeName = "Name")] public string Name;
|
||||
|
||||
[XmlElement("CoverBackground")]
|
||||
public string CoverBackgroundName;
|
||||
[XmlElement("CoverBigBackground")]
|
||||
public string CoverBigBackgroundName;
|
||||
[XmlElement("DuetIcon")]
|
||||
public string DuetIconName;
|
||||
[XmlElement("VideoIcon")]
|
||||
public string VideoIconName;
|
||||
[XmlElement("MedleyCalcIcon")]
|
||||
public string MedleyCalcIcon;
|
||||
[XmlElement("MedleyTagIcon")]
|
||||
public string MedleyTagIcon;
|
||||
[XmlElement("Color")]
|
||||
public SThemeColor Color;
|
||||
[XmlElement("CoverBackground")] public string CoverBackgroundName;
|
||||
[XmlElement("CoverBigBackground")] public string CoverBigBackgroundName;
|
||||
[XmlElement("DuetIcon")] public string DuetIconName;
|
||||
[XmlElement("VideoIcon")] public string VideoIconName;
|
||||
[XmlElement("MedleyCalcIcon")] public string MedleyCalcIcon;
|
||||
[XmlElement("MedleyTagIcon")] public string MedleyTagIcon;
|
||||
[XmlElement("Color")] public SThemeColor Color;
|
||||
|
||||
//public SThemeSongMenuBook songMenuBook;
|
||||
//public SThemeSongMenuDreidel songMenuDreidel;
|
||||
//public SThemeSongMenuList songMenuList;
|
||||
[XmlElement("SongMenuTileBoard")]
|
||||
public SThemeSongMenuTileBoard SongMenuTileBoard;
|
||||
|
||||
public SThemeSongMenu(SThemeSongMenu theme)
|
||||
@@ -69,65 +61,48 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
public struct SThemeSongMenuTileBoard
|
||||
{
|
||||
[XmlElement("NumW")]
|
||||
/// <summary>
|
||||
/// Number of tiles horizontal
|
||||
/// </summary>
|
||||
public int NumW;
|
||||
|
||||
[XmlElement("NumH")]
|
||||
/// <summary>
|
||||
/// Number of tiles vertical
|
||||
/// </summary>
|
||||
public int NumH;
|
||||
|
||||
[XmlElement("NumWsmall")]
|
||||
/// <summary>
|
||||
/// Number of tiles horizontal in small-modus
|
||||
/// </summary>
|
||||
public int NumWsmall;
|
||||
|
||||
[XmlElement("NumHsmall")]
|
||||
|
||||
/// <summary>
|
||||
/// Number of tiles vertical in small-modus
|
||||
/// </summary>
|
||||
public int NumHsmall;
|
||||
|
||||
[XmlElement("SpaceW")]
|
||||
/// <summary>
|
||||
/// Space between tiles horizontal
|
||||
/// </summary>
|
||||
public float SpaceW;
|
||||
|
||||
[XmlElement("SpaceH")]
|
||||
/// <summary>
|
||||
/// Space between tiles vertical
|
||||
/// </summary>
|
||||
public float SpaceH;
|
||||
|
||||
[XmlElement("TileRect")]
|
||||
public SRectF TileRect;
|
||||
[XmlElement("TileRectSmall")]
|
||||
public SRectF TileRectSmall;
|
||||
|
||||
[XmlElement("TextArtist")]
|
||||
public SThemeText TextArtist;
|
||||
[XmlElement("TextTitle")]
|
||||
public SThemeText TextTitle;
|
||||
[XmlElement("TextSongLength")]
|
||||
public SThemeText TextSongLength;
|
||||
|
||||
[XmlElement("StaticCoverBig")]
|
||||
public SThemeStatic StaticCoverBig;
|
||||
[XmlElement("StaticTextBG")]
|
||||
public SThemeStatic StaticTextBG;
|
||||
[XmlElement("StaticDuetIcon")]
|
||||
public SThemeStatic StaticDuetIcon;
|
||||
[XmlElement("StaticVideoIcon")]
|
||||
public SThemeStatic StaticVideoIcon;
|
||||
[XmlElement("StaticMedleyCalcIcon")]
|
||||
public SThemeStatic StaticMedleyCalcIcon;
|
||||
[XmlElement("StaticMedleyTagIcon")]
|
||||
public SThemeStatic StaticMedleyTagIcon;
|
||||
}
|
||||
|
||||
@@ -278,7 +253,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
return _ThemeLoaded;
|
||||
}
|
||||
|
||||
#endregion Theme
|
||||
|
||||
public virtual void Init()
|
||||
@@ -294,10 +268,10 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
|
||||
public virtual void OnShow() {}
|
||||
|
||||
|
||||
public virtual void OnHide()
|
||||
{
|
||||
if(CBase.Graphics.GetNextScreen() != EScreens.ScreenNames)
|
||||
if (CBase.Graphics.GetNextScreen() != EScreens.ScreenNames)
|
||||
_ResetPreview();
|
||||
}
|
||||
|
||||
@@ -373,7 +347,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_ColorInternal = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||
else
|
||||
_ColorInternal = _Theme.Color.Color;
|
||||
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -23,6 +23,7 @@ using System.Xml;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Xml;
|
||||
|
||||
namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user