Make option to autoplay previews on song selection

This commit is contained in:
Jiiniasu committed 2017-11-06 19:33:03 +01:00
1 parent f5b83608b0
commit c31fdb7839
9 files changed
+112 -6

No files matched your search

+1
View File
@@ -188,6 +188,7 @@
<string name="TR_SCREENOGAME_SONGMENU">Song-menu style</string>
<string name="TR_SCREENOGAME_SONGSORTING">Song sorting</string>
<string name="TR_SCREENOGAME_TABS">Tabs</string>
<string name="TR_SCREENOGAME_AUTOPLAYPREVIEWS">Autoplay song previews</string>
<string name="TR_SCREENOGAME_DIFFICULTY">Game difficulty</string>
<string name="TR_SCREENOGAME_TIMERMODE">Timer mode</string>
<string name="TR_SCREENOGAME_HIGHSCORESTYLE">Highscore style</string>
@@ -1,5 +1,10 @@
ScreenOptionsGame
++++++++++
Version 4:
Add:
<SelectSlideAutoplayPreviews>
++++++++++
Version 3:
@@ -2,7 +2,7 @@
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Informations>
<ScreenName>ScreenOptionsGame</ScreenName>
<ScreenVersion>3</ScreenVersion>
<ScreenVersion>4</ScreenVersion>
</Informations>
<Backgrounds>
<Background Name="Background1">
@@ -111,7 +111,7 @@
<Font>Outline</Font>
<Text>TR_SCREENOGAME_TABS</Text>
</Text>
<Text Name="TextTimerMode">
<Text Name="TextAutoplayPreviews">
<X>75</X>
<Y>407</Y>
<Z>0</Z>
@@ -123,11 +123,25 @@
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text>TR_SCREENOGAME_AUTOPLAYPREVIEWS</Text>
</Text>
<Text Name="TextTimerMode">
<X>75</X>
<Y>467</Y>
<Z>0</Z>
<H>27</H>
<MaxW>0</MaxW>
<Color Name="TextColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text>TR_SCREENOGAME_TIMERMODE</Text>
</Text>
<Text Name="TextHighScoreStyle">
<X>75</X>
<Y>467</Y>
<Y>527</Y>
<Z>0</Z>
<H>27</H>
<MaxW>0</MaxW>
@@ -425,7 +439,7 @@
<TextStyle>Bold</TextStyle>
<NumVisible>2</NumVisible>
</SelectSlide>
<SelectSlide Name="SelectSlideTimerMode">
<SelectSlide Name="SelectSlideAutoplayPreviews">
<Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
@@ -467,7 +481,7 @@
<TextStyle>Bold</TextStyle>
<NumVisible>3</NumVisible>
</SelectSlide>
<SelectSlide Name="SelectSlideHighscoreStyle">
<SelectSlide Name="SelectSlideTimerMode">
<Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
@@ -509,6 +523,48 @@
<TextStyle>Bold</TextStyle>
<NumVisible>2</NumVisible>
</SelectSlide>
<SelectSlide Name="SelectSlideHighscoreStyle">
<Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
<X>500</X>
<Y>520</Y>
<W>715</W>
<H>50</H>
<Z>0</Z>
</Rect>
<RectArrowLeft>
<X>505</X>
<Y>525</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowLeft>
<RectArrowRight>
<X>1170</X>
<Y>525</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowRight>
<Color Name="SelectSlideColor" />
<SelColor Name="SelectSlideSelColor" />
<ArrowColor Name="ArrowColor" />
<ArrowSelColor Name="ArrowSelColor" />
<TextColor Name="TextColorAlpha" />
<TextSelColor Name="TextSelColor" />
<TextH>27</TextH>
<TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY>
<TextMaxW>200</TextMaxW>
<TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle>
<NumVisible>2</NumVisible>
</SelectSlide>
</SelectSlides>
<SingNotes />
<NameSelections />
+3
View File
@@ -171,6 +171,7 @@ namespace Vocaluxe.Base
[DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)] public ETimerMode TimerMode;
[XmlAltName("NumPlayer"), DefaultValue(2)] public int NumPlayers;
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn Tabs;
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn AutoplayPreviews;
[DefaultValue(ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM)] public ELyricsPosition LyricsPosition;
[DefaultValue(0.1f)] public float MinLineBreakTime; //Minimum time to show the text before it is (to be) sung (if possible)
[XmlArrayItem("Player"), XmlArray] public string[] Players;
@@ -521,6 +522,8 @@ namespace Vocaluxe.Base
return "NumPlayers: 1.." + CSettings.MaxNumPlayer;
case "Tabs":
return "Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)));
case "AutoplayPreviews":
return "Automatically play song preview when selected: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)));
case "LyricsPosition":
return "Position if lyrics on screen: " + CHelper.ListStrings(Enum.GetNames(typeof(ELyricsPosition)));
case "MinLineBreakTime":
+5
View File
@@ -141,6 +141,11 @@ namespace Vocaluxe.Base
return CConfig.Config.Game.Tabs;
}
public EOffOn GetAutoplayPreviews()
{
return CConfig.Config.Game.AutoplayPreviews;
}
public EOffOn GetIgnoreArticles()
{
return CConfig.Config.Game.IgnoreArticles;
+4 -1
View File
@@ -27,7 +27,7 @@ namespace Vocaluxe.Screens
// Version number for theme files. Increment it, if you've changed something on the theme files!
protected override int _ScreenVersion
{
get { return 3; }
get { return 4; }
}
private const string _SelectSlideLanguage = "SelectSlideLanguage";
@@ -35,6 +35,7 @@ namespace Vocaluxe.Screens
private const string _SelectSlideSongMenu = "SelectSlideSongMenu";
private const string _SelectSlideSongSorting = "SelectSlideSongSorting";
private const string _SelectSlideTabs = "SelectSlideTabs";
private const string _SelectSlideAutoplayPreviews = "SelectSlideAutoplayPreviews";
private const string _SelectSlideTimerMode = "SelectSlideTimerMode";
private const string _SelectSlideHighscoreStyle = "SelectSlideHighscoreStyle";
@@ -60,6 +61,7 @@ namespace Vocaluxe.Screens
_SelectSlides[_SelectSlideSongMenu].SetValues<ESongMenu>((int)CConfig.SongMenu);
_SelectSlides[_SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.Config.Game.SongSorting);
_SelectSlides[_SelectSlideTabs].SetValues<EOffOn>((int)CConfig.Config.Game.Tabs);
_SelectSlides[_SelectSlideAutoplayPreviews].SetValues<EOffOn>((int)CConfig.Config.Game.AutoplayPreviews);
_SelectSlides[_SelectSlideTimerMode].SetValues<ETimerMode>((int)CConfig.Config.Game.TimerMode);
_SelectSlides[_SelectSlideHighscoreStyle].SetValues<EHighscoreStyle>((int)CConfig.Config.Game.HighscoreStyle);
}
@@ -142,6 +144,7 @@ namespace Vocaluxe.Screens
CConfig.SongMenu = (ESongMenu)_SelectSlides[_SelectSlideSongMenu].Selection;
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
CConfig.Config.Game.Tabs = (EOffOn)_SelectSlides[_SelectSlideTabs].Selection;
CConfig.Config.Game.AutoplayPreviews = (EOffOn)_SelectSlides[_SelectSlideAutoplayPreviews].Selection;
CConfig.Config.Game.TimerMode = (ETimerMode)_SelectSlides[_SelectSlideTimerMode].Selection;
CConfig.Config.Game.HighscoreStyle = (EHighscoreStyle)_SelectSlides[_SelectSlideHighscoreStyle].Selection;
+1
View File
@@ -56,6 +56,7 @@ namespace VocaluxeLib
IEnumerable<string> GetSongFolders();
ESongSorting GetSongSorting();
EOffOn GetTabs();
EOffOn GetAutoplayPreviews();
EOffOn GetIgnoreArticles();
bool IsMicConfigured(int playerNr);
@@ -364,6 +364,10 @@ namespace VocaluxeLib.Menu.SongMenu
if (_SelectionNr > 0 && moveAllowed)
{
_SelectionNr--;
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;
@@ -372,6 +376,10 @@ namespace VocaluxeLib.Menu.SongMenu
if (moveAllowed)
{
_SelectionNr++;
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;
@@ -388,6 +396,10 @@ namespace VocaluxeLib.Menu.SongMenu
else if (_SelectionNr >= 1 && moveAllowed)
{
_SelectionNr -= 1;
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;
@@ -404,6 +416,10 @@ namespace VocaluxeLib.Menu.SongMenu
else if (moveAllowed)
{
_SelectionNr += 1;
if(CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;
@@ -355,6 +355,10 @@ namespace VocaluxeLib.Menu.SongMenu
if (_SelectionNr > 0 && moveAllowed)
{
_SelectionNr--;
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;
@@ -363,6 +367,10 @@ namespace VocaluxeLib.Menu.SongMenu
if (moveAllowed)
{
_SelectionNr++;
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;
@@ -379,6 +387,10 @@ namespace VocaluxeLib.Menu.SongMenu
else if (_SelectionNr >= _NumW && moveAllowed)
{
_SelectionNr -= _NumW;
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;
@@ -395,6 +407,10 @@ namespace VocaluxeLib.Menu.SongMenu
else if (moveAllowed)
{
_SelectionNr += _NumW;
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
{
_PreviewNr = _SelectionNr;
}
keyEvent.Handled = true;
}
break;