Added warning if not all players has a profile...

This commit is contained in:
Florian Kuepper committed 2012-04-09 14:01:22 +02:00
1 parent 6e6eeab0aa
commit 85b16e5f32
8 files changed
+149 -26

No files matched your search

+4 -2
View File
@@ -108,8 +108,10 @@
<TR_SCREENNAMES_4PLAYER>4 Spieler</TR_SCREENNAMES_4PLAYER>
<TR_SCREENNAMES_5PLAYER>5 Spieler</TR_SCREENNAMES_5PLAYER>
<TR_SCREENNAMES_6PLAYER>6 Spieler</TR_SCREENNAMES_6PLAYER>
<TR_SCREENNAMES_WARNING_SG>Warnung: Dem Spieler %v ist kein Mikrofon zugeordnet!</TR_SCREENNAMES_WARNING_SG>
<TR_SCREENNAMES_WARNING_PL>Warnung: Den Spielern %v sind keine Mikrofone zugeordnet!</TR_SCREENNAMES_WARNING_PL>
<TR_SCREENNAMES_WARNING_MICS_SG>Warnung: Dem Spieler %v ist kein Mikrofon zugeordnet!</TR_SCREENNAMES_WARNING_MICS_SG>
<TR_SCREENNAMES_WARNING_MICS_PL>Warnung: Den Spielern %v sind keine Mikrofone zugeordnet!</TR_SCREENNAMES_WARNING_MICS_PL>
<TR_SCREENNAMES_WARNING_PROFILES_SG>Warnung: Dem Spieler %v ist kein Profil zugeordnet!</TR_SCREENNAMES_WARNING_PROFILES_SG>
<TR_SCREENNAMES_WARNING_PROFILES_PL>Warnung: Den Spielern %v sind keine Profile zugeordnet!</TR_SCREENNAMES_WARNING_PROFILES_PL>
<!--ScreenSong-->
<TR_SCREENSONG_MENU>Songauswahl</TR_SCREENSONG_MENU>
<TR_SCREENSONG_SEARCH>Suche:</TR_SCREENSONG_SEARCH>
+4 -2
View File
@@ -108,8 +108,10 @@
<TR_SCREENNAMES_4PLAYER>4 Player</TR_SCREENNAMES_4PLAYER>
<TR_SCREENNAMES_5PLAYER>5 Player</TR_SCREENNAMES_5PLAYER>
<TR_SCREENNAMES_6PLAYER>6 Player</TR_SCREENNAMES_6PLAYER>
<TR_SCREENNAMES_WARNING_SG>Warning: There is no mic assigned to player %v!</TR_SCREENNAMES_WARNING_SG>
<TR_SCREENNAMES_WARNING_PL>Warning: There are no mics assigned to players %v!</TR_SCREENNAMES_WARNING_PL>
<TR_SCREENNAMES_WARNING_MICS_SG>Warning: There is no mic assigned to player %v!</TR_SCREENNAMES_WARNING_MICS_SG>
<TR_SCREENNAMES_WARNING_MICS_PL>Warning: There are no mics assigned to players %v!</TR_SCREENNAMES_WARNING_MICS_PL>
<TR_SCREENNAMES_WARNING_PROFILES_SG>Warning: There is no profile assigned to player %v!</TR_SCREENNAMES_WARNING_PROFILES_SG>
<TR_SCREENNAMES_WARNING_PROFILES_PL>Warning: There are no profiles assigned to players %v!</TR_SCREENNAMES_WARNING_PROFILES_PL>
<!--ScreenSong-->
<TR_SCREENSONG_MENU>Song Selection</TR_SCREENSONG_MENU>
<TR_SCREENSONG_SEARCH>Search:</TR_SCREENSONG_SEARCH>
+4 -2
View File
@@ -108,8 +108,10 @@
<TR_SCREENNAMES_4PLAYER>4 joueurs</TR_SCREENNAMES_4PLAYER>
<TR_SCREENNAMES_5PLAYER>5 joueurs</TR_SCREENNAMES_5PLAYER>
<TR_SCREENNAMES_6PLAYER>6 joueurs</TR_SCREENNAMES_6PLAYER>
<TR_SCREENNAMES_WARNING_SG>Attention: Aucun micro n'est assigné au joueur %v!</TR_SCREENNAMES_WARNING_SG>
<TR_SCREENNAMES_WARNING_PL>Attention: Aucun micro n'est assigné aux joueurs %v!</TR_SCREENNAMES_WARNING_PL>
<TR_SCREENNAMES_WARNING_MICS_SG>Attention: Aucun micro n'est assigné au joueur %v!</TR_SCREENNAMES_WARNING_MICS_SG>
<TR_SCREENNAMES_WARNING_MICS_PL>Attention: Aucun micro n'est assigné aux joueurs %v!</TR_SCREENNAMES_WARNING_MICS_PL>
<TR_SCREENNAMES_WARNING_PROFILES_SG>Attention: Aucun profil n'est assigné au joueur %v!</TR_SCREENNAMES_WARNING_PROFILES_SG>
<TR_SCREENNAMES_WARNING_PROFILES_PL>Attention: Aucun profils n'est assigné aux joueurs %v!</TR_SCREENNAMES_WARNING_PROFILES_PL>
<!--ScreenSong-->
<TR_SCREENSONG_MENU>Choix de la chanson</TR_SCREENSONG_MENU>
<TR_SCREENSONG_SEARCH>Rechercher:</TR_SCREENSONG_SEARCH>
+4 -2
View File
@@ -108,8 +108,10 @@
<TR_SCREENNAMES_4PLAYER>Jugador 4</TR_SCREENNAMES_4PLAYER>
<TR_SCREENNAMES_5PLAYER>Jugador 5</TR_SCREENNAMES_5PLAYER>
<TR_SCREENNAMES_6PLAYER>Jugador 6</TR_SCREENNAMES_6PLAYER>
<TR_SCREENNAMES_WARNING_SG>Advertencia: ¡No hay micrófonos asignados al jugador %v!</TR_SCREENNAMES_WARNING_SG>
<TR_SCREENNAMES_WARNING_PL>Advertencia: ¡No hay micrófonos asignados a los jugadores %v!</TR_SCREENNAMES_WARNING_PL>
<TR_SCREENNAMES_WARNING_MICS_SG>Advertencia: ¡No hay micrófonos asignados al jugador %v!</TR_SCREENNAMES_WARNING_MICS_SG>
<TR_SCREENNAMES_WARNING_MICS_PL>Advertencia: ¡No hay micrófonos asignados a los jugadores %v!</TR_SCREENNAMES_WARNING_MICS_PL>
<TR_SCREENNAMES_WARNING_PROFILES_SG>Advertencia: ¡No hay perfil asignados al jugador %v!</TR_SCREENNAMES_WARNING_PROFILES_SG>
<TR_SCREENNAMES_WARNING_PROFILES_PL>Advertencia: ¡No hay perfiles asignados a los jugadores %v!</TR_SCREENNAMES_WARNING_PROFILES_PL>
<!--ScreenSong-->
<TR_SCREENSONG_MENU>Selección de Canciones</TR_SCREENSONG_MENU>
<TR_SCREENSONG_SEARCH>Buscar:</TR_SCREENSONG_SEARCH>
+48 -4
View File
@@ -221,7 +221,7 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</StaticPlayerAvatar6>
<StaticWarning>
<StaticWarningMics>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
@@ -236,7 +236,23 @@
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</StaticWarning>
</StaticWarningMics>
<StaticWarningProfiles>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>145</X>
<Y>715</Y>
<Z>0,00</Z>
<W>990</W>
<H>50</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticWarningColor</Color>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</StaticWarningProfiles>
<Text1>
<!--<X>, <Y>: Text position-->
<X>640</X>
@@ -426,7 +442,7 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayer6>
<TextWarning>
<TextWarningMics>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>615</Y>
@@ -453,7 +469,35 @@
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextWarning>
</TextWarningMics>
<TextWarningProfiles>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>650</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>970</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>TextWarningColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextWarningColor</SColor>
<!--<Align>: Text align: Left, Center, Right-->
<Align>Center</Align>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Text or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextWarningProfiles>
<ButtonBack>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
@@ -5,13 +5,18 @@ Version 2:
Add:
<NameSelection>
A new Theme-element for name-selecting.
<StaticPlayer[1...6]> (One Static for each player): Static wich is used as drop-area
<StaticPlayerAvatar[1...6]> (One Static for each player): Static wich shows the avatar of selected player
<TextPlayer[1...6]> (One Text for each player): Text wich shows name of selected player
<SelectSlidePlayerNumber>
<StaticWarningProfiles>
<TextWarningProfiles>
Rename:
<StaticWarning> to <StaticWarningMics>
<TextWarning> to <TextWarningMics>
Remove:
<Button1Player>, <Button2Player>, <Button3Player>, <SelectSlidePlayerMic1>, <SelectSlidePlayerMic2>, <SelectSlidePlayerMic3>
<Button1Player>, <Button2Player>, <Button3Player>, <SelectSlidePlayerMic1>, <SelectSlidePlayerMic2>, <SelectSlidePlayerMic3>
+4
View File
@@ -979,6 +979,10 @@ namespace Vocaluxe.Base
CGame.Player[j].ProfileID = i;
}
}
else
{
CGame.Player[j].ProfileID = -1;
}
}
}
}
+74 -12
View File
@@ -22,8 +22,10 @@ namespace Vocaluxe.Screens
private const string NameSelection = "NameSelection";
private const string ButtonBack = "ButtonBack";
private const string ButtonStart = "ButtonStart";
private const string TextWarning = "TextWarning";
private const string StaticWarning = "StaticWarning";
private const string TextWarningMics = "TextWarningMics";
private const string StaticWarningMics = "StaticWarningMics";
private const string TextWarningProfiles = "TextWarningProfiles";
private const string StaticWarningProfiles = "StaticWarningProfiles";
private readonly string[] StaticPlayer = new string[] { "StaticPlayer1", "StaticPlayer2", "StaticPlayer3", "StaticPlayer4", "StaticPlayer5", "StaticPlayer6" };
private readonly string[] StaticPlayerAvatar = new string[] { "StaticPlayerAvatar1", "StaticPlayerAvatar2", "StaticPlayerAvatar3", "StaticPlayerAvatar4", "StaticPlayerAvatar5", "StaticPlayerAvatar6" };
private readonly string[] TextPlayer = new string[] { "TextPlayer1", "TextPlayer2", "TextPlayer3", "TextPlayer4", "TextPlayer5", "TextPlayer6" };
@@ -56,7 +58,8 @@ namespace Vocaluxe.Screens
{
statics.Add(text);
}
statics.Add(StaticWarning);
statics.Add(StaticWarningMics);
statics.Add(StaticWarningProfiles);
_ThemeStatics = statics.ToArray();
List<string> texts = new List<string>();
@@ -64,7 +67,8 @@ namespace Vocaluxe.Screens
_ThemeSelectSlides = new string[] { SelectSlidePlayerNumber };
texts.Clear();
texts.Add(TextWarning);
texts.Add(TextWarningMics);
texts.Add(TextWarningProfiles);
foreach(string text in TextPlayer){
texts.Add(text);
}
@@ -139,6 +143,8 @@ namespace Vocaluxe.Screens
//Update texture and name
Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture;
Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
//Update profile-warning
CheckPlayers();
}
//Reset all values
selectingKeyboardPlayerNr = 0;
@@ -381,6 +387,8 @@ namespace Vocaluxe.Screens
//Update texture and name
Statics[htStatics(StaticPlayerAvatar[i])].Texture = chooseAvatarStatic.Texture;
Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
//Update profile-warning
CheckPlayers();
}
}
}
@@ -448,12 +456,16 @@ namespace Vocaluxe.Screens
UpdateSlides();
UpdatePlayerNumber();
CheckMics();
CheckPlayers();
for (int i = 0; i < CSettings.MaxNumPlayer; i++)
{
//Update texture and name
Statics[htStatics(StaticPlayerAvatar[i])].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
if (CConfig.Players[i] != String.Empty)
{
Statics[htStatics(StaticPlayerAvatar[i])].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
}
}
}
@@ -527,6 +539,7 @@ namespace Vocaluxe.Screens
}
CConfig.SaveConfig();
CheckMics();
CheckPlayers();
}
private void CheckMics()
@@ -541,8 +554,8 @@ namespace Vocaluxe.Screens
}
if (_PlayerWithoutMicro.Count > 0)
{
Statics[htStatics(StaticWarning)].Visible = true;
Texts[htTexts(TextWarning)].Visible = true;
Statics[htStatics(StaticWarningMics)].Visible = true;
Texts[htTexts(TextWarningMics)].Visible = true;
if (_PlayerWithoutMicro.Count > 1)
{
@@ -563,17 +576,66 @@ namespace Vocaluxe.Screens
}
}
Texts[htTexts(TextWarning)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PL").Replace("%v", PlayerNums);
Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_PL").Replace("%v", PlayerNums);
}
else
{
Texts[htTexts(TextWarning)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_SG").Replace("%v", _PlayerWithoutMicro[0].ToString());
Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_SG").Replace("%v", _PlayerWithoutMicro[0].ToString());
}
}
else
{
Statics[htStatics(StaticWarning)].Visible = false;
Texts[htTexts(TextWarning)].Visible = false;
Statics[htStatics(StaticWarningMics)].Visible = false;
Texts[htTexts(TextWarningMics)].Visible = false;
}
}
private void CheckPlayers()
{
List<int> _PlayerWithoutProfile = new List<int>();
for (int player = 0; player < CConfig.NumPlayer; player++)
{
if (CGame.Player[player].ProfileID < 0)
{
_PlayerWithoutProfile.Add(player + 1);
}
}
if (_PlayerWithoutProfile.Count > 0)
{
Statics[htStatics(StaticWarningProfiles)].Visible = true;
Texts[htTexts(TextWarningProfiles)].Visible = true;
if (_PlayerWithoutProfile.Count > 1)
{
string PlayerNums = string.Empty;
for (int i = 0; i < _PlayerWithoutProfile.Count; i++)
{
if (_PlayerWithoutProfile.Count - 1 == i)
{
PlayerNums += _PlayerWithoutProfile[i].ToString();
}
else if (_PlayerWithoutProfile.Count - 2 == i)
{
PlayerNums += _PlayerWithoutProfile[i].ToString() + " " + CLanguage.Translate("TR_GENERAL_AND") + " ";
}
else
{
PlayerNums += _PlayerWithoutProfile[i].ToString() + ", ";
}
}
Texts[htTexts(TextWarningProfiles)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_PL").Replace("%v", PlayerNums);
}
else
{
Texts[htTexts(TextWarningProfiles)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_SG").Replace("%v", _PlayerWithoutProfile[0].ToString());
}
}
else
{
Statics[htStatics(StaticWarningProfiles)].Visible = false;
Texts[htTexts(TextWarningProfiles)].Visible = false;
}
}
}