Factor out CSkin class

Replace usages of GetColor and remove GetColor(..., skinIndex,...)
This commit is contained in:
Flamefire committed 2014-10-05 13:36:11 +02:00
1 parent 1c884f3acb
commit 89e528c2a6
22 files changed
+584 -861

No files matched your search

+19 -10
View File
@@ -54,6 +54,9 @@ namespace VocaluxeLib.Menu
private readonly Stopwatch _SlideShowTimer = new Stopwatch();
private readonly List<CTextureRef> _SlideShowTextures = new List<CTextureRef>();
private int _VideoStream = -1;
private CTextureRef _VidTex;
public SColorF Color;
public bool ThemeLoaded
{
@@ -97,7 +100,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= vid || tex || _Theme.Type == EBackgroundTypes.None;
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
bool success = true;
@@ -133,14 +136,14 @@ namespace VocaluxeLib.Menu
public void Resume()
{
if (_Theme.Type == EBackgroundTypes.Video && !String.IsNullOrEmpty(_Theme.VideoName) && CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
CBase.Theme.SkinVideoResume(_Theme.VideoName, _PartyModeID);
if (_VideoStream != -1)
CBase.Video.Resume(_VideoStream);
}
public void Pause()
{
if (!String.IsNullOrEmpty(_Theme.VideoName))
CBase.Theme.SkinVideoPause(_Theme.VideoName, _PartyModeID);
if (_VideoStream != -1)
CBase.Video.Pause(_VideoStream);
}
public void Draw()
@@ -173,15 +176,20 @@ namespace VocaluxeLib.Menu
public void UnloadTextures()
{
_SlideShowTextures.Clear();
CBase.Video.Close(_VideoStream);
_VideoStream = -1;
CBase.Drawing.RemoveTexture(ref _VidTex);
}
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.Color.Name))
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
_Theme.Color.Get(_PartyModeID, out Color);
foreach (string s in _Theme.SlideShowTextures)
_SlideShowTextures.Add(CBase.Theme.GetSkinTexture(s, _PartyModeID));
if (_Theme.Type == EBackgroundTypes.Video)
_VideoStream = CBase.Theme.GetSkinVideo(_Theme.VideoName, _PartyModeID, true);
}
public void AddSlideShowTexture(string image)
@@ -291,10 +299,11 @@ namespace VocaluxeLib.Menu
private bool _DrawVideo()
{
CTextureRef videoTexture = CBase.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
if (videoTexture != null)
float time;
CBase.Video.GetFrame(_VideoStream, ref _VidTex, 0, out time);
if (_VidTex != null)
{
CBase.Drawing.DrawTexture(videoTexture, _GetDrawRect(), EAspect.Crop);
CBase.Drawing.DrawTexture(_VidTex, _GetDrawRect(), EAspect.Crop);
return true;
}
return false;
+13 -30
View File
@@ -25,27 +25,18 @@ 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
@@ -185,7 +176,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
@@ -195,7 +186,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/SColor", out _Theme.SelColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColor.Name, skinIndex, out SelColor);
_ThemeLoaded &= _Theme.SelColor.Get(_PartyModeID, out SelColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref SelColor.R);
@@ -257,7 +248,6 @@ namespace VocaluxeLib.Menu
return _ThemeLoaded;
}
public void Draw(bool forceDraw = false)
{
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme && !forceDraw)
@@ -330,15 +320,8 @@ namespace VocaluxeLib.Menu
_SelText.LoadTextures();
}
if (!String.IsNullOrEmpty(_Theme.Color.Name))
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
Color = _Theme.Color.Color;
if (!String.IsNullOrEmpty(_Theme.SelColor.Name))
SelColor = CBase.Theme.GetColor(_Theme.SelColor.Name, _PartyModeID);
else
SelColor = _Theme.SelColor.Color;
_Theme.Color.Get(_PartyModeID, out Color);
_Theme.SelColor.Get(_PartyModeID, out SelColor);
Rect = _Theme.Rect;
+15 -32
View File
@@ -29,30 +29,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
@@ -140,7 +130,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetEnumValue(item + "/DrawNegative", ref _Theme.DrawNegative);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
@@ -150,7 +140,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/MaxColor", out _Theme.MaxColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.MaxColor.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.MaxColor.Get(_PartyModeID, out MaxColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/MaxR", ref MaxColor.R);
@@ -260,20 +250,13 @@ namespace VocaluxeLib.Menu
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.Color.Name))
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
Color = _Theme.Color.Color;
if (!String.IsNullOrEmpty(_Theme.MaxColor.Name))
MaxColor = CBase.Theme.GetColor(_Theme.MaxColor.Name, _PartyModeID);
else
MaxColor = _Theme.MaxColor.Color;
_Theme.Color.Get(_PartyModeID, out Color);
_Theme.MaxColor.Get(_PartyModeID, out MaxColor);
Rect = _Theme.Rect;
Space = _Theme.Space;
Reflection = _Theme.Reflection.Enabled;
if(Reflection)
if (Reflection)
{
ReflectionHeight = _Theme.Reflection.Height;
ReflectionSpace = _Theme.Reflection.Space;
+8 -20
View File
@@ -16,7 +16,6 @@
#endregion
using System;
using System.Xml;
using System.Xml.Serialization;
using VocaluxeLib.Songs;
@@ -25,16 +24,12 @@ 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
@@ -146,7 +141,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref _H);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out _Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out _Color);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref _Color.R);
@@ -156,7 +151,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColor.Name, skinIndex, out _ColorProcessed);
_ThemeLoaded &= _Theme.SColor.Get(_PartyModeID, out _ColorProcessed);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref _ColorProcessed.R);
@@ -454,15 +449,8 @@ namespace VocaluxeLib.Menu
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.Color.Name))
_Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
_Color = _Theme.Color.Color;
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
_ColorProcessed = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
else
_ColorProcessed = _Theme.SColor.Color;
_Theme.Color.Get(_PartyModeID, out _Color);
_Theme.SColor.Get(_PartyModeID, out _ColorProcessed);
Rect = _Theme.Rect;
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", _Color, String.Empty);
+35 -56
View File
@@ -28,50 +28,32 @@ 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
@@ -117,8 +99,8 @@ namespace VocaluxeLib.Menu
get { return _TextureEmptyTile; }
}
public SColorF ColorEmptyTile;
private SColorF _ColorEmptyTile;
private SColorF _ColorNameTile;
public int Offset;
private int _ActualSelection = -1;
@@ -185,13 +167,13 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinEmptyTile", out _Theme.TextureEmptyTileName, String.Empty);
if (xmlReader.GetValue(item + "/ColorEmptyTile", out _Theme.ColorEmptyTile.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorEmptyTile.Name, skinIndex, out ColorEmptyTile);
_ThemeLoaded &= _Theme.ColorEmptyTile.Get(_PartyModeID, out _ColorEmptyTile);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref ColorEmptyTile.R);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/G", ref ColorEmptyTile.G);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/B", ref ColorEmptyTile.B);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref ColorEmptyTile.A);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref _ColorEmptyTile.R);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/G", ref _ColorEmptyTile.G);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/B", ref _ColorEmptyTile.B);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref _ColorEmptyTile.A);
}
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinTileSelected", out _Theme.TextureTileSelectedName, String.Empty);
@@ -207,7 +189,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.GetValue(item + "/Tiles/Name/Font", out _Theme.Tiles.Name.Font, "Normal");
_ThemeLoaded &= xmlReader.TryGetEnumValue(item + "/Tiles/Name/Style", ref _Theme.Tiles.Name.Style);
if (xmlReader.GetValue(item + "/Tiles/Name/Color", out _Theme.Tiles.Name.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Tiles.Name.Color.Name, skinIndex, out _Theme.Tiles.Name.Color.Color);
_ThemeLoaded &= _Theme.Tiles.Name.Color.Get(_PartyModeID, out _ColorNameTile);
else
{
if (xmlReader.TryGetFloatValue(item + "/Tiles/Name/R", ref _Theme.Tiles.Name.Color.Color.R))
@@ -224,7 +206,7 @@ namespace VocaluxeLib.Menu
_Theme.Name = elementName;
_Theme.Rect = new SRectF(Rect);
_Theme.ColorEmptyTile.Color = new SColorF(ColorEmptyTile);
_Theme.ColorEmptyTile.Color = new SColorF(_ColorEmptyTile);
LoadTextures();
}
@@ -401,7 +383,7 @@ namespace VocaluxeLib.Menu
else
{
_Tiles[i].Avatar.Texture = _TextureEmptyTile;
_Tiles[i].Avatar.Color = ColorEmptyTile;
_Tiles[i].Avatar.Color = _ColorEmptyTile;
_Tiles[i].Name.Text = "";
_Tiles[i].ProfileID = -1;
}
@@ -449,13 +431,8 @@ namespace VocaluxeLib.Menu
_TextureEmptyTile = CBase.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
_TextureTileSelected = CBase.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
if (!String.IsNullOrEmpty(_Theme.ColorEmptyTile.Name))
ColorEmptyTile = CBase.Theme.GetColor(_Theme.ColorEmptyTile.Name, _PartyModeID);
else
ColorEmptyTile = _Theme.ColorEmptyTile.Color;
if (!String.IsNullOrEmpty(_Theme.Tiles.Name.Color.Name))
_Theme.Tiles.Name.Color.Color = CBase.Theme.GetColor(_Theme.Tiles.Name.Color.Name, _PartyModeID);
_Theme.ColorEmptyTile.Get(_PartyModeID, out _ColorEmptyTile);
_Theme.Tiles.Name.Color.Get(_PartyModeID, out _ColorNameTile);
Rect = _Theme.Rect;
}
@@ -517,9 +494,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 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 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,
_Theme.Tiles.Name.Font, _Theme.Tiles.Name.Color.Color, "");
_Tiles.Add(new CTile(tileStatic, tileText, -1));
}
+9 -21
View File
@@ -27,21 +27,14 @@ 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 +152,6 @@ namespace VocaluxeLib.Menu
_MaxAge = maxage;
_Rotation = (float)(CBase.Game.GetRandomDouble() * 360.0);
}
#endregion Constructors
public void Update()
@@ -413,7 +404,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
@@ -585,10 +576,7 @@ namespace VocaluxeLib.Menu
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.Color.Name))
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
Color = _Theme.Color.Color;
_Theme.Color.Get(_PartyModeID, out Color);
if (!String.IsNullOrEmpty(_Theme.TextureName))
Texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
+28 -53
View File
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using VocaluxeLib.Songs;
@@ -57,48 +56,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 +169,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;
@@ -323,7 +305,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref Rect.W);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
if (xmlReader.GetValue(item + "/ColorBackground", out _Theme.ColorBackground.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorBackground.Name, skinIndex, out BackgroundColor);
_ThemeLoaded &= _Theme.ColorBackground.Get(_PartyModeID, out BackgroundColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/BackgroundR", ref BackgroundColor.R);
@@ -332,7 +314,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/BackgroundA", ref BackgroundColor.A);
}
if (xmlReader.GetValue(item + "/SColorBackground", out _Theme.SelColorBackground.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorBackground.Name, skinIndex, out BackgroundSelColor);
_ThemeLoaded &= _Theme.SelColorBackground.Get(_PartyModeID, out BackgroundSelColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SBackgroundR", ref BackgroundSelColor.R);
@@ -353,7 +335,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 +348,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();
}
@@ -426,15 +408,8 @@ namespace VocaluxeLib.Menu
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.ColorBackground.Name))
BackgroundColor = CBase.Theme.GetColor(_Theme.ColorBackground.Name, _PartyModeID);
else
BackgroundColor = _Theme.ColorBackground.Color;
if (!String.IsNullOrEmpty(_Theme.SelColorBackground.Name))
BackgroundSelColor = CBase.Theme.GetColor(_Theme.SelColorBackground.Name, _PartyModeID);
else
BackgroundSelColor = _Theme.SelColorBackground.Color;
_Theme.ColorBackground.Get(_PartyModeID, out BackgroundColor);
_Theme.SelColorBackground.Get(_PartyModeID, out BackgroundSelColor);
Rect = _Theme.Rect;
+6 -7
View File
@@ -33,12 +33,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
@@ -138,7 +135,9 @@ namespace VocaluxeLib.Menu
private SColorF _GetColorValue(string value)
{
return CBase.Theme.GetColor(value, _PartyModeID);
SColorF color;
CBase.Theme.GetColor(value, _PartyModeID, out color);
return color;
}
#endregion Private
+14 -41
View File
@@ -292,7 +292,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
@@ -302,7 +302,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColor.Name, skinIndex, out SelColor);
_ThemeLoaded &= _Theme.SColor.Get(_PartyModeID, out SelColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref SelColor.R);
@@ -312,7 +312,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/HColor", out _Theme.HColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.HColor.Name, skinIndex, out HighlightColor);
_ThemeLoaded &= _Theme.HColor.Get(_PartyModeID, out HighlightColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/HR", ref HighlightColor.R);
@@ -334,7 +334,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightH", ref RectArrowRight.H);
if (xmlReader.GetValue(item + "/ArrowColor", out _Theme.ArrowColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowColor.Name, skinIndex, out ColorArrow);
_ThemeLoaded &= _Theme.ArrowColor.Get(_PartyModeID, out ColorArrow);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowR", ref ColorArrow.R);
@@ -344,7 +344,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/ArrowSColor", out _Theme.ArrowSColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowSColor.Name, skinIndex, out SelColorArrow);
_ThemeLoaded &= _Theme.ArrowSColor.Get(_PartyModeID, out SelColorArrow);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowSR", ref SelColorArrow.R);
@@ -354,7 +354,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/TextColor", out _Theme.TextColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextColor.Name, skinIndex, out TextColor);
_ThemeLoaded &= _Theme.TextColor.Get(_PartyModeID, out TextColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextR", ref TextColor.R);
@@ -364,7 +364,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/TextSColor", out _Theme.TextSColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextSColor.Name, skinIndex, out SelTextColor);
_ThemeLoaded &= _Theme.TextSColor.Get(_PartyModeID, out SelTextColor);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextSR", ref SelTextColor.R);
@@ -702,40 +702,13 @@ namespace VocaluxeLib.Menu
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.Color.Name))
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
Color = _Theme.Color.Color;
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
else
SelColor = _Theme.SColor.Color;
if (!String.IsNullOrEmpty(_Theme.HColor.Name))
HighlightColor = CBase.Theme.GetColor(_Theme.HColor.Name, _PartyModeID);
else
HighlightColor = _Theme.HColor.Color;
if (!String.IsNullOrEmpty(_Theme.ArrowColor.Name))
ColorArrow = CBase.Theme.GetColor(_Theme.ArrowColor.Name, _PartyModeID);
else
ColorArrow = _Theme.ArrowColor.Color;
if (!String.IsNullOrEmpty(_Theme.ArrowSColor.Name))
SelColorArrow = CBase.Theme.GetColor(_Theme.ArrowSColor.Name, _PartyModeID);
else
SelColorArrow = _Theme.ArrowSColor.Color;
if (!String.IsNullOrEmpty(_Theme.TextColor.Name))
TextColor = CBase.Theme.GetColor(_Theme.TextColor.Name, _PartyModeID);
else
TextColor = _Theme.TextColor.Color;
if (!String.IsNullOrEmpty(_Theme.TextSColor.Name))
SelTextColor = CBase.Theme.GetColor(_Theme.TextSColor.Name, _PartyModeID);
else
SelTextColor = _Theme.TextSColor.Color;
_Theme.Color.Get(_PartyModeID, out Color);
_Theme.SColor.Get(_PartyModeID, out SelColor);
_Theme.HColor.Get(_PartyModeID, out HighlightColor);
_Theme.ArrowColor.Get(_PartyModeID, out ColorArrow);
_Theme.ArrowSColor.Get(_PartyModeID, out SelColorArrow);
_Theme.TextColor.Get(_PartyModeID, out TextColor);
_Theme.TextSColor.Get(_PartyModeID, out SelTextColor);
Rect = _Theme.Rect;
RectArrowLeft = _Theme.RectArrowLeft;
+5 -13
View File
@@ -25,10 +25,8 @@ 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 +71,7 @@ namespace VocaluxeLib.Menu
public EAspect Aspect = EAspect.Stretch;
public CStatic()
{
}
public CStatic() {}
public CStatic(int partyModeID)
{
@@ -140,7 +135,7 @@ namespace VocaluxeLib.Menu
_Theme.Rect = new SRectF(Rect);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
@@ -204,10 +199,7 @@ namespace VocaluxeLib.Menu
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.Color.Name))
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
Color = _Theme.Color.Color;
_Theme.Color.Get(_PartyModeID, out Color);
Rect = new SRectF(_Theme.Rect);
Reflection = _Theme.Reflection.Enabled;
+15 -34
View File
@@ -25,31 +25,20 @@ namespace VocaluxeLib.Menu
[XmlType("Text")]
public struct SThemeText
{
[XmlAttributeAttribute(AttributeName = "Name")]
public string Name;
[XmlAttribute(AttributeName = "Name")] public string Name;
[XmlElement("X")]
public float X;
[XmlElement("Y")]
public float Y;
[XmlElement("Z")]
public float Z;
[XmlElement("H")]
public float Height;
[XmlElement("MaxW")]
public float MaxWidth;
[XmlElement("X")] public float X;
[XmlElement("Y")] public float Y;
[XmlElement("Z")] public float Z;
[XmlElement("H")] public float Height;
[XmlElement("MaxW")] public float MaxWidth;
public SThemeColor Color;
public SThemeColor SColor; //for Buttons
[XmlElement("Align")]
public EAlignment Align;
[XmlElement("ResizeAlign")]
public EHAlignment ResizeAlign;
[XmlElement("Style")]
public EStyle Style;
[XmlElement("Font")]
public string Font;
[XmlElement("Text")]
public string Text;
[XmlElement("Align")] public EAlignment Align;
[XmlElement("ResizeAlign")] public EHAlignment ResizeAlign;
[XmlElement("Style")] public EStyle Style;
[XmlElement("Font")] public string Font;
[XmlElement("Text")] public string Text;
public SReflection Reflection;
}
@@ -366,7 +355,7 @@ namespace VocaluxeLib.Menu
xmlReader.TryGetFloatValue(item + "/MaxW", ref _MaxWidth);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out Color);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
@@ -376,7 +365,7 @@ namespace VocaluxeLib.Menu
}
if (xmlReader.GetValue(item + "/SColor", out _Theme.SColor.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColor.Name, skinIndex, out SelColor);
_ThemeLoaded &= _Theme.SColor.Get(_PartyModeID, out SelColor);
else
{
if (xmlReader.TryGetFloatValue(item + "/SR", ref SelColor.R))
@@ -425,7 +414,6 @@ namespace VocaluxeLib.Menu
return _ThemeLoaded;
}
public void Draw(bool forceDraw = false)
{
if (!forceDraw && !Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme)
@@ -492,15 +480,8 @@ namespace VocaluxeLib.Menu
public void LoadTextures()
{
if (!String.IsNullOrEmpty(_Theme.Color.Name))
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
Color = new SColorF(_Theme.Color.Color);
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
else
SelColor = new SColorF(_Theme.SColor.Color);
_Theme.Color.Get(_PartyModeID, out Color);
_Theme.SColor.Get(_PartyModeID, out SelColor);
_X = _Theme.X;
_Y = _Theme.Y;
+31 -62
View File
@@ -29,29 +29,20 @@ 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;
[XmlElement("SongMenuTileBoard")] public SThemeSongMenuTileBoard SongMenuTileBoard;
public SThemeSongMenu(SThemeSongMenu theme)
{
@@ -69,66 +60,49 @@ namespace VocaluxeLib.Menu.SongMenu
public struct SThemeSongMenuTileBoard
{
[XmlElement("NumW")]
/// <summary>
[XmlElement("NumW")] /// <summary>
/// Number of tiles horizontal
/// </summary>
public int NumW;
[XmlElement("NumH")]
/// <summary>
[XmlElement("NumH")] /// <summary>
/// Number of tiles vertical
/// </summary>
public int NumH;
[XmlElement("NumWsmall")]
/// <summary>
[XmlElement("NumWsmall")] /// <summary>
/// Number of tiles horizontal in small-modus
/// </summary>
public int NumWsmall;
[XmlElement("NumHsmall")]
/// <summary>
[XmlElement("NumHsmall")] /// <summary>
/// Number of tiles vertical in small-modus
/// </summary>
public int NumHsmall;
[XmlElement("SpaceW")]
/// <summary>
[XmlElement("SpaceW")] /// <summary>
/// Space between tiles horizontal
/// </summary>
public float SpaceW;
[XmlElement("SpaceH")]
/// <summary>
[XmlElement("SpaceH")] /// <summary>
/// Space between tiles vertical
/// </summary>
public float SpaceH;
[XmlElement("TileRect")]
public SRectF TileRect;
[XmlElement("TileRectSmall")]
public SRectF TileRectSmall;
[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("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;
[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;
}
abstract class CSongMenuFramework : ISongMenu
@@ -236,7 +210,7 @@ namespace VocaluxeLib.Menu.SongMenu
_ThemeLoaded &= xmlReader.GetValue(item + "/MedleyTagIcon", out _Theme.MedleyTagIcon, String.Empty);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.Color.Name, skinIndex, out _ColorInternal);
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out _ColorInternal);
else
{
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref _ColorInternal.R);
@@ -278,7 +252,6 @@ namespace VocaluxeLib.Menu.SongMenu
return _ThemeLoaded;
}
#endregion Theme
public virtual void Init()
@@ -294,10 +267,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();
}
@@ -369,11 +342,7 @@ namespace VocaluxeLib.Menu.SongMenu
{
Init();
if (!String.IsNullOrEmpty(_Theme.Color.Name))
_ColorInternal = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
else
_ColorInternal = _Theme.Color.Color;
_Theme.Color.Get(_PartyModeID, out _ColorInternal);
}
public void ReloadTextures()