Update LoadTextures for some elements.
This commit is contained in:
1 parent
e936fe4126
commit
d248292fa3
4 files changed
+230
-197
No files matched your search
+167
-197
@@ -78,78 +78,27 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
[XmlElement("Text1")]
|
[XmlElement("Text1")]
|
||||||
public SThemeText SText1;
|
public SThemeText SText1;
|
||||||
[XmlIgnore]
|
|
||||||
public CText Text1;
|
|
||||||
|
|
||||||
[XmlElement("StaticCover")]
|
[XmlElement("StaticCover")]
|
||||||
public SThemeStatic SStaticCover;
|
public SThemeStatic SStaticCover;
|
||||||
[XmlIgnore]
|
|
||||||
public CStatic StaticCover;
|
|
||||||
[XmlElement("StaticPlaylistHeader")]
|
[XmlElement("StaticPlaylistHeader")]
|
||||||
public SThemeStatic SStaticPlaylistHeader;
|
public SThemeStatic SStaticPlaylistHeader;
|
||||||
[XmlIgnore]
|
|
||||||
public CStatic StaticPlaylistHeader;
|
|
||||||
[XmlElement("StaticPlaylistFooter")]
|
[XmlElement("StaticPlaylistFooter")]
|
||||||
public SThemeStatic SStaticPlaylistFooter;
|
public SThemeStatic SStaticPlaylistFooter;
|
||||||
[XmlIgnore]
|
|
||||||
public CStatic StaticPlaylistFooter;
|
|
||||||
|
|
||||||
[XmlElement("ButtonPlaylistName")]
|
[XmlElement("ButtonPlaylistName")]
|
||||||
public SThemeButton SButtonPlaylistName;
|
public SThemeButton SButtonPlaylistName;
|
||||||
[XmlIgnore]
|
|
||||||
public CButton ButtonPlaylistName;
|
|
||||||
[XmlElement("ButtonPlaylistClose")]
|
[XmlElement("ButtonPlaylistClose")]
|
||||||
public SThemeButton SButtonPlaylistClose;
|
public SThemeButton SButtonPlaylistClose;
|
||||||
[XmlIgnore]
|
|
||||||
public CButton ButtonPlaylistClose;
|
|
||||||
[XmlElement("ButtonPlaylistSave")]
|
[XmlElement("ButtonPlaylistSave")]
|
||||||
public SThemeButton SButtonPlaylistSave;
|
public SThemeButton SButtonPlaylistSave;
|
||||||
[XmlIgnore]
|
|
||||||
public CButton ButtonPlaylistSave;
|
|
||||||
[XmlElement("ButtonPlaylistDelete")]
|
[XmlElement("ButtonPlaylistDelete")]
|
||||||
public SThemeButton SButtonPlaylistDelete;
|
public SThemeButton SButtonPlaylistDelete;
|
||||||
[XmlIgnore]
|
|
||||||
public CButton ButtonPlaylistDelete;
|
|
||||||
[XmlElement("ButtonPlaylistSing")]
|
[XmlElement("ButtonPlaylistSing")]
|
||||||
public SThemeButton SButtonPlaylistSing;
|
public SThemeButton SButtonPlaylistSing;
|
||||||
[XmlIgnore]
|
|
||||||
public CButton ButtonPlaylistSing;
|
|
||||||
|
|
||||||
[XmlElement("SelectSlideGameMode")]
|
[XmlElement("SelectSlideGameMode")]
|
||||||
public SThemeSelectSlide SSelectSlideGameMode;
|
public SThemeSelectSlide SSelectSlideGameMode;
|
||||||
[XmlIgnore]
|
|
||||||
public CSelectSlide SelectSlideGameMode;
|
|
||||||
|
|
||||||
public SThemePlaylist(SThemePlaylist theme)
|
|
||||||
{
|
|
||||||
Name = theme.Name;
|
|
||||||
Rect = theme.Rect;
|
|
||||||
EntryHeight = theme.EntryHeight;
|
|
||||||
TextureBackgroundName = theme.TextureBackgroundName;
|
|
||||||
SelTextureBackgroundName = theme.SelTextureBackgroundName;
|
|
||||||
ColorBackground = new SThemeColor(theme.ColorBackground);
|
|
||||||
SelColorBackground = new SThemeColor(theme.SelColorBackground);
|
|
||||||
SText1 = new SThemeText(theme.SText1);
|
|
||||||
Text1 = new CText(theme.Text1);
|
|
||||||
SStaticCover = new SThemeStatic(theme.SStaticCover);
|
|
||||||
StaticCover = new CStatic(theme.StaticCover);
|
|
||||||
SStaticPlaylistHeader = new SThemeStatic(theme.SStaticPlaylistHeader);
|
|
||||||
StaticPlaylistHeader = new CStatic(theme.StaticPlaylistHeader);
|
|
||||||
SStaticPlaylistFooter = new SThemeStatic(theme.SStaticPlaylistFooter);
|
|
||||||
StaticPlaylistFooter = new CStatic(theme.StaticPlaylistFooter);
|
|
||||||
SButtonPlaylistName = new SThemeButton(theme.SButtonPlaylistName);
|
|
||||||
ButtonPlaylistName = new CButton(theme.ButtonPlaylistName);
|
|
||||||
SButtonPlaylistClose = new SThemeButton(theme.SButtonPlaylistClose);
|
|
||||||
ButtonPlaylistClose = new CButton(theme.ButtonPlaylistClose);
|
|
||||||
SButtonPlaylistSave = new SThemeButton(theme.SButtonPlaylistSave);
|
|
||||||
ButtonPlaylistSave = new CButton(theme.ButtonPlaylistSave);
|
|
||||||
SButtonPlaylistDelete = new SThemeButton(theme.SButtonPlaylistDelete);
|
|
||||||
ButtonPlaylistDelete = new CButton(theme.ButtonPlaylistDelete);
|
|
||||||
SButtonPlaylistSing = new SThemeButton(theme.SButtonPlaylistSing);
|
|
||||||
ButtonPlaylistSing = new CButton(theme.ButtonPlaylistSing);
|
|
||||||
SSelectSlideGameMode = new SThemeSelectSlide(theme.SSelectSlideGameMode);
|
|
||||||
SelectSlideGameMode = new CSelectSlide(theme.SelectSlideGameMode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CPlaylist : IMenuElement
|
public class CPlaylist : IMenuElement
|
||||||
@@ -237,6 +186,17 @@ namespace VocaluxeLib.Menu
|
|||||||
public SColorF BackgroundColor;
|
public SColorF BackgroundColor;
|
||||||
public SColorF BackgroundSelColor;
|
public SColorF BackgroundSelColor;
|
||||||
|
|
||||||
|
public CButton ButtonPlaylistName;
|
||||||
|
public CButton ButtonPlaylistClose;
|
||||||
|
public CButton ButtonPlaylistSave;
|
||||||
|
public CButton ButtonPlaylistDelete;
|
||||||
|
public CButton ButtonPlaylistSing;
|
||||||
|
public CText Text1;
|
||||||
|
public CSelectSlide SelectSlideGameMode;
|
||||||
|
public CStatic StaticCover;
|
||||||
|
public CStatic StaticPlaylistHeader;
|
||||||
|
public CStatic StaticPlaylistFooter;
|
||||||
|
|
||||||
public bool Visible;
|
public bool Visible;
|
||||||
|
|
||||||
private bool _Selected;
|
private bool _Selected;
|
||||||
@@ -278,19 +238,17 @@ namespace VocaluxeLib.Menu
|
|||||||
public CPlaylist(int partyModeID)
|
public CPlaylist(int partyModeID)
|
||||||
{
|
{
|
||||||
_PartyModeID = partyModeID;
|
_PartyModeID = partyModeID;
|
||||||
_Theme = new SThemePlaylist
|
|
||||||
{
|
Text1 = new CText(_PartyModeID);
|
||||||
Text1 = new CText(_PartyModeID),
|
StaticCover = new CStatic(_PartyModeID);
|
||||||
StaticCover = new CStatic(_PartyModeID),
|
StaticPlaylistFooter = new CStatic(_PartyModeID);
|
||||||
StaticPlaylistFooter = new CStatic(_PartyModeID),
|
StaticPlaylistHeader = new CStatic(_PartyModeID);
|
||||||
StaticPlaylistHeader = new CStatic(_PartyModeID),
|
ButtonPlaylistName = new CButton(_PartyModeID);
|
||||||
ButtonPlaylistName = new CButton(_PartyModeID),
|
ButtonPlaylistClose = new CButton(_PartyModeID);
|
||||||
ButtonPlaylistClose = new CButton(_PartyModeID),
|
ButtonPlaylistDelete = new CButton(_PartyModeID);
|
||||||
ButtonPlaylistDelete = new CButton(_PartyModeID),
|
ButtonPlaylistSave = new CButton(_PartyModeID);
|
||||||
ButtonPlaylistSave = new CButton(_PartyModeID),
|
ButtonPlaylistSing = new CButton(_PartyModeID);
|
||||||
ButtonPlaylistSing = new CButton(_PartyModeID),
|
SelectSlideGameMode = new CSelectSlide(_PartyModeID);
|
||||||
SelectSlideGameMode = new CSelectSlide(_PartyModeID)
|
|
||||||
};
|
|
||||||
|
|
||||||
CompleteRect = new SRectF();
|
CompleteRect = new SRectF();
|
||||||
Rect = new SRectF();
|
Rect = new SRectF();
|
||||||
@@ -310,7 +268,7 @@ namespace VocaluxeLib.Menu
|
|||||||
public CPlaylist(SThemePlaylist theme, int partyModeID)
|
public CPlaylist(SThemePlaylist theme, int partyModeID)
|
||||||
{
|
{
|
||||||
_PartyModeID = partyModeID;
|
_PartyModeID = partyModeID;
|
||||||
_Theme = new SThemePlaylist(theme);
|
_Theme = theme;
|
||||||
|
|
||||||
CompleteRect = new SRectF();
|
CompleteRect = new SRectF();
|
||||||
_PlaylistElements = new List<CPlaylistElement>();
|
_PlaylistElements = new List<CPlaylistElement>();
|
||||||
@@ -319,6 +277,18 @@ namespace VocaluxeLib.Menu
|
|||||||
_Interactions = new CObjectInteractions();
|
_Interactions = new CObjectInteractions();
|
||||||
_ChangeOrderElement = new CPlaylistElement();
|
_ChangeOrderElement = new CPlaylistElement();
|
||||||
|
|
||||||
|
Text1 = new CText(_Theme.SText1, _PartyModeID);
|
||||||
|
StaticCover = new CStatic(_Theme.SStaticCover, _PartyModeID);
|
||||||
|
StaticPlaylistFooter = new CStatic(_Theme.SStaticPlaylistFooter, _PartyModeID);
|
||||||
|
StaticPlaylistHeader = new CStatic(_Theme.SStaticPlaylistHeader, _PartyModeID);
|
||||||
|
ButtonPlaylistName = new CButton(_Theme.SButtonPlaylistName, _PartyModeID);
|
||||||
|
ButtonPlaylistClose = new CButton(_Theme.SButtonPlaylistClose, _PartyModeID);
|
||||||
|
ButtonPlaylistDelete = new CButton(_Theme.SButtonPlaylistDelete, _PartyModeID);
|
||||||
|
ButtonPlaylistSave = new CButton(_Theme.SButtonPlaylistSave, _PartyModeID);
|
||||||
|
ButtonPlaylistSing = new CButton(_Theme.SButtonPlaylistSing, _PartyModeID);
|
||||||
|
SelectSlideGameMode = new CSelectSlide(_Theme.SSelectSlideGameMode, _PartyModeID);
|
||||||
|
|
||||||
|
|
||||||
Visible = false;
|
Visible = false;
|
||||||
Selected = false;
|
Selected = false;
|
||||||
|
|
||||||
@@ -329,14 +299,14 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
_Interactions.Clear();
|
_Interactions.Clear();
|
||||||
_PrepareList();
|
_PrepareList();
|
||||||
_Interactions.AddStatic(_Theme.StaticCover);
|
_Interactions.AddStatic(StaticCover);
|
||||||
_Interactions.AddStatic(_Theme.StaticPlaylistFooter);
|
_Interactions.AddStatic(StaticPlaylistFooter);
|
||||||
_Interactions.AddStatic(_Theme.StaticPlaylistHeader);
|
_Interactions.AddStatic(StaticPlaylistHeader);
|
||||||
_Interactions.AddButton(_Theme.ButtonPlaylistName);
|
_Interactions.AddButton(ButtonPlaylistName);
|
||||||
_Interactions.AddButton(_Theme.ButtonPlaylistClose);
|
_Interactions.AddButton(ButtonPlaylistClose);
|
||||||
_Interactions.AddButton(_Theme.ButtonPlaylistDelete);
|
_Interactions.AddButton(ButtonPlaylistDelete);
|
||||||
_Interactions.AddButton(_Theme.ButtonPlaylistSave);
|
_Interactions.AddButton(ButtonPlaylistSave);
|
||||||
_Interactions.AddButton(_Theme.ButtonPlaylistSing);
|
_Interactions.AddButton(ButtonPlaylistSing);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
|
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
|
||||||
@@ -371,19 +341,19 @@ namespace VocaluxeLib.Menu
|
|||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SBackgroundA", ref BackgroundSelColor.A);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SBackgroundA", ref BackgroundSelColor.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ThemeLoaded &= _Theme.Text1.LoadTheme(item, "TextPart1", xmlReader, skinIndex);
|
_ThemeLoaded &= Text1.LoadTheme(item, "TextPart1", xmlReader, skinIndex);
|
||||||
|
|
||||||
_ThemeLoaded &= _Theme.StaticCover.LoadTheme(item, "StaticCover", xmlReader, skinIndex);
|
_ThemeLoaded &= StaticCover.LoadTheme(item, "StaticCover", xmlReader, skinIndex);
|
||||||
_ThemeLoaded &= _Theme.StaticPlaylistHeader.LoadTheme(item, "StaticPlaylistHeader", xmlReader, skinIndex);
|
_ThemeLoaded &= StaticPlaylistHeader.LoadTheme(item, "StaticPlaylistHeader", xmlReader, skinIndex);
|
||||||
_ThemeLoaded &= _Theme.StaticPlaylistFooter.LoadTheme(item, "StaticPlaylistFooter", xmlReader, skinIndex);
|
_ThemeLoaded &= StaticPlaylistFooter.LoadTheme(item, "StaticPlaylistFooter", xmlReader, skinIndex);
|
||||||
|
|
||||||
_ThemeLoaded &= _Theme.ButtonPlaylistName.LoadTheme(item, "ButtonPlaylistName", xmlReader, skinIndex);
|
_ThemeLoaded &= ButtonPlaylistName.LoadTheme(item, "ButtonPlaylistName", xmlReader, skinIndex);
|
||||||
_ThemeLoaded &= _Theme.ButtonPlaylistSing.LoadTheme(item, "ButtonPlaylistSing", xmlReader, skinIndex);
|
_ThemeLoaded &= ButtonPlaylistSing.LoadTheme(item, "ButtonPlaylistSing", xmlReader, skinIndex);
|
||||||
_ThemeLoaded &= _Theme.ButtonPlaylistClose.LoadTheme(item, "ButtonPlaylistClose", xmlReader, skinIndex);
|
_ThemeLoaded &= ButtonPlaylistClose.LoadTheme(item, "ButtonPlaylistClose", xmlReader, skinIndex);
|
||||||
_ThemeLoaded &= _Theme.ButtonPlaylistSave.LoadTheme(item, "ButtonPlaylistSave", xmlReader, skinIndex);
|
_ThemeLoaded &= ButtonPlaylistSave.LoadTheme(item, "ButtonPlaylistSave", xmlReader, skinIndex);
|
||||||
_ThemeLoaded &= _Theme.ButtonPlaylistDelete.LoadTheme(item, "ButtonPlaylistDelete", xmlReader, skinIndex);
|
_ThemeLoaded &= ButtonPlaylistDelete.LoadTheme(item, "ButtonPlaylistDelete", xmlReader, skinIndex);
|
||||||
|
|
||||||
_ThemeLoaded &= _Theme.SelectSlideGameMode.LoadTheme(item, "SelectSlideGameMode", xmlReader, skinIndex);
|
_ThemeLoaded &=SelectSlideGameMode.LoadTheme(item, "SelectSlideGameMode", xmlReader, skinIndex);
|
||||||
|
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/EntryHeight", ref _Theme.EntryHeight);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/EntryHeight", ref _Theme.EntryHeight);
|
||||||
if (_ThemeLoaded)
|
if (_ThemeLoaded)
|
||||||
@@ -392,63 +362,63 @@ namespace VocaluxeLib.Menu
|
|||||||
_Theme.Rect = Rect;
|
_Theme.Rect = Rect;
|
||||||
_Theme.ColorBackground.Color = BackgroundColor;
|
_Theme.ColorBackground.Color = BackgroundColor;
|
||||||
_Theme.SelColorBackground.Color = BackgroundSelColor;
|
_Theme.SelColorBackground.Color = BackgroundSelColor;
|
||||||
_Theme.SText1 = _Theme.Text1.GetTheme();
|
_Theme.SText1 = Text1.GetTheme();
|
||||||
_Theme.SStaticCover = _Theme.StaticCover.GetTheme();
|
_Theme.SStaticCover = StaticCover.GetTheme();
|
||||||
_Theme.SStaticPlaylistFooter = _Theme.StaticPlaylistFooter.GetTheme();
|
_Theme.SStaticPlaylistFooter = StaticPlaylistFooter.GetTheme();
|
||||||
_Theme.SStaticPlaylistHeader = _Theme.StaticPlaylistHeader.GetTheme();
|
_Theme.SStaticPlaylistHeader = StaticPlaylistHeader.GetTheme();
|
||||||
_Theme.SButtonPlaylistName = _Theme.ButtonPlaylistName.GetTheme();
|
_Theme.SButtonPlaylistName =ButtonPlaylistName.GetTheme();
|
||||||
_Theme.SButtonPlaylistSing = _Theme.ButtonPlaylistSing.GetTheme();
|
_Theme.SButtonPlaylistSing =ButtonPlaylistSing.GetTheme();
|
||||||
_Theme.SButtonPlaylistClose = _Theme.ButtonPlaylistClose.GetTheme();
|
_Theme.SButtonPlaylistClose =ButtonPlaylistClose.GetTheme();
|
||||||
_Theme.SButtonPlaylistSave = _Theme.ButtonPlaylistSave.GetTheme();
|
_Theme.SButtonPlaylistSave =ButtonPlaylistSave.GetTheme();
|
||||||
_Theme.SButtonPlaylistDelete = _Theme.ButtonPlaylistDelete.GetTheme();
|
_Theme.SButtonPlaylistDelete =ButtonPlaylistDelete.GetTheme();
|
||||||
|
|
||||||
//Check for highest x/y-coords
|
//Check for highest x/y-coords
|
||||||
CompleteRect = Rect;
|
CompleteRect = Rect;
|
||||||
//ButtonPlaylistClose
|
//ButtonPlaylistClose
|
||||||
if (_Theme.ButtonPlaylistClose.Rect.X < CompleteRect.X)
|
if (ButtonPlaylistClose.Rect.X < CompleteRect.X)
|
||||||
CompleteRect.X = _Theme.ButtonPlaylistClose.Rect.X;
|
CompleteRect.X = ButtonPlaylistClose.Rect.X;
|
||||||
if (_Theme.ButtonPlaylistClose.Rect.Y < CompleteRect.Y)
|
if (ButtonPlaylistClose.Rect.Y < CompleteRect.Y)
|
||||||
CompleteRect.Y = _Theme.ButtonPlaylistClose.Rect.Y;
|
CompleteRect.Y = ButtonPlaylistClose.Rect.Y;
|
||||||
if (_Theme.ButtonPlaylistClose.Rect.W + _Theme.ButtonPlaylistClose.Rect.X > CompleteRect.W + CompleteRect.X)
|
if (ButtonPlaylistClose.Rect.W + ButtonPlaylistClose.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||||
CompleteRect.W = _Theme.ButtonPlaylistClose.Rect.W + _Theme.ButtonPlaylistClose.Rect.X - CompleteRect.X;
|
CompleteRect.W = ButtonPlaylistClose.Rect.W + ButtonPlaylistClose.Rect.X - CompleteRect.X;
|
||||||
if (_Theme.ButtonPlaylistClose.Rect.Y + _Theme.ButtonPlaylistClose.Rect.H > CompleteRect.Y + CompleteRect.H)
|
if (ButtonPlaylistClose.Rect.Y + ButtonPlaylistClose.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||||
CompleteRect.H = _Theme.ButtonPlaylistClose.Rect.H + _Theme.ButtonPlaylistClose.Rect.Y - CompleteRect.Y;
|
CompleteRect.H = ButtonPlaylistClose.Rect.H + ButtonPlaylistClose.Rect.Y - CompleteRect.Y;
|
||||||
//ButtonPlaylistName
|
//ButtonPlaylistName
|
||||||
if (_Theme.ButtonPlaylistName.Rect.X < CompleteRect.X)
|
if (ButtonPlaylistName.Rect.X < CompleteRect.X)
|
||||||
CompleteRect.X = _Theme.ButtonPlaylistName.Rect.X;
|
CompleteRect.X = ButtonPlaylistName.Rect.X;
|
||||||
if (_Theme.ButtonPlaylistName.Rect.Y < CompleteRect.Y)
|
if (ButtonPlaylistName.Rect.Y < CompleteRect.Y)
|
||||||
CompleteRect.Y = _Theme.ButtonPlaylistName.Rect.Y;
|
CompleteRect.Y = ButtonPlaylistName.Rect.Y;
|
||||||
if (_Theme.ButtonPlaylistName.Rect.W + _Theme.ButtonPlaylistName.Rect.X > CompleteRect.W + CompleteRect.X)
|
if (ButtonPlaylistName.Rect.W + ButtonPlaylistName.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||||
CompleteRect.W = _Theme.ButtonPlaylistName.Rect.W + _Theme.ButtonPlaylistName.Rect.X - CompleteRect.X;
|
CompleteRect.W = ButtonPlaylistName.Rect.W + ButtonPlaylistName.Rect.X - CompleteRect.X;
|
||||||
if (_Theme.ButtonPlaylistName.Rect.Y + _Theme.ButtonPlaylistName.Rect.H > CompleteRect.Y + CompleteRect.H)
|
if (ButtonPlaylistName.Rect.Y + ButtonPlaylistName.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||||
CompleteRect.H = _Theme.ButtonPlaylistName.Rect.H + _Theme.ButtonPlaylistName.Rect.Y - CompleteRect.Y;
|
CompleteRect.H = ButtonPlaylistName.Rect.H + ButtonPlaylistName.Rect.Y - CompleteRect.Y;
|
||||||
//ButtonPlaylistSing
|
//ButtonPlaylistSing
|
||||||
if (_Theme.ButtonPlaylistSing.Rect.X < CompleteRect.X)
|
if (ButtonPlaylistSing.Rect.X < CompleteRect.X)
|
||||||
CompleteRect.X = _Theme.ButtonPlaylistSing.Rect.X;
|
CompleteRect.X = ButtonPlaylistSing.Rect.X;
|
||||||
if (_Theme.ButtonPlaylistSing.Rect.Y < CompleteRect.Y)
|
if (ButtonPlaylistSing.Rect.Y < CompleteRect.Y)
|
||||||
CompleteRect.Y = _Theme.ButtonPlaylistSing.Rect.Y;
|
CompleteRect.Y = ButtonPlaylistSing.Rect.Y;
|
||||||
if (_Theme.ButtonPlaylistSing.Rect.W + _Theme.ButtonPlaylistSing.Rect.X > CompleteRect.W + CompleteRect.X)
|
if (ButtonPlaylistSing.Rect.W + ButtonPlaylistSing.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||||
CompleteRect.W = _Theme.ButtonPlaylistSing.Rect.W + _Theme.ButtonPlaylistSing.Rect.X - CompleteRect.X;
|
CompleteRect.W = ButtonPlaylistSing.Rect.W + ButtonPlaylistSing.Rect.X - CompleteRect.X;
|
||||||
if (_Theme.ButtonPlaylistSing.Rect.Y + _Theme.ButtonPlaylistSing.Rect.H > CompleteRect.Y + CompleteRect.H)
|
if (ButtonPlaylistSing.Rect.Y + ButtonPlaylistSing.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||||
CompleteRect.H = _Theme.ButtonPlaylistSing.Rect.H + _Theme.ButtonPlaylistSing.Rect.Y - CompleteRect.Y;
|
CompleteRect.H = ButtonPlaylistSing.Rect.H + ButtonPlaylistSing.Rect.Y - CompleteRect.Y;
|
||||||
//ButtonPlaylistSave
|
//ButtonPlaylistSave
|
||||||
if (_Theme.ButtonPlaylistSave.Rect.X < CompleteRect.X)
|
if (ButtonPlaylistSave.Rect.X < CompleteRect.X)
|
||||||
CompleteRect.X = _Theme.ButtonPlaylistSave.Rect.X;
|
CompleteRect.X = ButtonPlaylistSave.Rect.X;
|
||||||
if (_Theme.ButtonPlaylistSave.Rect.Y < CompleteRect.Y)
|
if (ButtonPlaylistSave.Rect.Y < CompleteRect.Y)
|
||||||
CompleteRect.Y = _Theme.ButtonPlaylistSave.Rect.Y;
|
CompleteRect.Y = ButtonPlaylistSave.Rect.Y;
|
||||||
if (_Theme.ButtonPlaylistSave.Rect.W + _Theme.ButtonPlaylistSave.Rect.X > CompleteRect.W + CompleteRect.X)
|
if (ButtonPlaylistSave.Rect.W + ButtonPlaylistSave.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||||
CompleteRect.W = _Theme.ButtonPlaylistSave.Rect.W + _Theme.ButtonPlaylistSave.Rect.X - CompleteRect.X;
|
CompleteRect.W = ButtonPlaylistSave.Rect.W + ButtonPlaylistSave.Rect.X - CompleteRect.X;
|
||||||
if (_Theme.ButtonPlaylistSave.Rect.Y + _Theme.ButtonPlaylistSave.Rect.H > CompleteRect.Y + CompleteRect.H)
|
if (ButtonPlaylistSave.Rect.Y + ButtonPlaylistSave.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||||
CompleteRect.H = _Theme.ButtonPlaylistSave.Rect.H + _Theme.ButtonPlaylistSave.Rect.Y - CompleteRect.Y;
|
CompleteRect.H = ButtonPlaylistSave.Rect.H + ButtonPlaylistSave.Rect.Y - CompleteRect.Y;
|
||||||
//ButtonPlaylistDelete
|
//ButtonPlaylistDelete
|
||||||
if (_Theme.ButtonPlaylistDelete.Rect.X < CompleteRect.X)
|
if (ButtonPlaylistDelete.Rect.X < CompleteRect.X)
|
||||||
CompleteRect.X = _Theme.ButtonPlaylistDelete.Rect.X;
|
CompleteRect.X = ButtonPlaylistDelete.Rect.X;
|
||||||
if (_Theme.ButtonPlaylistDelete.Rect.Y < CompleteRect.Y)
|
if (ButtonPlaylistDelete.Rect.Y < CompleteRect.Y)
|
||||||
CompleteRect.Y = _Theme.ButtonPlaylistDelete.Rect.Y;
|
CompleteRect.Y = ButtonPlaylistDelete.Rect.Y;
|
||||||
if (_Theme.ButtonPlaylistDelete.Rect.W + _Theme.ButtonPlaylistDelete.Rect.X > CompleteRect.W + CompleteRect.X)
|
if (ButtonPlaylistDelete.Rect.W + ButtonPlaylistDelete.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||||
CompleteRect.W = _Theme.ButtonPlaylistDelete.Rect.W + _Theme.ButtonPlaylistDelete.Rect.X - CompleteRect.X;
|
CompleteRect.W = ButtonPlaylistDelete.Rect.W + ButtonPlaylistDelete.Rect.X - CompleteRect.X;
|
||||||
if (_Theme.ButtonPlaylistDelete.Rect.Y + _Theme.ButtonPlaylistDelete.Rect.H > CompleteRect.Y + CompleteRect.H)
|
if (ButtonPlaylistDelete.Rect.Y + ButtonPlaylistDelete.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||||
CompleteRect.H = _Theme.ButtonPlaylistDelete.Rect.H + _Theme.ButtonPlaylistDelete.Rect.Y - CompleteRect.Y;
|
CompleteRect.H = ButtonPlaylistDelete.Rect.H + ButtonPlaylistDelete.Rect.Y - CompleteRect.Y;
|
||||||
LoadTextures();
|
LoadTextures();
|
||||||
}
|
}
|
||||||
return _ThemeLoaded;
|
return _ThemeLoaded;
|
||||||
@@ -501,16 +471,16 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
writer.WriteComment("Positions of <TextPart1>, <TextPart2>, <TextPart3>, <StaticCover> and <SelectSlideGameMode> are relative to playlist-entry!");
|
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");
|
writer.WriteComment("Use placeholders for Text of <TextPart1>, <TextPart2> and <TextPart3>: %t, %a, %l");
|
||||||
_Theme.Text1.SaveTheme(writer);
|
Text1.SaveTheme(writer);
|
||||||
_Theme.StaticPlaylistFooter.SaveTheme(writer);
|
StaticPlaylistFooter.SaveTheme(writer);
|
||||||
_Theme.StaticPlaylistHeader.SaveTheme(writer);
|
StaticPlaylistHeader.SaveTheme(writer);
|
||||||
_Theme.StaticCover.SaveTheme(writer);
|
StaticCover.SaveTheme(writer);
|
||||||
_Theme.SelectSlideGameMode.SaveTheme(writer);
|
SelectSlideGameMode.SaveTheme(writer);
|
||||||
_Theme.ButtonPlaylistName.SaveTheme(writer);
|
ButtonPlaylistName.SaveTheme(writer);
|
||||||
_Theme.ButtonPlaylistClose.SaveTheme(writer);
|
ButtonPlaylistClose.SaveTheme(writer);
|
||||||
_Theme.ButtonPlaylistDelete.SaveTheme(writer);
|
ButtonPlaylistDelete.SaveTheme(writer);
|
||||||
_Theme.ButtonPlaylistSave.SaveTheme(writer);
|
ButtonPlaylistSave.SaveTheme(writer);
|
||||||
_Theme.ButtonPlaylistSing.SaveTheme(writer);
|
ButtonPlaylistSing.SaveTheme(writer);
|
||||||
|
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
|
|
||||||
@@ -552,18 +522,18 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
public void UnloadTextures()
|
public void UnloadTextures()
|
||||||
{
|
{
|
||||||
_Theme.Text1.UnloadTextures();
|
Text1.UnloadTextures();
|
||||||
_Theme.ButtonPlaylistClose.UnloadTextures();
|
ButtonPlaylistClose.UnloadTextures();
|
||||||
_Theme.ButtonPlaylistDelete.UnloadTextures();
|
ButtonPlaylistDelete.UnloadTextures();
|
||||||
_Theme.ButtonPlaylistName.UnloadTextures();
|
ButtonPlaylistName.UnloadTextures();
|
||||||
_Theme.ButtonPlaylistSave.UnloadTextures();
|
ButtonPlaylistSave.UnloadTextures();
|
||||||
_Theme.ButtonPlaylistSing.UnloadTextures();
|
ButtonPlaylistSing.UnloadTextures();
|
||||||
|
|
||||||
_Theme.StaticCover.UnloadTextures();
|
StaticCover.UnloadTextures();
|
||||||
_Theme.StaticPlaylistFooter.UnloadTextures();
|
StaticPlaylistFooter.UnloadTextures();
|
||||||
_Theme.StaticPlaylistHeader.UnloadTextures();
|
StaticPlaylistHeader.UnloadTextures();
|
||||||
|
|
||||||
_Theme.SelectSlideGameMode.UnloadTextures();
|
SelectSlideGameMode.UnloadTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadTextures()
|
public void LoadTextures()
|
||||||
@@ -574,18 +544,18 @@ namespace VocaluxeLib.Menu
|
|||||||
if (!String.IsNullOrEmpty(_Theme.SelColorBackground.Name))
|
if (!String.IsNullOrEmpty(_Theme.SelColorBackground.Name))
|
||||||
BackgroundSelColor = CBase.Theme.GetColor(_Theme.SelColorBackground.Name, _PartyModeID);
|
BackgroundSelColor = CBase.Theme.GetColor(_Theme.SelColorBackground.Name, _PartyModeID);
|
||||||
|
|
||||||
_Theme.Text1.LoadTextures();
|
Text1.LoadTextures();
|
||||||
_Theme.ButtonPlaylistClose.LoadTextures();
|
ButtonPlaylistClose.LoadTextures();
|
||||||
_Theme.ButtonPlaylistDelete.LoadTextures();
|
ButtonPlaylistDelete.LoadTextures();
|
||||||
_Theme.ButtonPlaylistName.LoadTextures();
|
ButtonPlaylistName.LoadTextures();
|
||||||
_Theme.ButtonPlaylistSave.LoadTextures();
|
ButtonPlaylistSave.LoadTextures();
|
||||||
_Theme.ButtonPlaylistSing.LoadTextures();
|
ButtonPlaylistSing.LoadTextures();
|
||||||
|
|
||||||
_Theme.StaticCover.LoadTextures();
|
StaticCover.LoadTextures();
|
||||||
_Theme.StaticPlaylistFooter.LoadTextures();
|
StaticPlaylistFooter.LoadTextures();
|
||||||
_Theme.StaticPlaylistHeader.LoadTextures();
|
StaticPlaylistHeader.LoadTextures();
|
||||||
|
|
||||||
_Theme.SelectSlideGameMode.LoadTextures();
|
SelectSlideGameMode.LoadTextures();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
@@ -604,26 +574,26 @@ namespace VocaluxeLib.Menu
|
|||||||
if (EditMode == EEditMode.PlaylistName)
|
if (EditMode == EEditMode.PlaylistName)
|
||||||
{
|
{
|
||||||
if (keyEvent.KeyPressed && !Char.IsControl(keyEvent.Unicode))
|
if (keyEvent.KeyPressed && !Char.IsControl(keyEvent.Unicode))
|
||||||
_Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text + keyEvent.Unicode;
|
ButtonPlaylistName.Text.Text = ButtonPlaylistName.Text.Text + keyEvent.Unicode;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (keyEvent.Key)
|
switch (keyEvent.Key)
|
||||||
{
|
{
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
CBase.Playlist.SetName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
CBase.Playlist.SetName(ActivePlaylistID, ButtonPlaylistName.Text.Text);
|
||||||
CBase.Playlist.Save(ActivePlaylistID);
|
CBase.Playlist.Save(ActivePlaylistID);
|
||||||
EditMode = EEditMode.None;
|
EditMode = EEditMode.None;
|
||||||
_Theme.ButtonPlaylistName.EditMode = false;
|
ButtonPlaylistName.EditMode = false;
|
||||||
break;
|
break;
|
||||||
case Keys.Escape:
|
case Keys.Escape:
|
||||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetName(ActivePlaylistID);
|
ButtonPlaylistName.Text.Text = CBase.Playlist.GetName(ActivePlaylistID);
|
||||||
EditMode = EEditMode.None;
|
EditMode = EEditMode.None;
|
||||||
_Theme.ButtonPlaylistName.EditMode = false;
|
ButtonPlaylistName.EditMode = false;
|
||||||
break;
|
break;
|
||||||
case Keys.Delete:
|
case Keys.Delete:
|
||||||
case Keys.Back:
|
case Keys.Back:
|
||||||
if (!String.IsNullOrEmpty(_Theme.ButtonPlaylistName.Text.Text))
|
if (!String.IsNullOrEmpty(ButtonPlaylistName.Text.Text))
|
||||||
_Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text.Remove(_Theme.ButtonPlaylistName.Text.Text.Length - 1);
|
ButtonPlaylistName.Text.Text = ButtonPlaylistName.Text.Text.Remove(ButtonPlaylistName.Text.Text.Length - 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -856,38 +826,38 @@ namespace VocaluxeLib.Menu
|
|||||||
switch (keyEvent.Key)
|
switch (keyEvent.Key)
|
||||||
{
|
{
|
||||||
case Keys.Back:
|
case Keys.Back:
|
||||||
if (_Theme.ButtonPlaylistName.Selected)
|
if (ButtonPlaylistName.Selected)
|
||||||
{
|
{
|
||||||
EditMode = EEditMode.PlaylistName;
|
EditMode = EEditMode.PlaylistName;
|
||||||
_Theme.ButtonPlaylistName.EditMode = true;
|
ButtonPlaylistName.EditMode = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ClosePlaylist();
|
ClosePlaylist();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
if (_Theme.ButtonPlaylistClose.Selected)
|
if (ButtonPlaylistClose.Selected)
|
||||||
ClosePlaylist();
|
ClosePlaylist();
|
||||||
else if (_Theme.ButtonPlaylistSing.Selected)
|
else if (ButtonPlaylistSing.Selected)
|
||||||
_StartPlaylistSongs();
|
_StartPlaylistSongs();
|
||||||
else if (_Theme.ButtonPlaylistSave.Selected)
|
else if (ButtonPlaylistSave.Selected)
|
||||||
CBase.Playlist.Save(ActivePlaylistID);
|
CBase.Playlist.Save(ActivePlaylistID);
|
||||||
else if (_Theme.ButtonPlaylistDelete.Selected)
|
else if (ButtonPlaylistDelete.Selected)
|
||||||
{
|
{
|
||||||
CBase.Playlist.Delete(ActivePlaylistID);
|
CBase.Playlist.Delete(ActivePlaylistID);
|
||||||
ClosePlaylist();
|
ClosePlaylist();
|
||||||
}
|
}
|
||||||
else if (_Theme.ButtonPlaylistName.Selected)
|
else if (ButtonPlaylistName.Selected)
|
||||||
{
|
{
|
||||||
if (EditMode != EEditMode.PlaylistName)
|
if (EditMode != EEditMode.PlaylistName)
|
||||||
{
|
{
|
||||||
EditMode = EEditMode.PlaylistName;
|
EditMode = EEditMode.PlaylistName;
|
||||||
_Theme.ButtonPlaylistName.EditMode = true;
|
ButtonPlaylistName.EditMode = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EditMode = EEditMode.None;
|
EditMode = EEditMode.None;
|
||||||
_Theme.ButtonPlaylistName.EditMode = false;
|
ButtonPlaylistName.EditMode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1017,31 +987,31 @@ namespace VocaluxeLib.Menu
|
|||||||
_PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[_PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
_PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[_PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||||
UpdatePlaylist();
|
UpdatePlaylist();
|
||||||
}
|
}
|
||||||
if (_Theme.ButtonPlaylistClose.Selected)
|
if (ButtonPlaylistClose.Selected)
|
||||||
{
|
{
|
||||||
ClosePlaylist();
|
ClosePlaylist();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (_Theme.ButtonPlaylistSing.Selected)
|
if (ButtonPlaylistSing.Selected)
|
||||||
{
|
{
|
||||||
_StartPlaylistSongs();
|
_StartPlaylistSongs();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (_Theme.ButtonPlaylistSave.Selected)
|
if (ButtonPlaylistSave.Selected)
|
||||||
{
|
{
|
||||||
CBase.Playlist.Save(ActivePlaylistID);
|
CBase.Playlist.Save(ActivePlaylistID);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (_Theme.ButtonPlaylistDelete.Selected)
|
if (ButtonPlaylistDelete.Selected)
|
||||||
{
|
{
|
||||||
CBase.Playlist.Delete(ActivePlaylistID);
|
CBase.Playlist.Delete(ActivePlaylistID);
|
||||||
ClosePlaylist();
|
ClosePlaylist();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (_Theme.ButtonPlaylistName.Selected)
|
if (ButtonPlaylistName.Selected)
|
||||||
{
|
{
|
||||||
EditMode = EEditMode.PlaylistName;
|
EditMode = EEditMode.PlaylistName;
|
||||||
_Theme.ButtonPlaylistName.EditMode = true;
|
ButtonPlaylistName.EditMode = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1129,13 +1099,13 @@ namespace VocaluxeLib.Menu
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EEditMode.PlaylistName:
|
case EEditMode.PlaylistName:
|
||||||
_Interactions.SetInteractionToButton(_Theme.ButtonPlaylistName);
|
_Interactions.SetInteractionToButton(ButtonPlaylistName);
|
||||||
CurrentPlaylistElement = -1;
|
CurrentPlaylistElement = -1;
|
||||||
if (mouseEvent.LB)
|
if (mouseEvent.LB)
|
||||||
{
|
{
|
||||||
if (_Theme.ButtonPlaylistName.Selected)
|
if (ButtonPlaylistName.Selected)
|
||||||
{
|
{
|
||||||
CBase.Playlist.SetName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
CBase.Playlist.SetName(ActivePlaylistID, ButtonPlaylistName.Text.Text);
|
||||||
CBase.Playlist.Save(ActivePlaylistID);
|
CBase.Playlist.Save(ActivePlaylistID);
|
||||||
EditMode = EEditMode.None;
|
EditMode = EEditMode.None;
|
||||||
return true;
|
return true;
|
||||||
@@ -1143,11 +1113,11 @@ namespace VocaluxeLib.Menu
|
|||||||
}
|
}
|
||||||
else if (mouseEvent.RB)
|
else if (mouseEvent.RB)
|
||||||
{
|
{
|
||||||
if (_Theme.ButtonPlaylistName.Selected)
|
if (ButtonPlaylistName.Selected)
|
||||||
{
|
{
|
||||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetName(ActivePlaylistID);
|
ButtonPlaylistName.Text.Text = CBase.Playlist.GetName(ActivePlaylistID);
|
||||||
EditMode = EEditMode.None;
|
EditMode = EEditMode.None;
|
||||||
_Theme.ButtonPlaylistName.EditMode = false;
|
ButtonPlaylistName.EditMode = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1211,17 +1181,17 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
Background = new CStatic(_PartyModeID, _Theme.TextureBackgroundName, BackgroundColor,
|
Background = new CStatic(_PartyModeID, _Theme.TextureBackgroundName, BackgroundColor,
|
||||||
new SRectF(Rect.X, Rect.Y + (i * _Theme.EntryHeight), Rect.W, _Theme.EntryHeight, Rect.Z)),
|
new SRectF(Rect.X, Rect.Y + (i * _Theme.EntryHeight), Rect.W, _Theme.EntryHeight, Rect.Z)),
|
||||||
Cover = new CStatic(_Theme.StaticCover)
|
Cover = new CStatic(StaticCover)
|
||||||
};
|
};
|
||||||
|
|
||||||
en.Cover.Rect.Y += Rect.Y + (i * _Theme.EntryHeight);
|
en.Cover.Rect.Y += Rect.Y + (i * _Theme.EntryHeight);
|
||||||
en.Cover.Rect.X += Rect.X;
|
en.Cover.Rect.X += Rect.X;
|
||||||
|
|
||||||
en.Text1 = new CText(_Theme.Text1);
|
en.Text1 = new CText(Text1);
|
||||||
en.Text1.X += Rect.X;
|
en.Text1.X += Rect.X;
|
||||||
en.Text1.Y += Rect.Y + (i * _Theme.EntryHeight);
|
en.Text1.Y += Rect.Y + (i * _Theme.EntryHeight);
|
||||||
|
|
||||||
en.SelectSlide = new CSelectSlide(_Theme.SelectSlideGameMode);
|
en.SelectSlide = new CSelectSlide(SelectSlideGameMode);
|
||||||
en.SelectSlide.Rect.X += Rect.X;
|
en.SelectSlide.Rect.X += Rect.X;
|
||||||
en.SelectSlide.Rect.Y += Rect.Y + (i * _Theme.EntryHeight);
|
en.SelectSlide.Rect.Y += Rect.Y + (i * _Theme.EntryHeight);
|
||||||
en.SelectSlide.RectArrowLeft.X += Rect.X;
|
en.SelectSlide.RectArrowLeft.X += Rect.X;
|
||||||
@@ -1244,7 +1214,7 @@ namespace VocaluxeLib.Menu
|
|||||||
if (!CBase.Playlist.Exists(playlistID))
|
if (!CBase.Playlist.Exists(playlistID))
|
||||||
return false;
|
return false;
|
||||||
ActivePlaylistID = playlistID;
|
ActivePlaylistID = playlistID;
|
||||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetName(ActivePlaylistID);
|
ButtonPlaylistName.Text.Text = CBase.Playlist.GetName(ActivePlaylistID);
|
||||||
_PlaylistElementContents.Clear();
|
_PlaylistElementContents.Clear();
|
||||||
for (int i = 0; i < CBase.Playlist.GetSongCount(ActivePlaylistID); i++)
|
for (int i = 0; i < CBase.Playlist.GetSongCount(ActivePlaylistID); i++)
|
||||||
{
|
{
|
||||||
@@ -1322,7 +1292,7 @@ namespace VocaluxeLib.Menu
|
|||||||
CPlaylistElementContent pec = _PlaylistElementContents[Offset + i];
|
CPlaylistElementContent pec = _PlaylistElementContents[Offset + i];
|
||||||
CSong song = CBase.Songs.GetSongByID(pec.SongID);
|
CSong song = CBase.Songs.GetSongByID(pec.SongID);
|
||||||
_PlaylistElements[i].Cover.Texture = song.CoverTextureSmall;
|
_PlaylistElements[i].Cover.Texture = song.CoverTextureSmall;
|
||||||
string t1 = CBase.Language.Translate(_Theme.Text1.Text).Replace("%a", song.Artist).Replace("%t", song.Title);
|
string t1 = CBase.Language.Translate(Text1.Text).Replace("%a", song.Artist).Replace("%t", song.Title);
|
||||||
_PlaylistElements[i].Text1.Text = /*(Offset + i + 1) + ") " + */ t1; //TODO: Add text field for the number
|
_PlaylistElements[i].Text1.Text = /*(Offset + i + 1) + ") " + */ t1; //TODO: Add text field for the number
|
||||||
_PlaylistElements[i].SelectSlide.Clear();
|
_PlaylistElements[i].SelectSlide.Clear();
|
||||||
for (int g = 0; g < pec.Modes.Count; g++)
|
for (int g = 0; g < pec.Modes.Count; g++)
|
||||||
@@ -1346,7 +1316,7 @@ namespace VocaluxeLib.Menu
|
|||||||
|
|
||||||
public SThemePlaylist GetTheme()
|
public SThemePlaylist GetTheme()
|
||||||
{
|
{
|
||||||
return new SThemePlaylist(_Theme);
|
return _Theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region ThemeEdit
|
#region ThemeEdit
|
||||||
|
|||||||
@@ -922,24 +922,50 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
Color = _Theme.Color.Color;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||||
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
|
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
SelColor = _Theme.SColor.Color;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(_Theme.HColor.Name))
|
if (!String.IsNullOrEmpty(_Theme.HColor.Name))
|
||||||
HighlightColor = CBase.Theme.GetColor(_Theme.HColor.Name, _PartyModeID);
|
HighlightColor = CBase.Theme.GetColor(_Theme.HColor.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
HighlightColor = _Theme.HColor.Color;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(_Theme.ArrowColor.Name))
|
if (!String.IsNullOrEmpty(_Theme.ArrowColor.Name))
|
||||||
ColorArrow = CBase.Theme.GetColor(_Theme.ArrowColor.Name, _PartyModeID);
|
ColorArrow = CBase.Theme.GetColor(_Theme.ArrowColor.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
ColorArrow = _Theme.ArrowColor.Color;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(_Theme.ArrowSColor.Name))
|
if (!String.IsNullOrEmpty(_Theme.ArrowSColor.Name))
|
||||||
SelColorArrow = CBase.Theme.GetColor(_Theme.ArrowSColor.Name, _PartyModeID);
|
SelColorArrow = CBase.Theme.GetColor(_Theme.ArrowSColor.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
SelColorArrow = _Theme.ArrowSColor.Color;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(_Theme.TextColor.Name))
|
if (!String.IsNullOrEmpty(_Theme.TextColor.Name))
|
||||||
TextColor = CBase.Theme.GetColor(_Theme.TextColor.Name, _PartyModeID);
|
TextColor = CBase.Theme.GetColor(_Theme.TextColor.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
TextColor = _Theme.TextColor.Color;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(_Theme.TextSColor.Name))
|
if (!String.IsNullOrEmpty(_Theme.TextSColor.Name))
|
||||||
SelTextColor = CBase.Theme.GetColor(_Theme.TextSColor.Name, _PartyModeID);
|
SelTextColor = CBase.Theme.GetColor(_Theme.TextSColor.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
SelTextColor = _Theme.TextSColor.Color;
|
||||||
|
|
||||||
|
Rect = _Theme.Rect;
|
||||||
|
RectArrowLeft = _Theme.RectArrowLeft;
|
||||||
|
RectArrowRight = _Theme.RectArrowRight;
|
||||||
|
|
||||||
|
NumVisible = _Theme.NumVisible;
|
||||||
|
|
||||||
|
TextH = _Theme.TextH;
|
||||||
|
TextRelativeX = _Theme.TextRelativeX;
|
||||||
|
TextRelativeY = _Theme.TextRelativeY;
|
||||||
|
MaxW = _Theme.TextMaxW;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReloadTextures()
|
public void ReloadTextures()
|
||||||
|
|||||||
@@ -261,6 +261,16 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
Color = _Theme.Color.Color;
|
||||||
|
|
||||||
|
Rect = new SRectF(_Theme.Rect);
|
||||||
|
Reflection = _Theme.Reflection.Enabled;
|
||||||
|
if (Reflection)
|
||||||
|
{
|
||||||
|
ReflectionSpace = _Theme.Reflection.Height;
|
||||||
|
ReflectionHeight = _Theme.Reflection.Space;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReloadTextures()
|
public void ReloadTextures()
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ namespace VocaluxeLib.Menu
|
|||||||
public float Z;
|
public float Z;
|
||||||
[XmlElement("H")]
|
[XmlElement("H")]
|
||||||
public float Height;
|
public float Height;
|
||||||
|
[XmlElement("MaxW")]
|
||||||
|
public float MaxWidth;
|
||||||
public SThemeColor Color;
|
public SThemeColor Color;
|
||||||
public SThemeColor SColor; //for Buttons
|
public SThemeColor SColor; //for Buttons
|
||||||
[XmlElement("Align")]
|
[XmlElement("Align")]
|
||||||
@@ -57,6 +59,7 @@ namespace VocaluxeLib.Menu
|
|||||||
Y = theme.Y;
|
Y = theme.Y;
|
||||||
Z = theme.Z;
|
Z = theme.Z;
|
||||||
Height = theme.Height;
|
Height = theme.Height;
|
||||||
|
MaxWidth = theme.MaxWidth;
|
||||||
Color = new SThemeColor(theme.Color);
|
Color = new SThemeColor(theme.Color);
|
||||||
SColor = new SThemeColor(theme.SColor);
|
SColor = new SThemeColor(theme.SColor);
|
||||||
Align = theme.Align;
|
Align = theme.Align;
|
||||||
@@ -423,6 +426,7 @@ namespace VocaluxeLib.Menu
|
|||||||
_Theme.ResizeAlign = _ResizeAlign;
|
_Theme.ResizeAlign = _ResizeAlign;
|
||||||
_Theme.SColor.Color = SelColor;
|
_Theme.SColor.Color = SelColor;
|
||||||
_Theme.Style = _Style;
|
_Theme.Style = _Style;
|
||||||
|
_Theme.MaxWidth = _MaxWidth;
|
||||||
_Theme.X = _X;
|
_Theme.X = _X;
|
||||||
_Theme.Y = _Y;
|
_Theme.Y = _Y;
|
||||||
_Theme.Z = _Z;
|
_Theme.Z = _Z;
|
||||||
@@ -588,9 +592,32 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
if (!String.IsNullOrEmpty(_Theme.Color.Name))
|
||||||
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
Color = CBase.Theme.GetColor(_Theme.Color.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
Color = new SColorF(_Theme.Color.Color);
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
if (!String.IsNullOrEmpty(_Theme.SColor.Name))
|
||||||
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
|
SelColor = CBase.Theme.GetColor(_Theme.SColor.Name, _PartyModeID);
|
||||||
|
else
|
||||||
|
SelColor = new SColorF(_Theme.SColor.Color);
|
||||||
|
|
||||||
|
_X = _Theme.X;
|
||||||
|
_Y = _Theme.Y;
|
||||||
|
_Z = _Theme.Z;
|
||||||
|
_Height = _Theme.Height;
|
||||||
|
_MaxWidth = _Theme.MaxWidth;
|
||||||
|
_Align = _Theme.Align;
|
||||||
|
_ResizeAlign = _Theme.ResizeAlign;
|
||||||
|
_Style = _Theme.Style;
|
||||||
|
_Font = _Theme.Font;
|
||||||
|
|
||||||
|
if (_Theme.Reflection.Enabled)
|
||||||
|
{
|
||||||
|
ReflectionSpace = _Theme.Reflection.Space;
|
||||||
|
ReflectionHeight = _Theme.Reflection.Height;
|
||||||
|
}
|
||||||
|
|
||||||
|
Text = _Theme.Text;
|
||||||
|
Selected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReloadTextures()
|
public void ReloadTextures()
|
||||||
|
|||||||
Reference in new issue
Block a user