Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into player-guid
This commit is contained in:
commit
d140c2311a
15 files changed
+267
-49
No files matched your search
@@ -188,6 +188,7 @@
|
|||||||
<string name="TR_SCREENOGAME_SONGMENU">Song-menu style</string>
|
<string name="TR_SCREENOGAME_SONGMENU">Song-menu style</string>
|
||||||
<string name="TR_SCREENOGAME_SONGSORTING">Song sorting</string>
|
<string name="TR_SCREENOGAME_SONGSORTING">Song sorting</string>
|
||||||
<string name="TR_SCREENOGAME_TABS">Tabs</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_DIFFICULTY">Game difficulty</string>
|
||||||
<string name="TR_SCREENOGAME_TIMERMODE">Timer mode</string>
|
<string name="TR_SCREENOGAME_TIMERMODE">Timer mode</string>
|
||||||
<string name="TR_SCREENOGAME_HIGHSCORESTYLE">Highscore style</string>
|
<string name="TR_SCREENOGAME_HIGHSCORESTYLE">Highscore style</string>
|
||||||
|
|||||||
@@ -183,6 +183,7 @@
|
|||||||
<string name="TR_SCREENOGAME_SONGMENU">Låtmeny</string>
|
<string name="TR_SCREENOGAME_SONGMENU">Låtmeny</string>
|
||||||
<string name="TR_SCREENOGAME_SONGSORTING">Låtsortering</string>
|
<string name="TR_SCREENOGAME_SONGSORTING">Låtsortering</string>
|
||||||
<string name="TR_SCREENOGAME_TABS">Flikar</string>
|
<string name="TR_SCREENOGAME_TABS">Flikar</string>
|
||||||
|
<string name="TR_SCREENOGAME_AUTOPLAYPREVIEWS">Förhandsvisa låtar automatiskt</string>
|
||||||
<string name="TR_SCREENOGAME_DIFFICULTY">Spelets svårighetsgrad</string>
|
<string name="TR_SCREENOGAME_DIFFICULTY">Spelets svårighetsgrad</string>
|
||||||
<string name="TR_SCREENOGAME_TIMERMODE">Timerläge</string>
|
<string name="TR_SCREENOGAME_TIMERMODE">Timerläge</string>
|
||||||
<string name="TR_SCREENOGAME_HIGHSCORESTYLE">Topplistsvy</string>
|
<string name="TR_SCREENOGAME_HIGHSCORESTYLE">Topplistsvy</string>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
ScreenOptionsGame
|
ScreenOptionsGame
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 4:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<SelectSlideAutoplayPreviews>
|
||||||
++++++++++
|
++++++++++
|
||||||
Version 3:
|
Version 3:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<Informations>
|
<Informations>
|
||||||
<ScreenName>ScreenOptionsGame</ScreenName>
|
<ScreenName>ScreenOptionsGame</ScreenName>
|
||||||
<ScreenVersion>3</ScreenVersion>
|
<ScreenVersion>4</ScreenVersion>
|
||||||
</Informations>
|
</Informations>
|
||||||
<Backgrounds>
|
<Backgrounds>
|
||||||
<Background Name="Background1">
|
<Background Name="Background1">
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<Font>Outline</Font>
|
<Font>Outline</Font>
|
||||||
<Text>TR_SCREENOGAME_TABS</Text>
|
<Text>TR_SCREENOGAME_TABS</Text>
|
||||||
</Text>
|
</Text>
|
||||||
<Text Name="TextTimerMode">
|
<Text Name="TextAutoplayPreviews">
|
||||||
<X>75</X>
|
<X>75</X>
|
||||||
<Y>407</Y>
|
<Y>407</Y>
|
||||||
<Z>0</Z>
|
<Z>0</Z>
|
||||||
@@ -123,11 +123,25 @@
|
|||||||
<ResizeAlign>Center</ResizeAlign>
|
<ResizeAlign>Center</ResizeAlign>
|
||||||
<Style>Bold</Style>
|
<Style>Bold</Style>
|
||||||
<Font>Outline</Font>
|
<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>TR_SCREENOGAME_TIMERMODE</Text>
|
||||||
</Text>
|
</Text>
|
||||||
<Text Name="TextHighScoreStyle">
|
<Text Name="TextHighScoreStyle">
|
||||||
<X>75</X>
|
<X>75</X>
|
||||||
<Y>467</Y>
|
<Y>527</Y>
|
||||||
<Z>0</Z>
|
<Z>0</Z>
|
||||||
<H>27</H>
|
<H>27</H>
|
||||||
<MaxW>0</MaxW>
|
<MaxW>0</MaxW>
|
||||||
@@ -425,7 +439,7 @@
|
|||||||
<TextStyle>Bold</TextStyle>
|
<TextStyle>Bold</TextStyle>
|
||||||
<NumVisible>2</NumVisible>
|
<NumVisible>2</NumVisible>
|
||||||
</SelectSlide>
|
</SelectSlide>
|
||||||
<SelectSlide Name="SelectSlideTimerMode">
|
<SelectSlide Name="SelectSlideAutoplayPreviews">
|
||||||
<Skin/>
|
<Skin/>
|
||||||
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
||||||
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
||||||
@@ -467,7 +481,7 @@
|
|||||||
<TextStyle>Bold</TextStyle>
|
<TextStyle>Bold</TextStyle>
|
||||||
<NumVisible>3</NumVisible>
|
<NumVisible>3</NumVisible>
|
||||||
</SelectSlide>
|
</SelectSlide>
|
||||||
<SelectSlide Name="SelectSlideHighscoreStyle">
|
<SelectSlide Name="SelectSlideTimerMode">
|
||||||
<Skin/>
|
<Skin/>
|
||||||
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
||||||
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
||||||
@@ -509,6 +523,48 @@
|
|||||||
<TextStyle>Bold</TextStyle>
|
<TextStyle>Bold</TextStyle>
|
||||||
<NumVisible>2</NumVisible>
|
<NumVisible>2</NumVisible>
|
||||||
</SelectSlide>
|
</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>
|
</SelectSlides>
|
||||||
<SingNotes />
|
<SingNotes />
|
||||||
<NameSelections />
|
<NameSelections />
|
||||||
|
|||||||
+33
-11
@@ -171,6 +171,8 @@ namespace Vocaluxe.Base
|
|||||||
[DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)] public ETimerMode TimerMode;
|
[DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)] public ETimerMode TimerMode;
|
||||||
[XmlAltName("NumPlayer"), DefaultValue(2)] public int NumPlayers;
|
[XmlAltName("NumPlayer"), DefaultValue(2)] public int NumPlayers;
|
||||||
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn Tabs;
|
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn Tabs;
|
||||||
|
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn AutoplayPreviews;
|
||||||
|
[XmlAltName("AutoplayPreviewDelay"), DefaultValue(500)] public int AutoplayPreviewDelay;
|
||||||
[DefaultValue(ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM)] public ELyricsPosition LyricsPosition;
|
[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)
|
[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;
|
[XmlArrayItem("Player"), XmlArray] public string[] Players;
|
||||||
@@ -234,13 +236,14 @@ namespace Vocaluxe.Base
|
|||||||
public static event OnSongMenuChanged SongMenuChanged;
|
public static event OnSongMenuChanged SongMenuChanged;
|
||||||
|
|
||||||
//Folders
|
//Folders
|
||||||
|
//We need full path for folders for matching folder path with textfile path when loading
|
||||||
public static readonly List<string> SongFolders = new List<string>
|
public static readonly List<string> SongFolders = new List<string>
|
||||||
{
|
{
|
||||||
#if INSTALLER
|
#if INSTALLER
|
||||||
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs),
|
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs),
|
||||||
CSettings.FolderNameSongs
|
Path.Combine(CSettings.ProgramFolder, FolderNameSongs)
|
||||||
#elif WIN
|
#elif WIN
|
||||||
CSettings.FolderNameSongs
|
Path.Combine(CSettings.ProgramFolder, CSettings.FolderNameSongs)
|
||||||
#elif LINUX
|
#elif LINUX
|
||||||
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
|
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
|
||||||
#endif
|
#endif
|
||||||
@@ -378,15 +381,7 @@ namespace Vocaluxe.Base
|
|||||||
else
|
else
|
||||||
Config = xml.DeserializeString<SConfig>("<root />");
|
Config = xml.DeserializeString<SConfig>("<root />");
|
||||||
|
|
||||||
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
|
NormalizeSongPaths();
|
||||||
{
|
|
||||||
SongFolders.Clear();
|
|
||||||
SongFolders.AddRange(Config.Game.SongFolder);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Config.Game.SongFolder = SongFolders.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Config.Game.MinLineBreakTime < 0)
|
if (Config.Game.MinLineBreakTime < 0)
|
||||||
Config.Game.MinLineBreakTime = 0.1f;
|
Config.Game.MinLineBreakTime = 0.1f;
|
||||||
@@ -521,6 +516,10 @@ namespace Vocaluxe.Base
|
|||||||
return "NumPlayers: 1.." + CSettings.MaxNumPlayer;
|
return "NumPlayers: 1.." + CSettings.MaxNumPlayer;
|
||||||
case "Tabs":
|
case "Tabs":
|
||||||
return "Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)));
|
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 "AutoplayPreviewDelay":
|
||||||
|
return "Delay before playback of autoplay previews is started in milliseconds";
|
||||||
case "LyricsPosition":
|
case "LyricsPosition":
|
||||||
return "Position if lyrics on screen: " + CHelper.ListStrings(Enum.GetNames(typeof(ELyricsPosition)));
|
return "Position if lyrics on screen: " + CHelper.ListStrings(Enum.GetNames(typeof(ELyricsPosition)));
|
||||||
case "MinLineBreakTime":
|
case "MinLineBreakTime":
|
||||||
@@ -674,6 +673,29 @@ namespace Vocaluxe.Base
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set song path if none is find in config and check if every path exists
|
||||||
|
/// </summary>
|
||||||
|
public static void NormalizeSongPaths()
|
||||||
|
{
|
||||||
|
//Check if there are configured songfolders
|
||||||
|
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
|
||||||
|
{
|
||||||
|
SongFolders.Clear();
|
||||||
|
|
||||||
|
foreach (string folder in Config.Game.SongFolder)
|
||||||
|
{
|
||||||
|
//Check if folder exists
|
||||||
|
if (Directory.Exists(folder))
|
||||||
|
SongFolders.Add(folder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Test if songfolders are still empty or now empty
|
||||||
|
if(Config.Game.SongFolder.Length == 0)
|
||||||
|
Config.Game.SongFolder = SongFolders.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load command-line-parameters and their values to lists.
|
/// Load command-line-parameters and their values to lists.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -141,6 +141,16 @@ namespace Vocaluxe.Base
|
|||||||
return CConfig.Config.Game.Tabs;
|
return CConfig.Config.Game.Tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EOffOn GetAutoplayPreviews()
|
||||||
|
{
|
||||||
|
return CConfig.Config.Game.AutoplayPreviews;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetAutoplayPreviewDelay()
|
||||||
|
{
|
||||||
|
return CConfig.Config.Game.AutoplayPreviewDelay;
|
||||||
|
}
|
||||||
|
|
||||||
public EOffOn GetIgnoreArticles()
|
public EOffOn GetIgnoreArticles()
|
||||||
{
|
{
|
||||||
return CConfig.Config.Game.IgnoreArticles;
|
return CConfig.Config.Game.IgnoreArticles;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using VocaluxeLib;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Draw;
|
using VocaluxeLib.Draw;
|
||||||
using VocaluxeLib.Profile;
|
using VocaluxeLib.Profile;
|
||||||
@@ -296,7 +297,7 @@ namespace Vocaluxe.Base
|
|||||||
return new CProfile[0];
|
return new CProfile[0];
|
||||||
|
|
||||||
var list = new List<CProfile>(_Profiles.Values);
|
var list = new List<CProfile>(_Profiles.Values);
|
||||||
list.Sort(_CompareByPlayerName);
|
list.Sort(_AlphaNumericCompareByPlayerName);
|
||||||
return list.ToArray();
|
return list.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,9 +639,14 @@ namespace Vocaluxe.Base
|
|||||||
_ProfilesChanged = true;
|
_ProfilesChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int _CompareByPlayerName(CProfile a, CProfile b)
|
private static int _AlphaNumericCompareByPlayerName(CProfile a, CProfile b)
|
||||||
{
|
{
|
||||||
return String.CompareOrdinal(a.PlayerName, b.PlayerName);
|
return _PadNumbersInString(a.PlayerName).CompareTo(_PadNumbersInString(b.PlayerName));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string _PadNumbersInString(string text)
|
||||||
|
{
|
||||||
|
return Regex.Replace(text, "[0-9]+", match => match.Value.PadLeft(4, '0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CAvatar GetAvatarByFilename(string fileName)
|
public static CAvatar GetAvatarByFilename(string fileName)
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
_VideoTimer.Reset();
|
_VideoTimer.Reset();
|
||||||
_Finished = false;
|
_Finished = false;
|
||||||
|
if (_VideoStream == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
//CVideo.VdSkip(_VideoStream, 0f, 0f);
|
//CVideo.VdSkip(_VideoStream, 0f, 0f);
|
||||||
_VideoTimer.Start();
|
_VideoTimer.Start();
|
||||||
CVideo.Resume(_VideoStream);
|
CVideo.Resume(_VideoStream);
|
||||||
@@ -60,12 +64,19 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public void Pause()
|
public void Pause()
|
||||||
{
|
{
|
||||||
CVideo.Pause(_VideoStream);
|
if (_VideoStream != null)
|
||||||
|
{
|
||||||
|
CVideo.Pause(_VideoStream);
|
||||||
|
}
|
||||||
_VideoTimer.Stop();
|
_VideoTimer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Resume()
|
public void Resume()
|
||||||
{
|
{
|
||||||
|
if (_VideoStream == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
CVideo.Resume(_VideoStream);
|
CVideo.Resume(_VideoStream);
|
||||||
_VideoTimer.Start();
|
_VideoTimer.Start();
|
||||||
}
|
}
|
||||||
@@ -92,7 +103,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public void PreLoad()
|
public void PreLoad()
|
||||||
{
|
{
|
||||||
if (!_Loaded)
|
if (!_Loaded || _VideoStream == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -111,7 +122,10 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
CVideo.Close(ref _VideoStream);
|
if (_VideoStream != null)
|
||||||
|
{
|
||||||
|
CVideo.Close(ref _VideoStream);
|
||||||
|
}
|
||||||
_Loaded = false;
|
_Loaded = false;
|
||||||
_Finished = false;
|
_Finished = false;
|
||||||
_VideoTimer.Reset();
|
_VideoTimer.Reset();
|
||||||
|
|||||||
@@ -669,6 +669,7 @@ namespace Vocaluxe.Screens
|
|||||||
_Texts["TextPlayer" + i].Visible = false;
|
_Texts["TextPlayer" + i].Visible = false;
|
||||||
_Equalizers["EqualizerPlayer" + i].Visible = false;
|
_Equalizers["EqualizerPlayer" + i].Visible = false;
|
||||||
_SelectSlides["SelectSlideDuetPlayer" + i].Visible = false;
|
_SelectSlides["SelectSlideDuetPlayer" + i].Visible = false;
|
||||||
|
_ResetPlayerSelection(i - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace Vocaluxe.Screens
|
|||||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||||
protected override int _ScreenVersion
|
protected override int _ScreenVersion
|
||||||
{
|
{
|
||||||
get { return 3; }
|
get { return 4; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string _SelectSlideLanguage = "SelectSlideLanguage";
|
private const string _SelectSlideLanguage = "SelectSlideLanguage";
|
||||||
@@ -35,6 +35,7 @@ namespace Vocaluxe.Screens
|
|||||||
private const string _SelectSlideSongMenu = "SelectSlideSongMenu";
|
private const string _SelectSlideSongMenu = "SelectSlideSongMenu";
|
||||||
private const string _SelectSlideSongSorting = "SelectSlideSongSorting";
|
private const string _SelectSlideSongSorting = "SelectSlideSongSorting";
|
||||||
private const string _SelectSlideTabs = "SelectSlideTabs";
|
private const string _SelectSlideTabs = "SelectSlideTabs";
|
||||||
|
private const string _SelectSlideAutoplayPreviews = "SelectSlideAutoplayPreviews";
|
||||||
private const string _SelectSlideTimerMode = "SelectSlideTimerMode";
|
private const string _SelectSlideTimerMode = "SelectSlideTimerMode";
|
||||||
private const string _SelectSlideHighscoreStyle = "SelectSlideHighscoreStyle";
|
private const string _SelectSlideHighscoreStyle = "SelectSlideHighscoreStyle";
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ namespace Vocaluxe.Screens
|
|||||||
_SelectSlides[_SelectSlideSongMenu].SetValues<ESongMenu>((int)CConfig.SongMenu);
|
_SelectSlides[_SelectSlideSongMenu].SetValues<ESongMenu>((int)CConfig.SongMenu);
|
||||||
_SelectSlides[_SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.Config.Game.SongSorting);
|
_SelectSlides[_SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.Config.Game.SongSorting);
|
||||||
_SelectSlides[_SelectSlideTabs].SetValues<EOffOn>((int)CConfig.Config.Game.Tabs);
|
_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[_SelectSlideTimerMode].SetValues<ETimerMode>((int)CConfig.Config.Game.TimerMode);
|
||||||
_SelectSlides[_SelectSlideHighscoreStyle].SetValues<EHighscoreStyle>((int)CConfig.Config.Game.HighscoreStyle);
|
_SelectSlides[_SelectSlideHighscoreStyle].SetValues<EHighscoreStyle>((int)CConfig.Config.Game.HighscoreStyle);
|
||||||
}
|
}
|
||||||
@@ -142,6 +144,7 @@ namespace Vocaluxe.Screens
|
|||||||
CConfig.SongMenu = (ESongMenu)_SelectSlides[_SelectSlideSongMenu].Selection;
|
CConfig.SongMenu = (ESongMenu)_SelectSlides[_SelectSlideSongMenu].Selection;
|
||||||
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
|
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
|
||||||
CConfig.Config.Game.Tabs = (EOffOn)_SelectSlides[_SelectSlideTabs].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.TimerMode = (ETimerMode)_SelectSlides[_SelectSlideTimerMode].Selection;
|
||||||
CConfig.Config.Game.HighscoreStyle = (EHighscoreStyle)_SelectSlides[_SelectSlideHighscoreStyle].Selection;
|
CConfig.Config.Game.HighscoreStyle = (EHighscoreStyle)_SelectSlides[_SelectSlideHighscoreStyle].Selection;
|
||||||
|
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
private const string _TextSongName = "TextSongName";
|
private const string _TextSongName = "TextSongName";
|
||||||
private const string _TextTime = "TextTime";
|
private const string _TextTime = "TextTime";
|
||||||
private const string _TextPause = "TextPause";
|
|
||||||
private const string _TextDuetName1 = "TextDuetName1";
|
private const string _TextDuetName1 = "TextDuetName1";
|
||||||
private const string _TextDuetName2 = "TextDuetName2";
|
private const string _TextDuetName2 = "TextDuetName2";
|
||||||
private const string _TextMedleyCountdown = "TextMedleyCountdown";
|
private const string _TextMedleyCountdown = "TextMedleyCountdown";
|
||||||
private string[,,] _TextScores;
|
private string[,,] _TextScores;
|
||||||
private string[,,] _TextNames;
|
private string[,,] _TextNames;
|
||||||
|
private List<string> _TextsPause;
|
||||||
|
|
||||||
private const string _StaticSongText = "StaticSongText";
|
private const string _StaticSongText = "StaticSongText";
|
||||||
private const string _StaticLyrics = "StaticLyrics";
|
private const string _StaticLyrics = "StaticLyrics";
|
||||||
@@ -69,7 +69,7 @@ namespace Vocaluxe.Screens
|
|||||||
private const string _StaticLyricHelper = "StaticLyricHelper";
|
private const string _StaticLyricHelper = "StaticLyricHelper";
|
||||||
private const string _StaticLyricHelperDuet = "StaticLyricHelperDuet";
|
private const string _StaticLyricHelperDuet = "StaticLyricHelperDuet";
|
||||||
private const string _StaticLyricHelperTop = "StaticLyricHelperTop";
|
private const string _StaticLyricHelperTop = "StaticLyricHelperTop";
|
||||||
private const string _StaticPauseBG = "StaticPauseBG";
|
private List<string> _StaticsPause;
|
||||||
|
|
||||||
private string[,,] _StaticScores;
|
private string[,,] _StaticScores;
|
||||||
private string[,,] _StaticAvatars;
|
private string[,,] _StaticAvatars;
|
||||||
@@ -139,7 +139,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
|
|
||||||
var texts = new List<string> { _TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown };
|
var texts = new List<string> { _TextSongName, _TextTime, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown };
|
||||||
_BuildTextStrings(texts);
|
_BuildTextStrings(texts);
|
||||||
_ThemeTexts = texts.ToArray();
|
_ThemeTexts = texts.ToArray();
|
||||||
|
|
||||||
@@ -156,9 +156,8 @@ namespace Vocaluxe.Screens
|
|||||||
_StaticTimePointer,
|
_StaticTimePointer,
|
||||||
_StaticLyricHelper,
|
_StaticLyricHelper,
|
||||||
_StaticLyricHelperDuet,
|
_StaticLyricHelperDuet,
|
||||||
_StaticLyricHelperTop,
|
_StaticLyricHelperTop
|
||||||
_StaticPauseBG
|
};
|
||||||
};
|
|
||||||
_BuildStaticStrings(ref statics);
|
_BuildStaticStrings(ref statics);
|
||||||
_ThemeStatics = statics.ToArray();
|
_ThemeStatics = statics.ToArray();
|
||||||
|
|
||||||
@@ -181,6 +180,21 @@ namespace Vocaluxe.Screens
|
|||||||
_TimerDuetText2 = new Stopwatch();
|
_TimerDuetText2 = new Stopwatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void LoadTheme(string xmlPath)
|
||||||
|
{
|
||||||
|
base.LoadTheme(xmlPath);
|
||||||
|
|
||||||
|
_StaticsPause = new List<string>();
|
||||||
|
_TextsPause = new List<string>();
|
||||||
|
|
||||||
|
//Automatically find statics and texts with pause prefix
|
||||||
|
foreach (CStatic s in _Statics.Where(s => s.ThemeLoaded && s.GetThemeName().StartsWith("StaticPause")))
|
||||||
|
_StaticsPause.Add(s.GetThemeName());
|
||||||
|
|
||||||
|
foreach (CText t in _Texts.Where(s => s.ThemeLoaded && s.GetThemeName().StartsWith("TextPause")))
|
||||||
|
_TextsPause.Add(t.GetThemeName());
|
||||||
|
}
|
||||||
|
|
||||||
public override bool HandleInput(SKeyEvent keyEvent)
|
public override bool HandleInput(SKeyEvent keyEvent)
|
||||||
{
|
{
|
||||||
base.HandleInput(keyEvent);
|
base.HandleInput(keyEvent);
|
||||||
@@ -226,7 +240,7 @@ namespace Vocaluxe.Screens
|
|||||||
if (CGame.NumRounds > CGame.RoundNr)
|
if (CGame.NumRounds > CGame.RoundNr)
|
||||||
{
|
{
|
||||||
if (keyEvent.ModCtrl)
|
if (keyEvent.ModCtrl)
|
||||||
_LoadNextSong();
|
_NextSong();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Keys.W:
|
case Keys.W:
|
||||||
@@ -248,7 +262,7 @@ namespace Vocaluxe.Screens
|
|||||||
_Stop();
|
_Stop();
|
||||||
if (_Buttons[_ButtonSkip].Selected)
|
if (_Buttons[_ButtonSkip].Selected)
|
||||||
{
|
{
|
||||||
_LoadNextSong();
|
_NextSong();
|
||||||
_SetPause(false);
|
_SetPause(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,7 +307,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
if (_Buttons[_ButtonSkip].Selected)
|
if (_Buttons[_ButtonSkip].Selected)
|
||||||
{
|
{
|
||||||
_LoadNextSong();
|
_NextSong();
|
||||||
_SetPause(false);
|
_SetPause(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -316,7 +330,7 @@ namespace Vocaluxe.Screens
|
|||||||
finish = true;
|
finish = true;
|
||||||
|
|
||||||
if (finish && !_FadeOut)
|
if (finish && !_FadeOut)
|
||||||
_LoadNextSong();
|
_NextSong();
|
||||||
|
|
||||||
_UpdateSongText();
|
_UpdateSongText();
|
||||||
_UpdateDuetNames();
|
_UpdateDuetNames();
|
||||||
@@ -449,7 +463,7 @@ namespace Vocaluxe.Screens
|
|||||||
base.OnShowFinish();
|
base.OnShowFinish();
|
||||||
|
|
||||||
CGame.Start();
|
CGame.Start();
|
||||||
_LoadNextSong();
|
_NextSong();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Draw()
|
public override void Draw()
|
||||||
@@ -533,12 +547,40 @@ namespace Vocaluxe.Screens
|
|||||||
_Texts[_TextMedleyCountdown].Text = String.Empty;
|
_Texts[_TextMedleyCountdown].Text = String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _LoadNextSong()
|
private void _RestartRound()
|
||||||
|
{
|
||||||
|
_CloseSong();
|
||||||
|
|
||||||
|
CGame.ResetPlayer();
|
||||||
|
_LoadCurrentSong();
|
||||||
|
|
||||||
|
_StartSong();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _RestartGame()
|
||||||
|
{
|
||||||
|
_CloseSong();
|
||||||
|
|
||||||
|
CGame.Reset();
|
||||||
|
CGame.ResetPlayer();
|
||||||
|
CGame.NextRound();
|
||||||
|
_LoadCurrentSong();
|
||||||
|
|
||||||
|
_StartSong();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _NextSong()
|
||||||
{
|
{
|
||||||
_CloseSong();
|
_CloseSong();
|
||||||
|
|
||||||
CGame.NextRound();
|
CGame.NextRound();
|
||||||
|
_LoadCurrentSong();
|
||||||
|
|
||||||
|
_StartSong();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _LoadCurrentSong()
|
||||||
|
{
|
||||||
if (CGame.IsFinished())
|
if (CGame.IsFinished())
|
||||||
{
|
{
|
||||||
_FinishedSinging();
|
_FinishedSinging();
|
||||||
@@ -640,8 +682,6 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
if (!song.IsDuet)
|
if (!song.IsDuet)
|
||||||
_TimerSongText.Start();
|
_TimerSongText.Start();
|
||||||
|
|
||||||
_StartSong();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _SetNormalLyricsVisibility()
|
private void _SetNormalLyricsVisibility()
|
||||||
@@ -689,7 +729,10 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
//Need this to set other songs to points-var
|
//Need this to set other songs to points-var
|
||||||
while (!CGame.IsFinished())
|
while (!CGame.IsFinished())
|
||||||
|
{
|
||||||
CGame.NextRound();
|
CGame.NextRound();
|
||||||
|
CGame.ResetPlayer();
|
||||||
|
}
|
||||||
|
|
||||||
_FinishedSinging();
|
_FinishedSinging();
|
||||||
}
|
}
|
||||||
@@ -826,11 +869,17 @@ namespace Vocaluxe.Screens
|
|||||||
private void _SetPause(bool paused)
|
private void _SetPause(bool paused)
|
||||||
{
|
{
|
||||||
_Pause = paused;
|
_Pause = paused;
|
||||||
_Statics[_StaticPauseBG].Visible = _Pause;
|
|
||||||
_Texts[_TextPause].Visible = _Pause;
|
foreach(String s in _StaticsPause)
|
||||||
|
_Statics[s].Visible = _Pause;
|
||||||
|
|
||||||
|
foreach(String s in _TextsPause)
|
||||||
|
_Texts[s].Visible = _Pause;
|
||||||
|
|
||||||
_Buttons[_ButtonCancel].Visible = _Pause;
|
_Buttons[_ButtonCancel].Visible = _Pause;
|
||||||
_Buttons[_ButtonContinue].Visible = _Pause;
|
_Buttons[_ButtonContinue].Visible = _Pause;
|
||||||
_Buttons[_ButtonSkip].Visible = _Pause && CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1;
|
_Buttons[_ButtonSkip].Visible = _Pause && CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1;
|
||||||
|
|
||||||
if (_Pause)
|
if (_Pause)
|
||||||
CSound.Pause(_CurrentStream);
|
CSound.Pause(_CurrentStream);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ namespace VocaluxeLib
|
|||||||
IEnumerable<string> GetSongFolders();
|
IEnumerable<string> GetSongFolders();
|
||||||
ESongSorting GetSongSorting();
|
ESongSorting GetSongSorting();
|
||||||
EOffOn GetTabs();
|
EOffOn GetTabs();
|
||||||
|
EOffOn GetAutoplayPreviews();
|
||||||
|
int GetAutoplayPreviewDelay();
|
||||||
EOffOn GetIgnoreArticles();
|
EOffOn GetIgnoreArticles();
|
||||||
|
|
||||||
bool IsMicConfigured(int playerNr);
|
bool IsMicConfigured(int playerNr);
|
||||||
|
|||||||
@@ -158,6 +158,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int _AutoplayDelayinMs = CBase.Config.GetAutoplayPreviewDelay();
|
||||||
|
protected System.Timers.Timer _AutoplayTimer = new System.Timers.Timer();
|
||||||
|
|
||||||
private SColorF _ColorInternal;
|
private SColorF _ColorInternal;
|
||||||
protected SColorF _Color
|
protected SColorF _Color
|
||||||
{
|
{
|
||||||
@@ -204,6 +207,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
public virtual void Init()
|
public virtual void Init()
|
||||||
{
|
{
|
||||||
_ResetPreview(false);
|
_ResetPreview(false);
|
||||||
|
_InitializeAutoplayTimer();
|
||||||
_Initialized = true;
|
_Initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,6 +362,42 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
_PreviewNrInternal = -1;
|
_PreviewNrInternal = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void _PreviewSelectedSong()
|
||||||
|
{
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void _InitializeAutoplayTimer()
|
||||||
|
{
|
||||||
|
_AutoplayTimer.Interval = _AutoplayDelayinMs;
|
||||||
|
_AutoplayTimer.AutoReset = false;
|
||||||
|
_AutoplayTimer.Elapsed += (object sender, System.Timers.ElapsedEventArgs e) =>
|
||||||
|
{
|
||||||
|
_PreviewSelectedSong();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void _AutoplayPreviewIfEnabled()
|
||||||
|
{
|
||||||
|
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
||||||
|
{
|
||||||
|
_PlayPreviewAfterDelay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void _PlayPreviewAfterDelay()
|
||||||
|
{
|
||||||
|
if (!_AutoplayTimer.Enabled)
|
||||||
|
{
|
||||||
|
_AutoplayTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_AutoplayTimer.Stop();
|
||||||
|
_AutoplayTimer.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region ThemeEdit
|
#region ThemeEdit
|
||||||
public void MoveElement(int stepX, int stepY)
|
public void MoveElement(int stepX, int stepY)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
public override void Update(SScreenSongOptions songOptions)
|
public override void Update(SScreenSongOptions songOptions)
|
||||||
{
|
{
|
||||||
if (songOptions.Selection.RandomOnly)
|
if (songOptions.Selection.RandomOnly)
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
|
|
||||||
if (_Length < 0 && CBase.Songs.IsInCategory() && CBase.BackgroundMusic.GetLength() > 0)
|
if (_Length < 0 && CBase.Songs.IsInCategory() && CBase.BackgroundMusic.GetLength() > 0)
|
||||||
_UpdateLength(CBase.Songs.GetVisibleSong(_PreviewNr));
|
_UpdateLength(CBase.Songs.GetVisibleSong(_PreviewNr));
|
||||||
@@ -300,7 +300,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
SetSelectedSong(_SelectionNr < 0 ? 0 : _SelectionNr);
|
SetSelectedSong(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||||
else
|
else
|
||||||
SetSelectedCategory(_SelectionNr < 0 ? 0 : _SelectionNr);
|
SetSelectedCategory(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
_UpdateListIfRequired();
|
_UpdateListIfRequired();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
{
|
{
|
||||||
if (_SelectionNr >= 0 && _PreviewNr != _SelectionNr)
|
if (_SelectionNr >= 0 && _PreviewNr != _SelectionNr)
|
||||||
{
|
{
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -364,6 +364,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (_SelectionNr > 0 && moveAllowed)
|
if (_SelectionNr > 0 && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr--;
|
_SelectionNr--;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -372,6 +373,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (moveAllowed)
|
if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr++;
|
_SelectionNr++;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -388,6 +390,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (_SelectionNr >= 1 && moveAllowed)
|
else if (_SelectionNr >= 1 && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr -= 1;
|
_SelectionNr -= 1;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -404,12 +407,13 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (moveAllowed)
|
else if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr += 1;
|
_SelectionNr += 1;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!CBase.Songs.IsInCategory())
|
if (!CBase.Songs.IsInCategory())
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
return keyEvent.Handled;
|
return keyEvent.Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,7 +473,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
{
|
{
|
||||||
if (_PreviewNr == _SelectionNr)
|
if (_PreviewNr == _SelectionNr)
|
||||||
return false;
|
return false;
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
EnterSelectedCategory();
|
EnterSelectedCategory();
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
public override void Update(SScreenSongOptions songOptions)
|
public override void Update(SScreenSongOptions songOptions)
|
||||||
{
|
{
|
||||||
if (songOptions.Selection.RandomOnly)
|
if (songOptions.Selection.RandomOnly)
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
|
|
||||||
if (_Length < 0 && CBase.Songs.IsInCategory() && CBase.BackgroundMusic.GetLength() > 0)
|
if (_Length < 0 && CBase.Songs.IsInCategory() && CBase.BackgroundMusic.GetLength() > 0)
|
||||||
_UpdateLength(CBase.Songs.GetVisibleSong(_PreviewNr));
|
_UpdateLength(CBase.Songs.GetVisibleSong(_PreviewNr));
|
||||||
@@ -291,7 +291,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
SetSelectedSong(_SelectionNr < 0 ? 0 : _SelectionNr);
|
SetSelectedSong(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||||
else
|
else
|
||||||
SetSelectedCategory(_SelectionNr < 0 ? 0 : _SelectionNr);
|
SetSelectedCategory(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
_UpdateListIfRequired();
|
_UpdateListIfRequired();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
{
|
{
|
||||||
if (_SelectionNr >= 0 && _PreviewNr != _SelectionNr)
|
if (_SelectionNr >= 0 && _PreviewNr != _SelectionNr)
|
||||||
{
|
{
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -355,6 +355,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (_SelectionNr > 0 && moveAllowed)
|
if (_SelectionNr > 0 && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr--;
|
_SelectionNr--;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -363,6 +364,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (moveAllowed)
|
if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr++;
|
_SelectionNr++;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -379,6 +381,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (_SelectionNr >= _NumW && moveAllowed)
|
else if (_SelectionNr >= _NumW && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr -= _NumW;
|
_SelectionNr -= _NumW;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -395,12 +398,13 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (moveAllowed)
|
else if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr += _NumW;
|
_SelectionNr += _NumW;
|
||||||
|
_AutoplayPreviewIfEnabled();
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!CBase.Songs.IsInCategory())
|
if (!CBase.Songs.IsInCategory())
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
return keyEvent.Handled;
|
return keyEvent.Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -456,7 +460,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
{
|
{
|
||||||
if (_PreviewNr == _SelectionNr)
|
if (_PreviewNr == _SelectionNr)
|
||||||
return false;
|
return false;
|
||||||
_PreviewNr = _SelectionNr;
|
_PreviewSelectedSong();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
EnterSelectedCategory();
|
EnterSelectedCategory();
|
||||||
|
|||||||
Reference in new issue
Block a user