Extracted List View parameters to ScreenSong.xml
This commit is contained in:
1 parent
42d98070f9
commit
ec791c100e
3 files changed
+190
-25
No files matched your search
@@ -810,7 +810,7 @@
|
||||
<Rect>
|
||||
<X>40</X>
|
||||
<Y>40</Y>
|
||||
<W>360</W>
|
||||
<W>3600</W>
|
||||
<H>550</H>
|
||||
<Z>-1</Z>
|
||||
</Rect>
|
||||
@@ -860,6 +860,128 @@
|
||||
</Rect>
|
||||
</StaticMedleyTagIcon>
|
||||
</SongMenuTileBoard>
|
||||
|
||||
<SongMenuList>
|
||||
<ListLength>20</ListLength>
|
||||
<SpaceW>10</SpaceW>
|
||||
<SpaceH>10</SpaceH>
|
||||
<TileRect>
|
||||
<X>410</X>
|
||||
<Y>40</Y>
|
||||
<W>830</W>
|
||||
<H>550</H>
|
||||
<Z>-1</Z>
|
||||
</TileRect>
|
||||
<TextArtist Name="TextArtist">
|
||||
<X>222</X>
|
||||
<Y>416</Y>
|
||||
<Z>-1.01</Z>
|
||||
<H>39</H>
|
||||
<MaxW>340</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
<Align>Center</Align>
|
||||
<ResizeAlign>Top</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text />
|
||||
</TextArtist>
|
||||
<TextTitle Name="TextTitle">
|
||||
<X>222</X>
|
||||
<Y>456</Y>
|
||||
<Z>-1.01</Z>
|
||||
<H>32</H>
|
||||
<MaxW>340</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
<Align>Center</Align>
|
||||
<ResizeAlign>Top</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text />
|
||||
</TextTitle>
|
||||
<TextSongLength Name="TextSongLength">
|
||||
<X>222</X>
|
||||
<Y>490</Y>
|
||||
<Z>-1.01</Z>
|
||||
<H>28</H>
|
||||
<MaxW>340</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
<Align>Center</Align>
|
||||
<ResizeAlign>Top</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text />
|
||||
</TextSongLength>
|
||||
<StaticCoverBig Name="StaticCoverBig">
|
||||
<Skin>CoverBackground</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>40</X>
|
||||
<Y>40</Y>
|
||||
<W>360</W>
|
||||
<H>360</H>
|
||||
<Z>-1</Z>
|
||||
</Rect>
|
||||
</StaticCoverBig>
|
||||
<StaticTextBG Name="StaticTextBG">
|
||||
<Skin>CoverBackground</Skin>
|
||||
<Color Name="StaticColor" />
|
||||
<Rect>
|
||||
<X>40</X>
|
||||
<Y>40</Y>
|
||||
<W>3600</W>
|
||||
<H>550</H>
|
||||
<Z>-1</Z>
|
||||
</Rect>
|
||||
</StaticTextBG>
|
||||
<StaticDuetIcon Name="StaticDuetIcon">
|
||||
<Skin>DuetIcon</Skin>
|
||||
<Color Name="StaticColor" />
|
||||
<Rect>
|
||||
<X>200</X>
|
||||
<Y>530</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>-1</Z>
|
||||
</Rect>
|
||||
</StaticDuetIcon>
|
||||
<StaticVideoIcon Name="StaticVideoIcon">
|
||||
<Skin>VideoIcon</Skin>
|
||||
<Color Name="StaticColor" />
|
||||
<Rect>
|
||||
<X>120</X>
|
||||
<Y>530</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>-1</Z>
|
||||
</Rect>
|
||||
</StaticVideoIcon>
|
||||
<StaticMedleyCalcIcon Name="StaticMedleyCalcIcon">
|
||||
<Skin>MedleyCalcIcon</Skin>
|
||||
<Color Name="StaticColor" />
|
||||
<Rect>
|
||||
<X>280</X>
|
||||
<Y>530</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>-1</Z>
|
||||
</Rect>
|
||||
</StaticMedleyCalcIcon>
|
||||
<StaticMedleyTagIcon Name="StaticMedleyTagIcon">
|
||||
<Skin>MedleyTagIcon</Skin>
|
||||
<Color Name="StaticColor" />
|
||||
<Rect>
|
||||
<X>280</X>
|
||||
<Y>530</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>-1</Z>
|
||||
</Rect>
|
||||
</StaticMedleyTagIcon>
|
||||
</SongMenuList>
|
||||
|
||||
</SongMenu>
|
||||
</SongMenus>
|
||||
<Lyrics />
|
||||
|
||||
@@ -39,9 +39,40 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
//public SThemeSongMenuBook songMenuBook;
|
||||
//public SThemeSongMenuDreidel songMenuDreidel;
|
||||
//public SThemeSongMenuList songMenuList;
|
||||
public SThemeSongMenuList SongMenuList;
|
||||
public SThemeSongMenuTileBoard SongMenuTileBoard;
|
||||
}
|
||||
public struct SThemeSongMenuList
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of visible songs in list
|
||||
/// </summary>
|
||||
public int ListLength;
|
||||
|
||||
/// <summary>
|
||||
/// Space between tiles horizontal
|
||||
/// </summary>
|
||||
public float SpaceW;
|
||||
|
||||
/// <summary>
|
||||
/// Space between tiles vertical
|
||||
/// </summary>
|
||||
public float SpaceH;
|
||||
|
||||
public SRectF TileRect;
|
||||
|
||||
public SThemeText TextArtist;
|
||||
public SThemeText TextTitle;
|
||||
public SThemeText TextSongLength;
|
||||
|
||||
public SThemeStatic StaticCoverBig;
|
||||
public SThemeStatic StaticTextBG;
|
||||
public SThemeStatic StaticDuetIcon;
|
||||
public SThemeStatic StaticVideoIcon;
|
||||
public SThemeStatic StaticMedleyCalcIcon;
|
||||
public SThemeStatic StaticMedleyTagIcon;
|
||||
}
|
||||
|
||||
|
||||
public struct SThemeSongMenuTileBoard
|
||||
{
|
||||
@@ -215,6 +246,18 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuTileBoard/TileRectSmallH", ref _Theme.SongMenuTileBoard.TileRectSmall.H);
|
||||
#endregion SongMenuTileBoard
|
||||
|
||||
#region SongMenuList
|
||||
ThemeLoaded &= xmlReader.TryGetIntValue(item + "/SongMenuList/ListLength", ref _Theme.SongMenuList.ListLength);
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/SpaceW", ref _Theme.SongMenuList.SpaceW);
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/SpaceH", ref _Theme.SongMenuList.SpaceH);
|
||||
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectX", ref _Theme.SongMenuList.TileRect.X);
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectY", ref _Theme.SongMenuList.TileRect.Y);
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectZ", ref _Theme.SongMenuList.TileRect.Z);
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectW", ref _Theme.SongMenuList.TileRect.W);
|
||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectH", ref _Theme.SongMenuList.TileRect.H);
|
||||
#endregion SongMenuList
|
||||
|
||||
if (ThemeLoaded)
|
||||
{
|
||||
_Theme.Name = elementName;
|
||||
|
||||
@@ -50,8 +50,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private int _TileW;
|
||||
private int _TileH;
|
||||
|
||||
//TODO: make variable list length
|
||||
private int _ListLength = 15;
|
||||
private int _ListLength;
|
||||
private float _CoverTileWidth;
|
||||
private float _ListTextWidth;
|
||||
|
||||
@@ -114,31 +113,32 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
public CSongMenuList(SThemeSongMenu theme, int partyModeID) : base(theme, partyModeID)
|
||||
{
|
||||
_SpaceW = _Theme.SongMenuTileBoard.SpaceW;
|
||||
_SpaceH = _Theme.SongMenuTileBoard.SpaceH;
|
||||
_Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID);
|
||||
_Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID);
|
||||
_SongLength = new CText(_Theme.SongMenuTileBoard.TextSongLength, _PartyModeID);
|
||||
_CoverBig = new CStatic(_Theme.SongMenuTileBoard.StaticCoverBig, _PartyModeID);
|
||||
_TextBG = new CStatic(_Theme.SongMenuTileBoard.StaticTextBG, _PartyModeID);
|
||||
_DuetIcon = new CStatic(_Theme.SongMenuTileBoard.StaticDuetIcon, _PartyModeID);
|
||||
_VideoIcon = new CStatic(_Theme.SongMenuTileBoard.StaticVideoIcon, _PartyModeID);
|
||||
_MedleyCalcIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyCalcIcon, _PartyModeID);
|
||||
_MedleyTagIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyTagIcon, _PartyModeID);
|
||||
_ListLength = _Theme.SongMenuList.ListLength;
|
||||
_SpaceW = _Theme.SongMenuList.SpaceW;
|
||||
_SpaceH = _Theme.SongMenuList.SpaceH;
|
||||
_Artist = new CText(_Theme.SongMenuList.TextArtist, _PartyModeID);
|
||||
_Title = new CText(_Theme.SongMenuList.TextTitle, _PartyModeID);
|
||||
_SongLength = new CText(_Theme.SongMenuList.TextSongLength, _PartyModeID);
|
||||
_CoverBig = new CStatic(_Theme.SongMenuList.StaticCoverBig, _PartyModeID);
|
||||
_TextBG = new CStatic(_Theme.SongMenuList.StaticTextBG, _PartyModeID);
|
||||
_DuetIcon = new CStatic(_Theme.SongMenuList.StaticDuetIcon, _PartyModeID);
|
||||
_VideoIcon = new CStatic(_Theme.SongMenuList.StaticVideoIcon, _PartyModeID);
|
||||
_MedleyCalcIcon = new CStatic(_Theme.SongMenuList.StaticMedleyCalcIcon, _PartyModeID);
|
||||
_MedleyTagIcon = new CStatic(_Theme.SongMenuList.StaticMedleyTagIcon, _PartyModeID);
|
||||
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
}
|
||||
|
||||
private void _ReadSubTheme()
|
||||
{
|
||||
_Theme.SongMenuTileBoard.TextArtist = (SThemeText)_Artist.GetTheme();
|
||||
_Theme.SongMenuTileBoard.TextSongLength = (SThemeText)_SongLength.GetTheme();
|
||||
_Theme.SongMenuTileBoard.TextTitle = (SThemeText)_Title.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticMedleyCalcIcon = (SThemeStatic)_MedleyCalcIcon.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticMedleyTagIcon = (SThemeStatic)_MedleyTagIcon.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticTextBG = (SThemeStatic)_TextBG.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticVideoIcon = (SThemeStatic)_VideoIcon.GetTheme();
|
||||
_Theme.SongMenuList.TextArtist = (SThemeText)_Artist.GetTheme();
|
||||
_Theme.SongMenuList.TextSongLength = (SThemeText)_SongLength.GetTheme();
|
||||
_Theme.SongMenuList.TextTitle = (SThemeText)_Title.GetTheme();
|
||||
_Theme.SongMenuList.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme();
|
||||
_Theme.SongMenuList.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme();
|
||||
_Theme.SongMenuList.StaticMedleyCalcIcon = (SThemeStatic)_MedleyCalcIcon.GetTheme();
|
||||
_Theme.SongMenuList.StaticMedleyTagIcon = (SThemeStatic)_MedleyTagIcon.GetTheme();
|
||||
_Theme.SongMenuList.StaticTextBG = (SThemeStatic)_TextBG.GetTheme();
|
||||
_Theme.SongMenuList.StaticVideoIcon = (SThemeStatic)_VideoIcon.GetTheme();
|
||||
}
|
||||
|
||||
public override object GetTheme()
|
||||
@@ -157,7 +157,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
private void _InitTiles()
|
||||
{
|
||||
MaxRect = _Theme.SongMenuTileBoard.TileRect;
|
||||
MaxRect = _Theme.SongMenuList.TileRect;
|
||||
|
||||
//keep tile ratio 3/2 so the covers still look nice.
|
||||
_CoverTileWidth = _ListLength * 3.0f / 2;
|
||||
|
||||
Reference in new issue
Block a user