Merge pull request #667 from damienlaguerre/559_song_name_pause_menu

#559 Display song name on sing screen in pause menu
This commit is contained in:
Florian Ostertag authored and GitHub committed 2023-12-31 10:24:34 +01:00
commit 923be1a283
3 files changed
+38 -2

No files matched your search

@@ -1,5 +1,18 @@
ScreenSing
+++++++++
Version 11
Add:
<TextPauseSongName>
+++++++++
Version 10
Add:
<StaticShortInfoTop>
<TextShortInfoTop>
+++++++++
Version 9
+15 -1
View File
@@ -2,7 +2,7 @@
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Informations>
<ScreenName>ScreenSing</ScreenName>
<ScreenVersion>10</ScreenVersion>
<ScreenVersion>11</ScreenVersion>
</Informations>
<Backgrounds>
<Background Name="Background1">
@@ -694,6 +694,20 @@
<Font>Outline</Font>
<Text>TR_SCREENSING_PAUSE</Text>
</Text>
<Text Name="TextPauseSongName">
<X>640</X>
<Y>10</Y>
<Z>-2.11</Z>
<H>40</H>
<MaxW>0</MaxW>
<Color Name="White" />
<SelColor Name="White" />
<Align>Center</Align>
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Normal</Font>
<Text></Text>
</Text>
<Text Name="TextDuetName1">
<X>10</X>
<Y>55</Y>
+10 -1
View File
@@ -41,7 +41,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 10; }
get { return 11; }
}
private struct STimeRect
@@ -57,6 +57,7 @@ namespace Vocaluxe.Screens
private const string _TextDuetName1 = "TextDuetName1";
private const string _TextDuetName2 = "TextDuetName2";
private const string _TextMedleyCountdown = "TextMedleyCountdown";
private const string _TextPauseSongName = "TextPauseSongName";
private string[,,] _TextScores;
private string[,,] _TextNames;
private List<string> _TextsPause;
@@ -1114,6 +1115,13 @@ namespace Vocaluxe.Screens
_Buttons[_ButtonRestartGame].Visible = _Pause;
_Buttons[_ButtonRestartRound].Visible = _Pause && CGame.NumRounds > 1;
if (_Pause && _TimerSongText.IsRunning)
_TimerSongText.Stop();
else
_TimerSongText.Start();
_Texts[_TextSongName].Visible = !_Pause;
if (_Pause)
CSound.Pause(_CurrentStream);
else
@@ -1149,6 +1157,7 @@ namespace Vocaluxe.Screens
if (rounds > 1)
songname += " (" + CGame.RoundNr + "/" + rounds + ")";
_Texts[_TextSongName].Text = songname;
_Texts[_TextPauseSongName].Text = songname;
_CurrentStream = CSound.Load(song.GetMP3(), false, true, CConfig.Config.Sound.KaraokeEffect == EOffOn.TR_CONFIG_ON ? EAudioEffect.Karaoke : EAudioEffect.None);
CSound.SetStreamVolume(_CurrentStream, 100);