Added playeravatar and -name to SingScreen. Toggle with "I"!
This commit is contained in:
1 parent
f9e516eb7b
commit
c004d68a69
4 files changed
+1141
-38
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -4,6 +4,10 @@ ScreenSing
|
|||||||
Version 4:
|
Version 4:
|
||||||
Added Elements for 6-player-singing!
|
Added Elements for 6-player-singing!
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<StaticAvatarP$N$> (One for each player for each player-number>
|
||||||
|
<TextNameP$N$> (One for each player for each player-number>
|
||||||
|
|
||||||
|
|
||||||
++++++++++
|
++++++++++
|
||||||
Version 3:
|
Version 3:
|
||||||
|
|||||||
@@ -152,6 +152,14 @@ namespace Vocaluxe.Base
|
|||||||
TR_CONFIG_ONLY_OWN_MUSIC
|
TR_CONFIG_ONLY_OWN_MUSIC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum EPlayerInfo
|
||||||
|
{
|
||||||
|
TR_CONFIG_PLAYERINFO_BOTH,
|
||||||
|
TR_CONFIG_PLAYERINFO_NAME,
|
||||||
|
TR_CONFIG_PLAYERINFO_AVATAR,
|
||||||
|
TR_CONFIG_PLAYERINFO_OFF
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Enums
|
#endregion Enums
|
||||||
|
|
||||||
static class CConfig
|
static class CConfig
|
||||||
@@ -185,6 +193,7 @@ namespace Vocaluxe.Base
|
|||||||
public static EOffOn DrawNoteLines = EOffOn.TR_CONFIG_ON;
|
public static EOffOn DrawNoteLines = EOffOn.TR_CONFIG_ON;
|
||||||
public static EOffOn DrawToneHelper = EOffOn.TR_CONFIG_ON;
|
public static EOffOn DrawToneHelper = EOffOn.TR_CONFIG_ON;
|
||||||
public static ETimerLook TimerLook = ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED;
|
public static ETimerLook TimerLook = ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED;
|
||||||
|
public static EPlayerInfo PlayerInfo = EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH;
|
||||||
public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART;
|
public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART;
|
||||||
|
|
||||||
// Sound
|
// Sound
|
||||||
@@ -301,6 +310,7 @@ namespace Vocaluxe.Base
|
|||||||
CHelper.TryGetEnumValueFromXML("//root/Theme/DrawNoteLines", navigator, ref DrawNoteLines);
|
CHelper.TryGetEnumValueFromXML("//root/Theme/DrawNoteLines", navigator, ref DrawNoteLines);
|
||||||
CHelper.TryGetEnumValueFromXML("//root/Theme/DrawToneHelper", navigator, ref DrawToneHelper);
|
CHelper.TryGetEnumValueFromXML("//root/Theme/DrawToneHelper", navigator, ref DrawToneHelper);
|
||||||
CHelper.TryGetEnumValueFromXML("//root/Theme/TimerLook", navigator, ref TimerLook);
|
CHelper.TryGetEnumValueFromXML("//root/Theme/TimerLook", navigator, ref TimerLook);
|
||||||
|
CHelper.TryGetEnumValueFromXML("//root/Theme/PlayerInfo", navigator, ref PlayerInfo);
|
||||||
CHelper.TryGetEnumValueFromXML("//root/Theme/CoverLoading", navigator, ref CoverLoading);
|
CHelper.TryGetEnumValueFromXML("//root/Theme/CoverLoading", navigator, ref CoverLoading);
|
||||||
#endregion Theme
|
#endregion Theme
|
||||||
|
|
||||||
@@ -503,6 +513,9 @@ namespace Vocaluxe.Base
|
|||||||
writer.WriteComment("Look of timer:" + ListStrings(Enum.GetNames(typeof(ETimerLook))));
|
writer.WriteComment("Look of timer:" + ListStrings(Enum.GetNames(typeof(ETimerLook))));
|
||||||
writer.WriteElementString("TimerLook", Enum.GetName(typeof(ETimerLook), TimerLook));
|
writer.WriteElementString("TimerLook", Enum.GetName(typeof(ETimerLook), TimerLook));
|
||||||
|
|
||||||
|
writer.WriteComment("Information about players on SingScreen:" + ListStrings(Enum.GetNames(typeof(EPlayerInfo))));
|
||||||
|
writer.WriteElementString("PlayerInfo", Enum.GetName(typeof(EPlayerInfo), PlayerInfo));
|
||||||
|
|
||||||
writer.WriteComment("Cover Loading:" + ListStrings(Enum.GetNames(typeof(ECoverLoading))));
|
writer.WriteComment("Cover Loading:" + ListStrings(Enum.GetNames(typeof(ECoverLoading))));
|
||||||
writer.WriteElementString("CoverLoading", Enum.GetName(typeof(ECoverLoading), CoverLoading));
|
writer.WriteElementString("CoverLoading", Enum.GetName(typeof(ECoverLoading), CoverLoading));
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace Vocaluxe.Screens
|
|||||||
private const string TextTime = "TextTime";
|
private const string TextTime = "TextTime";
|
||||||
private const string TextPause = "TextPause";
|
private const string TextPause = "TextPause";
|
||||||
private string[,] TextScores;
|
private string[,] TextScores;
|
||||||
|
private string[,] TextNames;
|
||||||
|
|
||||||
private const string StaticSongText = "StaticSongText";
|
private const string StaticSongText = "StaticSongText";
|
||||||
private const string StaticLyrics = "StaticLyrics";
|
private const string StaticLyrics = "StaticLyrics";
|
||||||
@@ -46,6 +47,7 @@ namespace Vocaluxe.Screens
|
|||||||
private const string StaticPauseBG = "StaticPauseBG";
|
private const string StaticPauseBG = "StaticPauseBG";
|
||||||
|
|
||||||
private string[,] StaticScores;
|
private string[,] StaticScores;
|
||||||
|
private string[,] StaticAvatars;
|
||||||
|
|
||||||
private const string ButtonCancel = "ButtonCancel";
|
private const string ButtonCancel = "ButtonCancel";
|
||||||
private const string ButtonContinue = "ButtonContinue";
|
private const string ButtonContinue = "ButtonContinue";
|
||||||
@@ -185,6 +187,19 @@ namespace Vocaluxe.Screens
|
|||||||
CConfig.TimerMode = (ETimerMode)mode;
|
CConfig.TimerMode = (ETimerMode)mode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Keys.I:
|
||||||
|
mode = (int)CConfig.PlayerInfo;
|
||||||
|
|
||||||
|
mode++;
|
||||||
|
if (mode > Enum.GetNames(typeof(EPlayerInfo)).Length - 1)
|
||||||
|
{
|
||||||
|
mode = 0;
|
||||||
|
}
|
||||||
|
CConfig.PlayerInfo = (EPlayerInfo)mode;
|
||||||
|
CConfig.SaveConfig();
|
||||||
|
SetVisuability();
|
||||||
|
break;
|
||||||
|
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
if (Buttons[htButtons(ButtonContinue)].Selected && _Pause)
|
if (Buttons[htButtons(ButtonContinue)].Selected && _Pause)
|
||||||
TogglePause();
|
TogglePause();
|
||||||
@@ -333,6 +348,8 @@ namespace Vocaluxe.Screens
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetVisuability();
|
SetVisuability();
|
||||||
|
UpdateAvatars();
|
||||||
|
UpdateNames();
|
||||||
CBackgroundMusic.Pause();
|
CBackgroundMusic.Pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,6 +697,7 @@ namespace Vocaluxe.Screens
|
|||||||
private void BuildTextStrings(ref List<string> texts)
|
private void BuildTextStrings(ref List<string> texts)
|
||||||
{
|
{
|
||||||
TextScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
TextScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
||||||
|
TextNames = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
||||||
|
|
||||||
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
|
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
|
||||||
{
|
{
|
||||||
@@ -689,8 +707,10 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
string target = "P" + (player + 1).ToString() + "N" + (numplayer + 1).ToString();
|
string target = "P" + (player + 1).ToString() + "N" + (numplayer + 1).ToString();
|
||||||
TextScores[player, numplayer] = "TextScore" + target;
|
TextScores[player, numplayer] = "TextScore" + target;
|
||||||
|
TextNames[player, numplayer] = "TextName" + target;
|
||||||
|
|
||||||
texts.Add(TextScores[player, numplayer]);
|
texts.Add(TextScores[player, numplayer]);
|
||||||
|
texts.Add(TextNames[player, numplayer]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -699,6 +719,7 @@ namespace Vocaluxe.Screens
|
|||||||
private void BuildStaticStrings(ref List<string> statics)
|
private void BuildStaticStrings(ref List<string> statics)
|
||||||
{
|
{
|
||||||
StaticScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
StaticScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
||||||
|
StaticAvatars = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
||||||
|
|
||||||
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
|
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
|
||||||
{
|
{
|
||||||
@@ -708,8 +729,10 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
string target = "P" + (player + 1).ToString() + "N" + (numplayer + 1).ToString();
|
string target = "P" + (player + 1).ToString() + "N" + (numplayer + 1).ToString();
|
||||||
StaticScores[player, numplayer] = "StaticScore" + target;
|
StaticScores[player, numplayer] = "StaticScore" + target;
|
||||||
|
StaticAvatars[player, numplayer] = "StaticAvatar" + target;
|
||||||
|
|
||||||
statics.Add(StaticScores[player, numplayer]);
|
statics.Add(StaticScores[player, numplayer]);
|
||||||
|
statics.Add(StaticAvatars[player, numplayer]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -734,7 +757,11 @@ namespace Vocaluxe.Screens
|
|||||||
if (player <= numplayer)
|
if (player <= numplayer)
|
||||||
{
|
{
|
||||||
Texts[htTexts(TextScores[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
|
Texts[htTexts(TextScores[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
|
||||||
|
Texts[htTexts(TextNames[player, numplayer])].Visible = ((numplayer + 1 == CGame.NumPlayer)
|
||||||
|
&& (CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH || CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_NAME));
|
||||||
Statics[htStatics(StaticScores[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
|
Statics[htStatics(StaticScores[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
|
||||||
|
Statics[htStatics(StaticAvatars[player, numplayer])].Visible = ((numplayer + 1 == CGame.NumPlayer)
|
||||||
|
&& (CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH || CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_AVATAR));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1113,5 +1140,35 @@ namespace Vocaluxe.Screens
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateAvatars()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < CGame.NumPlayer; i++)
|
||||||
|
{
|
||||||
|
if (CGame.Player[i].ProfileID > -1)
|
||||||
|
{
|
||||||
|
Statics[htStatics(StaticAvatars[i, CGame.NumPlayer - 1])].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Statics[htStatics(StaticAvatars[i, CGame.NumPlayer - 1])].Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateNames()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < CGame.NumPlayer; i++)
|
||||||
|
{
|
||||||
|
if (CGame.Player[i].ProfileID > -1)
|
||||||
|
{
|
||||||
|
Texts[htTexts(TextNames[i, CGame.NumPlayer - 1])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Texts[htTexts(TextNames[i, CGame.NumPlayer - 1])].Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user