New sing screen info text for some key shortcuts
On sing screen the following key shortcuts displays an info text on the top right corner: v w (if no webcam available) CTRL + s (if no more songs are on playlist) CTRL + Right Arrow
This commit is contained in:
1 parent
d65736119f
commit
6507e4d267
1 file changed
+38
-2
@@ -21,6 +21,7 @@ using System.Diagnostics;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Timers;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Fonts;
|
using Vocaluxe.Base.Fonts;
|
||||||
@@ -40,7 +41,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 9; }
|
get { return 10; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct STimeRect
|
private struct STimeRect
|
||||||
@@ -50,6 +51,7 @@ namespace Vocaluxe.Screens
|
|||||||
public float EndBeat;
|
public float EndBeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const string _TextShortInfoTop = "TextShortInfoTop";
|
||||||
private const string _TextSongName = "TextSongName";
|
private const string _TextSongName = "TextSongName";
|
||||||
private const string _TextTime = "TextTime";
|
private const string _TextTime = "TextTime";
|
||||||
private const string _TextDuetName1 = "TextDuetName1";
|
private const string _TextDuetName1 = "TextDuetName1";
|
||||||
@@ -59,6 +61,7 @@ namespace Vocaluxe.Screens
|
|||||||
private string[,,] _TextNames;
|
private string[,,] _TextNames;
|
||||||
private List<string> _TextsPause;
|
private List<string> _TextsPause;
|
||||||
|
|
||||||
|
private const string _StaticShortInfoTop = "StaticShortInfoTop";
|
||||||
private const string _StaticSongText = "StaticSongText";
|
private const string _StaticSongText = "StaticSongText";
|
||||||
private const string _StaticLyrics = "StaticLyrics";
|
private const string _StaticLyrics = "StaticLyrics";
|
||||||
private const string _StaticLyricsDuet = "StaticLyricsDuet";
|
private const string _StaticLyricsDuet = "StaticLyricsDuet";
|
||||||
@@ -135,6 +138,8 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
private CBackground _SlideShow;
|
private CBackground _SlideShow;
|
||||||
private SScreenSongOptions _Sso;
|
private SScreenSongOptions _Sso;
|
||||||
|
|
||||||
|
private System.Timers.Timer _TimerShortInfoText;
|
||||||
|
|
||||||
public override EMusicType CurrentMusicType
|
public override EMusicType CurrentMusicType
|
||||||
{
|
{
|
||||||
@@ -145,12 +150,13 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
|
|
||||||
var texts = new List<string> { _TextSongName, _TextTime, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown };
|
var texts = new List<string> { _TextShortInfoTop, _TextSongName, _TextTime, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown };
|
||||||
_BuildTextStrings(texts);
|
_BuildTextStrings(texts);
|
||||||
_ThemeTexts = texts.ToArray();
|
_ThemeTexts = texts.ToArray();
|
||||||
|
|
||||||
var statics = new List<string>
|
var statics = new List<string>
|
||||||
{
|
{
|
||||||
|
_StaticShortInfoTop,
|
||||||
_StaticSongText,
|
_StaticSongText,
|
||||||
_StaticLyrics,
|
_StaticLyrics,
|
||||||
_StaticLyricsDuet,
|
_StaticLyricsDuet,
|
||||||
@@ -184,6 +190,25 @@ namespace Vocaluxe.Screens
|
|||||||
_TimerSongText = new Stopwatch();
|
_TimerSongText = new Stopwatch();
|
||||||
_TimerDuetText1 = new Stopwatch();
|
_TimerDuetText1 = new Stopwatch();
|
||||||
_TimerDuetText2 = new Stopwatch();
|
_TimerDuetText2 = new Stopwatch();
|
||||||
|
|
||||||
|
_TimerShortInfoText = new System.Timers.Timer(5000);
|
||||||
|
_TimerShortInfoText.AutoReset = false;
|
||||||
|
_TimerShortInfoText.Elapsed += OnTimedEventShortInfoText;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTimedEventShortInfoText(Object source, ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
_Statics[_StaticShortInfoTop].Visible = false;
|
||||||
|
_Texts[_TextShortInfoTop].Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _ShowInfoText(String text)
|
||||||
|
{
|
||||||
|
_Texts[_TextShortInfoTop].Text = text;
|
||||||
|
_Statics[_StaticShortInfoTop].Visible = true;
|
||||||
|
_Texts[_TextShortInfoTop].Visible = true;
|
||||||
|
_TimerShortInfoText.Stop();
|
||||||
|
_TimerShortInfoText.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LoadTheme(string xmlPath)
|
public override void LoadTheme(string xmlPath)
|
||||||
@@ -248,6 +273,8 @@ namespace Vocaluxe.Screens
|
|||||||
if (keyEvent.ModCtrl)
|
if (keyEvent.ModCtrl)
|
||||||
_NextSong();
|
_NextSong();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
_ShowInfoText(CBase.Language.Translate("TR_SCREENSING_NOMORESONGS"));
|
||||||
break;
|
break;
|
||||||
case Keys.W:
|
case Keys.W:
|
||||||
if (CWebcam.IsDeviceAvailable())
|
if (CWebcam.IsDeviceAvailable())
|
||||||
@@ -258,6 +285,8 @@ namespace Vocaluxe.Screens
|
|||||||
else
|
else
|
||||||
CWebcam.Stop();
|
CWebcam.Stop();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
_ShowInfoText(CBase.Language.Translate("TR_SCREENSING_NOWEBCAM"));
|
||||||
break;
|
break;
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
if (_Pause)
|
if (_Pause)
|
||||||
@@ -293,6 +322,8 @@ namespace Vocaluxe.Screens
|
|||||||
CSong song = CGame.GetSong();
|
CSong song = CGame.GetSong();
|
||||||
song.VideoAspect = _VideoAspect;
|
song.VideoAspect = _VideoAspect;
|
||||||
|
|
||||||
|
_ShowInfoText(CBase.Language.Translate("TR_SCREENSING_ASPECTRATIO").Replace("%a", _VideoAspect.ToString()));
|
||||||
|
|
||||||
if (CConfig.Config.Debug.SaveModifiedSongs == EOffOn.TR_CONFIG_ON)
|
if (CConfig.Config.Debug.SaveModifiedSongs == EOffOn.TR_CONFIG_ON)
|
||||||
song.Save();
|
song.Save();
|
||||||
break;
|
break;
|
||||||
@@ -326,6 +357,8 @@ namespace Vocaluxe.Screens
|
|||||||
if (CSound.GetLength(_CurrentStream) < (_CurrentTime + 30f))
|
if (CSound.GetLength(_CurrentStream) < (_CurrentTime + 30f))
|
||||||
newTime = CSound.GetLength(_CurrentStream) - 1f;
|
newTime = CSound.GetLength(_CurrentStream) - 1f;
|
||||||
CSound.SetPosition(_CurrentStream, newTime);
|
CSound.SetPosition(_CurrentStream, newTime);
|
||||||
|
|
||||||
|
_ShowInfoText(CBase.Language.Translate("TR_SCREENSING_SKIPPEDSECONDS").Replace("%s", "30"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1233,6 +1266,7 @@ namespace Vocaluxe.Screens
|
|||||||
_Lyrics[_LyricSubDuet].Clear();
|
_Lyrics[_LyricSubDuet].Clear();
|
||||||
_Lyrics[_LyricMainTop].Clear();
|
_Lyrics[_LyricMainTop].Clear();
|
||||||
_Lyrics[_LyricSubTop].Clear();
|
_Lyrics[_LyricSubTop].Clear();
|
||||||
|
_Texts[_TextShortInfoTop].Text = String.Empty;
|
||||||
_Texts[_TextSongName].Text = String.Empty;
|
_Texts[_TextSongName].Text = String.Empty;
|
||||||
_Texts[_TextDuetName1].Text = String.Empty;
|
_Texts[_TextDuetName1].Text = String.Empty;
|
||||||
_Texts[_TextDuetName2].Text = String.Empty;
|
_Texts[_TextDuetName2].Text = String.Empty;
|
||||||
@@ -1283,7 +1317,9 @@ namespace Vocaluxe.Screens
|
|||||||
_Lyrics[_LyricMainDuet].Visible = false;
|
_Lyrics[_LyricMainDuet].Visible = false;
|
||||||
_Lyrics[_LyricSubDuet].Visible = false;
|
_Lyrics[_LyricSubDuet].Visible = false;
|
||||||
|
|
||||||
|
_Statics[_StaticShortInfoTop].Visible = false;
|
||||||
_Statics[_StaticSongText].Visible = false;
|
_Statics[_StaticSongText].Visible = false;
|
||||||
|
_Texts[_TextShortInfoTop].Visible = false;
|
||||||
_Texts[_TextSongName].Visible = false;
|
_Texts[_TextSongName].Visible = false;
|
||||||
_Texts[_TextDuetName1].Visible = false;
|
_Texts[_TextDuetName1].Visible = false;
|
||||||
_Texts[_TextDuetName2].Visible = false;
|
_Texts[_TextDuetName2].Visible = false;
|
||||||
|
|||||||
Reference in new issue
Block a user