Add Highscore Style Setting

Add ability to select whether the highscore screen should display all
scores or only the best score for each player, difficulty and
duet-track.
This commit is contained in:
Jiiniasu committed 2016-09-04 18:32:24 +02:00
1 parent e3754aeae8
commit d413765178
9 files changed
+92 -5

No files matched your search

+3
View File
@@ -73,6 +73,8 @@
<string name="TR_CONFIG_TIMERMODE_TOTAL">Total</string>
<string name="TR_CONFIG_TIMERLOOK_NORMAL">Normal</string>
<string name="TR_CONFIG_TIMERLOOK_EXPANDED">Expanded</string>
<string name="TR_CONFIG_HIGHSCORE_LIST_ALL">List all</string>
<string name="TR_CONFIG_HIGHSCORE_LIST_BEST">List best</string>
<string name="TR_CONFIG_OWN_MUSIC">Own music and background-music</string>
<string name="TR_CONFIG_NO_OWN_MUSIC">No own music</string>
<string name="TR_CONFIG_ONLY_OWN_MUSIC">Only own music</string>
@@ -183,6 +185,7 @@
<string name="TR_SCREENOGAME_TABS">Tabs</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>
<string name="TR_SCREENORECORD_OPTIONS">Record Options</string>
<string name="TR_SCREENORECORD_DEVICE">Device</string>
<string name="TR_SCREENORECORD_INPUT">Input</string>
@@ -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>2</ScreenVersion>
<ScreenVersion>3</ScreenVersion>
</Informations>
<Backgrounds>
<Background Name="Background1">
@@ -191,6 +191,20 @@
<Font>Outline</Font>
<Text>TR_SCREENOGAME_TIMERMODE</Text>
</Text>
<Text Name="Text8">
<X>75</X>
<Y>467</Y>
<Z>0</Z>
<H>27</H>
<MaxW>0</MaxW>
<Color Name="StaticColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text>TR_SCREENOGAME_HIGHSCORESTYLE</Text>
</Text>
</Texts>
<Buttons>
<Button Name="ButtonExit">
@@ -519,6 +533,48 @@
<TextStyle>Bold</TextStyle>
<NumVisible>3</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>460</Y>
<W>700</W>
<H>50</H>
<Z>0</Z>
</Rect>
<RectArrowLeft>
<X>505</X>
<Y>465</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowLeft>
<RectArrowRight>
<X>1170</X>
<Y>465</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="TextColor" />
<TextSelColor Name="TextSelColor" />
<TextH>27</TextH>
<TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle>
<NumVisible>2</NumVisible>
</SelectSlide>
</SelectSlides>
<SingNotes />
<NameSelections />
@@ -1,5 +1,11 @@
ScreenOptionsGame
++++++++++
Version 3:
Add:
<Text8>
<SelectSlideHighscoreStyle>
++++++++++
Version 2:
+1
View File
@@ -139,6 +139,7 @@ namespace Vocaluxe.Base
[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;
[DefaultValue(EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST)] public EHighscoreStyle HighscoreStyle;
}
public struct SConfigVideo
+5
View File
@@ -91,6 +91,11 @@ namespace Vocaluxe.Base
return CConfig.SongMenu;
}
public EHighscoreStyle GetHighscoreStyle()
{
return CConfig.Config.Game.HighscoreStyle;
}
public EOffOn GetVideosToBackground()
{
return CConfig.Config.Video.VideosToBackground;
+7 -2
View File
@@ -305,8 +305,13 @@ namespace Vocaluxe.Lib.Database
return scores;
command.CommandText = "SELECT PlayerName, Score, Date, Difficulty, LineNr, id FROM Scores " +
"WHERE [SongID] = @SongID AND [Medley] = @Medley AND [Duet] = @Duet AND [ShortSong] = @ShortSong " +
"ORDER BY [Score] DESC";
"WHERE [SongID] = @SongID AND [Medley] = @Medley AND [Duet] = @Duet AND [ShortSong] = @ShortSong ";
if (CBase.Config.GetHighscoreStyle() == EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST)
{
command.CommandText += "GROUP BY PlayerName, Difficulty, LineNr ";
}
command.CommandText += "ORDER BY [Score] DESC, [Date] ASC";
command.Parameters.Add("@SongID", DbType.Int32, 0).Value = dataBaseSongID;
command.Parameters.Add("@Medley", DbType.Int32, 0).Value = medley;
command.Parameters.Add("@Duet", DbType.Int32, 0).Value = duet;
+5 -2
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 2; }
get { return 3; }
}
private const string _SelectSlideLanguage = "SelectSlideLanguage";
@@ -36,6 +36,7 @@ namespace Vocaluxe.Screens
private const string _SelectSlideSongSorting = "SelectSlideSongSorting";
private const string _SelectSlideTabs = "SelectSlideTabs";
private const string _SelectSlideTimerMode = "SelectSlideTimerMode";
private const string _SelectSlideHighscoreStyle = "SelectSlideHighscoreStyle";
private const string _ButtonExit = "ButtonExit";
private const string _ButtonServer = "ButtonServer";
@@ -45,7 +46,7 @@ namespace Vocaluxe.Screens
base.Init();
_ThemeButtons = new string[] {_ButtonExit, _ButtonServer};
_ThemeSelectSlides = new string[] {_SelectSlideLanguage, _SelectSlideDebugLevel, _SelectSlideSongMenu, _SelectSlideSongSorting, _SelectSlideTabs, _SelectSlideTimerMode};
_ThemeSelectSlides = new string[] {_SelectSlideLanguage, _SelectSlideDebugLevel, _SelectSlideSongMenu, _SelectSlideSongSorting, _SelectSlideTabs, _SelectSlideTimerMode, _SelectSlideHighscoreStyle};
}
public override void LoadTheme(string xmlPath)
@@ -60,6 +61,7 @@ namespace Vocaluxe.Screens
_SelectSlides[_SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.Config.Game.SongSorting);
_SelectSlides[_SelectSlideTabs].SetValues<EOffOn>((int)CConfig.Config.Game.Tabs);
_SelectSlides[_SelectSlideTimerMode].SetValues<ETimerMode>((int)CConfig.Config.Game.TimerMode);
_SelectSlides[_SelectSlideHighscoreStyle].SetValues<EHighscoreStyle>((int)CConfig.Config.Game.HighscoreStyle);
}
public override bool HandleInput(SKeyEvent keyEvent)
@@ -140,6 +142,7 @@ namespace Vocaluxe.Screens
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
CConfig.Config.Game.Tabs = (EOffOn)_SelectSlides[_SelectSlideTabs].Selection;
CConfig.Config.Game.TimerMode = (ETimerMode)_SelectSlides[_SelectSlideTimerMode].Selection;
CConfig.Config.Game.HighscoreStyle = (EHighscoreStyle)_SelectSlides[_SelectSlideHighscoreStyle].Selection;
CConfig.SaveConfig();
+6
View File
@@ -369,6 +369,12 @@ namespace VocaluxeLib
Game
}
public enum EHighscoreStyle
{
TR_CONFIG_HIGHSCORE_LIST_ALL,
TR_CONFIG_HIGHSCORE_LIST_BEST
}
/// <summary>
/// Base screens
/// </summary>
+2
View File
@@ -46,6 +46,8 @@ namespace VocaluxeLib
ESongMenu GetSongMenuType();
EHighscoreStyle GetHighscoreStyle();
EOffOn GetDrawNoteLines();
EOffOn GetDrawToneHelper();