Added buttons to restart game/round, closes #282

This commit is contained in:
Florian Küpper committed 2017-11-23 09:33:18 +01:00
1 parent 52becec3d2
commit cf04933265
4 files changed
+100 -11

No files matched your search

+2
View File
@@ -156,6 +156,8 @@
<string name="TR_SCREENSING_BUTTON_CANCEL">Stop singing</string>
<string name="TR_SCREENSING_BUTTON_CONTINUE">Continue</string>
<string name="TR_SCREENSING_BUTTON_SKIP">Skip this song</string>
<string name="TR_SCREENSING_BUTTON_RESTART_ROUND">Restart round</string>
<string name="TR_SCREENSING_BUTTON_RESTART_GAME">Restart game</string>
<string name="TR_SCREENSCORE_SCORES">Scores</string>
<string name="TR_SCREENSCORE_RATING">Rating</string>
<string name="TR_SCREENSCORE_POINTS">Points</string>
@@ -4,7 +4,9 @@ ScreenSing
Version 9
Add:
<StaticRatingBar$P$N$>
<ProgressBarRatingP$N$>
<ButtonRestartRound>
<ButtonRestartGame>
+++++++++
Version 8
+76 -6
View File
@@ -1302,8 +1302,8 @@
<Skin>Button</Skin>
<SkinSelected>Button</SkinSelected>
<Rect>
<X>775</X>
<Y>450</Y>
<X>985</X>
<Y>600</Y>
<W>150</W>
<H>50</H>
<Z>-2.11</Z>
@@ -1337,8 +1337,8 @@
<Skin>Button</Skin>
<SkinSelected>Button</SkinSelected>
<Rect>
<X>355</X>
<Y>450</Y>
<X>145</X>
<Y>600</Y>
<W>150</W>
<H>50</H>
<Z>-2.11</Z>
@@ -1372,8 +1372,8 @@
<Skin>Button</Skin>
<SkinSelected>Button</SkinSelected>
<Rect>
<X>565</X>
<Y>450</Y>
<X>355</X>
<Y>600</Y>
<W>150</W>
<H>50</H>
<Z>-2.11</Z>
@@ -1403,6 +1403,76 @@
<Space>10</Space>
</SelReflection>
</Button>
<Button Name="ButtonRestartRound">
<Skin>Button</Skin>
<SkinSelected>Button</SkinSelected>
<Rect>
<X>775</X>
<Y>600</Y>
<W>150</W>
<H>50</H>
<Z>-2.11</Z>
</Rect>
<Color Name="ButtonColor" />
<SelColor Name="ButtonSelColor" />
<Text Name="Text">
<X>75</X>
<Y>12</Y>
<Z>0</Z>
<H>27</H>
<MaxW>142</MaxW>
<Color Name="ButtonTextColor" />
<SelColor Name="ButtonTextSelColor" />
<Align>Center</Align>
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text>TR_SCREENSING_BUTTON_RESTART_ROUND</Text>
</Text>
<Reflection>
<Height>26</Height>
<Space>10</Space>
</Reflection>
<SelReflection>
<Height>26</Height>
<Space>10</Space>
</SelReflection>
</Button>
<Button Name="ButtonRestartGame">
<Skin>Button</Skin>
<SkinSelected>Button</SkinSelected>
<Rect>
<X>565</X>
<Y>600</Y>
<W>150</W>
<H>50</H>
<Z>-2.11</Z>
</Rect>
<Color Name="ButtonColor" />
<SelColor Name="ButtonSelColor" />
<Text Name="Text">
<X>75</X>
<Y>12</Y>
<Z>0</Z>
<H>27</H>
<MaxW>142</MaxW>
<Color Name="ButtonTextColor" />
<SelColor Name="ButtonTextSelColor" />
<Align>Center</Align>
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text>TR_SCREENSING_BUTTON_RESTART_GAME</Text>
</Text>
<Reflection>
<Height>26</Height>
<Space>10</Space>
</Reflection>
<SelReflection>
<Height>26</Height>
<Space>10</Space>
</SelReflection>
</Button>
</Buttons>
<SongMenus />
<Lyrics>
+19 -4
View File
@@ -78,6 +78,8 @@ namespace Vocaluxe.Screens
private const string _ButtonCancel = "ButtonCancel";
private const string _ButtonContinue = "ButtonContinue";
private const string _ButtonRestartRound = "ButtonRestartRound";
private const string _ButtonRestartGame = "ButtonRestartGame";
private const string _ButtonSkip = "ButtonSkip";
private const string _LyricMain = "LyricMain";
@@ -170,7 +172,7 @@ namespace Vocaluxe.Screens
_CreateProgressBars();
_AssignPlayerElements();
_ThemeButtons = new string[] { _ButtonCancel, _ButtonContinue, _ButtonSkip };
_ThemeButtons = new string[] { _ButtonCancel, _ButtonContinue, _ButtonRestartGame, _ButtonRestartRound, _ButtonSkip };
_ThemeLyrics = new string[] { _LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop };
_ThemeSingNotes = new string[] { _SingBars };
@@ -260,6 +262,10 @@ namespace Vocaluxe.Screens
_SetPause(false);
if (_Buttons[_ButtonCancel].Selected)
_Stop();
if (_Buttons[_ButtonRestartGame].Selected)
_RestartGame();
if (_Buttons[_ButtonRestartRound].Selected)
_RestartRound();
if (_Buttons[_ButtonSkip].Selected)
{
_NextSong();
@@ -301,10 +307,18 @@ namespace Vocaluxe.Screens
{
if (_Buttons[_ButtonContinue].Selected)
_SetPause(false);
if (_Buttons[_ButtonCancel].Selected)
_Stop();
if (_Buttons[_ButtonRestartGame].Selected)
{
_RestartGame();
_SetPause(false);
}
if (_Buttons[_ButtonRestartRound].Selected)
{
_RestartRound();
_SetPause(false);
}
if (_Buttons[_ButtonSkip].Selected)
{
_NextSong();
@@ -312,7 +326,6 @@ namespace Vocaluxe.Screens
}
}
return true;
}
@@ -1004,6 +1017,8 @@ namespace Vocaluxe.Screens
_Buttons[_ButtonCancel].Visible = _Pause;
_Buttons[_ButtonContinue].Visible = _Pause;
_Buttons[_ButtonSkip].Visible = _Pause && CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1;
_Buttons[_ButtonRestartGame].Visible = _Pause;
_Buttons[_ButtonRestartRound].Visible = _Pause && CGame.NumRounds > 1;
if (_Pause)
CSound.Pause(_CurrentStream);