From 98ad7a6be08877926df2fc02bbadbfd6f8f5aa5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sat, 27 Apr 2013 12:28:22 +0200 Subject: [PATCH 01/11] Update for fast-player-selection. Press MB or P to start, use mouse or arrow-keys to choose player, select player with LB or Enter. Use [1..6] or MB to skip a player, RB or escape to abort. I will think about a easy reset-function... --- Vocaluxe/Screens/CScreenNames.cs | 155 ++++++++++++++++++++--------- VocaluxeLib/Menu/CNameSelection.cs | 18 +++- 2 files changed, 125 insertions(+), 48 deletions(-) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 9f7fc909..16440de2 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -56,8 +56,8 @@ namespace Vocaluxe.Screens private readonly STexture[] _OriginalPlayerAvatarTextures = new STexture[CSettings.MaxNumPlayer]; private bool _SelectingKeyboardActive; - private bool _SelectingKeyboardUnendless; - private int _SelectingKeyboardPlayerNr; + private bool _SelectingFast; + private int _SelectingFastPlayerNr; private int _SelectedPlayerNr; public override void Init() @@ -137,16 +137,16 @@ namespace Vocaluxe.Screens case Keys.P: if (!_SelectingKeyboardActive) { - _SelectingKeyboardPlayerNr = 1; - _SelectingKeyboardUnendless = true; + _SelectingFastPlayerNr = 1; + _SelectingFast = true; } else { - if (_SelectingKeyboardPlayerNr + 1 <= CGame.NumPlayer) - _SelectingKeyboardPlayerNr++; + if (_SelectingFastPlayerNr + 1 <= CGame.NumPlayer) + _SelectingFastPlayerNr++; else - _SelectingKeyboardPlayerNr = 1; - _NameSelections[_NameSelection].KeyboardSelection(true, _SelectingKeyboardPlayerNr); + _SelectingFastPlayerNr = 1; + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); } break; } @@ -165,13 +165,13 @@ namespace Vocaluxe.Screens { _SelectedPlayerNr = _NameSelections[_NameSelection].Selection; //Update Game-infos with new player - CGame.Players[_SelectingKeyboardPlayerNr - 1].ProfileID = _SelectedPlayerNr; + CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr; //Update config for default players. - CConfig.Players[_SelectingKeyboardPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; + CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; CConfig.SaveConfig(); //Update texture and name - _Statics[_StaticPlayerAvatar[_SelectingKeyboardPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture; - _Texts[_TextPlayer[_SelectingKeyboardPlayerNr - 1]].Text = CProfiles.Profiles[_SelectedPlayerNr].PlayerName; + _Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture; + _Texts[_TextPlayer[_SelectingFastPlayerNr - 1]].Text = CProfiles.Profiles[_SelectedPlayerNr].PlayerName; //Update profile-warning _CheckPlayers(); //Update Tiles-List @@ -179,14 +179,14 @@ namespace Vocaluxe.Screens _SetInteractionToButton(_Buttons[_ButtonStart]); } //Started selecting with 'P' - if (_SelectingKeyboardUnendless) + if (_SelectingFast) { - if (_SelectingKeyboardPlayerNr == CGame.NumPlayer) + if (_SelectingFastPlayerNr == CGame.NumPlayer) resetSelection = true; else { - _SelectingKeyboardPlayerNr++; - _NameSelections[_NameSelection].KeyboardSelection(true, _SelectingKeyboardPlayerNr); + _SelectingFastPlayerNr++; + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); } } else @@ -224,19 +224,19 @@ namespace Vocaluxe.Screens case Keys.Delete: //Delete profile-selection - CGame.Players[_SelectingKeyboardPlayerNr - 1].ProfileID = -1; + CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = -1; //Update config for default players. - CConfig.Players[_SelectingKeyboardPlayerNr - 1] = String.Empty; + CConfig.Players[_SelectingFastPlayerNr - 1] = String.Empty; CConfig.SaveConfig(); //Update texture and name - _Statics[_StaticPlayerAvatar[_SelectingKeyboardPlayerNr - 1]].Texture = _OriginalPlayerAvatarTextures[_SelectingKeyboardPlayerNr - 1]; - _Texts[_TextPlayer[_SelectingKeyboardPlayerNr - 1]].Text = CProfiles.GetPlayerName(-1, _SelectingKeyboardPlayerNr); + _Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = _OriginalPlayerAvatarTextures[_SelectingFastPlayerNr - 1]; + _Texts[_TextPlayer[_SelectingFastPlayerNr - 1]].Text = CProfiles.GetPlayerName(-1, _SelectingFastPlayerNr); //Update profile-warning _CheckPlayers(); //Reset all values - _SelectingKeyboardPlayerNr = 0; + _SelectingFastPlayerNr = 0; _SelectingKeyboardActive = false; - _NameSelections[_NameSelection].KeyboardSelection(false, -1); + _NameSelections[_NameSelection].FastSelection(false, -1); //Update Tiles-List _NameSelections[_NameSelection].UpdateList(); break; @@ -244,32 +244,32 @@ namespace Vocaluxe.Screens case Keys.F10: if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet) { - CSelectSlide selectSlideDuetPart = _SelectSlides[_SelectSlideDuetPlayer[_SelectingKeyboardPlayerNr - 1]]; + CSelectSlide selectSlideDuetPart = _SelectSlides[_SelectSlideDuetPlayer[_SelectingFastPlayerNr - 1]]; selectSlideDuetPart.Selection = (selectSlideDuetPart.Selection + 1) % 2; //Reset all values - _SelectingKeyboardPlayerNr = 0; + _SelectingFastPlayerNr = 0; _SelectingKeyboardActive = false; - _SelectingKeyboardUnendless = false; - _NameSelections[_NameSelection].KeyboardSelection(false, -1); + _SelectingFast = false; + _NameSelections[_NameSelection].FastSelection(false, -1); _SetInteractionToButton(_Buttons[_ButtonStart]); } break; } if (numberPressed > 0 || resetSelection) { - if (numberPressed == _SelectingKeyboardPlayerNr || resetSelection) + if (numberPressed == _SelectingFastPlayerNr || resetSelection) { //Reset all values - _SelectingKeyboardPlayerNr = 0; + _SelectingFastPlayerNr = 0; _SelectingKeyboardActive = false; - _NameSelections[_NameSelection].KeyboardSelection(false, -1); + _NameSelections[_NameSelection].FastSelection(false, -1); } else if (numberPressed <= CConfig.NumPlayer) { - _SelectingKeyboardPlayerNr = numberPressed; - _NameSelections[_NameSelection].KeyboardSelection(true, numberPressed); + _SelectingFastPlayerNr = numberPressed; + _NameSelections[_NameSelection].FastSelection(true, numberPressed); } - _SelectingKeyboardUnendless = false; + _SelectingFast = false; } } //Normal Keyboard handling @@ -294,32 +294,32 @@ namespace Vocaluxe.Screens case Keys.D1: case Keys.NumPad1: - _SelectingKeyboardPlayerNr = 1; + _SelectingFastPlayerNr = 1; break; case Keys.D2: case Keys.NumPad2: - _SelectingKeyboardPlayerNr = 2; + _SelectingFastPlayerNr = 2; break; case Keys.D3: case Keys.NumPad3: - _SelectingKeyboardPlayerNr = 3; + _SelectingFastPlayerNr = 3; break; case Keys.D4: case Keys.NumPad4: - _SelectingKeyboardPlayerNr = 4; + _SelectingFastPlayerNr = 4; break; case Keys.D5: case Keys.NumPad5: - _SelectingKeyboardPlayerNr = 5; + _SelectingFastPlayerNr = 5; break; case Keys.D6: case Keys.NumPad6: - _SelectingKeyboardPlayerNr = 6; + _SelectingFastPlayerNr = 6; break; default: _UpdatePlayerNumber(); @@ -327,10 +327,10 @@ namespace Vocaluxe.Screens } - if (_SelectingKeyboardPlayerNr > 0 && _SelectingKeyboardPlayerNr <= CConfig.NumPlayer) + if (_SelectingFastPlayerNr > 0 && _SelectingFastPlayerNr <= CConfig.NumPlayer) { _SelectingKeyboardActive = true; - _NameSelections[_NameSelection].KeyboardSelection(true, _SelectingKeyboardPlayerNr); + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); } } @@ -339,10 +339,15 @@ namespace Vocaluxe.Screens public override bool HandleMouse(SMouseEvent mouseEvent) { - base.HandleMouse(mouseEvent); + bool stopSelectingFast = false; + + if (_SelectingFast) + _NameSelections[_NameSelection].HandleMouse(mouseEvent); + else + base.HandleMouse(mouseEvent); //Check if LeftButton is hold and Select-Mode inactive - if (mouseEvent.LBH && _SelectedPlayerNr < 0) + if (mouseEvent.LBH && _SelectedPlayerNr < 0 && !_SelectingFast) { //Save mouse-coords _OldMouseX = mouseEvent.X; @@ -366,7 +371,7 @@ namespace Vocaluxe.Screens } //Check if LeftButton is hold and Select-Mode active - if (mouseEvent.LBH && _SelectedPlayerNr >= 0) + if (mouseEvent.LBH && _SelectedPlayerNr >= 0 && !_SelectingFast) { //Update coords for Drag/Drop-Texture _ChooseAvatarStatic.Rect.X += mouseEvent.X - _OldMouseX; @@ -374,8 +379,8 @@ namespace Vocaluxe.Screens _OldMouseX = mouseEvent.X; _OldMouseY = mouseEvent.Y; } - // LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar - else if (_SelectedPlayerNr >= 0) + // LeftButton isn't hold anymore, but Select-Mode is still active -> "Drop" of Avatar + else if (_SelectedPlayerNr >= 0 && !_SelectingFast) { //Foreach Drop-Area for (int i = 0; i < _StaticPlayer.Length; i++) @@ -405,7 +410,37 @@ namespace Vocaluxe.Screens _ChooseAvatarStatic.Visible = false; } - if (mouseEvent.LB && _IsMouseOver(mouseEvent)) + if (mouseEvent.LB && _SelectingFast) + { + if (_NameSelections[_NameSelection].IsOverTile(mouseEvent)) + { + //Get player-number of tile + _SelectedPlayerNr = _NameSelections[_NameSelection].TilePlayerNr(mouseEvent); + if (_SelectedPlayerNr != -1) + { + //Update Game-infos with new player + CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr; + //Update config for default players. + CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; + CConfig.SaveConfig(); + //Update texture and name + _Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture; + _Texts[_TextPlayer[_SelectingFastPlayerNr - 1]].Text = CProfiles.Profiles[_SelectedPlayerNr].PlayerName; + //Update profile-warning + _CheckPlayers(); + //Update Tiles-List + _NameSelections[_NameSelection].UpdateList(); + _SelectingFastPlayerNr++; + if (_SelectingFastPlayerNr <= CGame.NumPlayer) + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); + else + stopSelectingFast = true; + } + else + stopSelectingFast = true; + } + } + else if (mouseEvent.LB && _IsMouseOver(mouseEvent)) { if (_Buttons[_ButtonBack].Selected) CGraphics.FadeTo(EScreens.ScreenSong); @@ -417,7 +452,9 @@ namespace Vocaluxe.Screens _NameSelections[_NameSelection].UpdateList(); } - if (mouseEvent.RB) + if (mouseEvent.RB && _SelectingFast) + stopSelectingFast = true; + else if (mouseEvent.RB) { bool exit = true; //Remove profile-selection @@ -443,6 +480,22 @@ namespace Vocaluxe.Screens CGraphics.FadeTo(EScreens.ScreenSong); } + if (mouseEvent.MB && _SelectingFast) + { + _SelectingFastPlayerNr++; + if (_SelectingFastPlayerNr <= CGame.NumPlayer) + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); + else + stopSelectingFast = true; + } + else if(mouseEvent.MB) + { + _SelectingFast = true; + _SelectingFastPlayerNr = 1; + _SelectingKeyboardActive = true; + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); + } + //Check mouse-wheel for scrolling if (mouseEvent.Wheel != 0) { @@ -452,6 +505,14 @@ namespace Vocaluxe.Screens _NameSelections[_NameSelection].UpdateList(offset); } } + + if (stopSelectingFast) + { + _SelectingFast = false; + _SelectingFastPlayerNr = 0; + _SelectingKeyboardActive = false; + _NameSelections[_NameSelection].FastSelection(false, -1); + } return true; } diff --git a/VocaluxeLib/Menu/CNameSelection.cs b/VocaluxeLib/Menu/CNameSelection.cs index aeea2e33..2888d8ea 100644 --- a/VocaluxeLib/Menu/CNameSelection.cs +++ b/VocaluxeLib/Menu/CNameSelection.cs @@ -346,7 +346,23 @@ namespace VocaluxeLib.Menu Selection = -1; } - public void KeyboardSelection(bool active, int player) + public void HandleMouse(SMouseEvent mevent) + { + for (int i = 0; i < _Tiles.Count; i++ ) + { + if (CHelper.IsInBounds(_Tiles[i].Avatar.Rect, mevent)) + { + _ActualSelection = i; + + if (Offset * _Tiles.Count + _ActualSelection < _VisibleProfiles.Count) + Selection = _VisibleProfiles[Offset * _Tiles.Count + _ActualSelection]; + else + Selection = -1; + } + } + } + + public void FastSelection(bool active, int player) { //Overwrite player-selection; Same profile, but other player if (active && Selection != -1) From d2516d4ad013c22669c398ae511b8fc7360a4229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sat, 27 Apr 2013 16:38:22 +0200 Subject: [PATCH 02/11] Double click on profile to use it for next free player. --- Vocaluxe/Screens/CScreenNames.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 16440de2..16642327 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -452,6 +452,33 @@ namespace Vocaluxe.Screens _NameSelections[_NameSelection].UpdateList(); } + if (mouseEvent.LD && _NameSelections[_NameSelection].IsOverTile(mouseEvent) && !_SelectingFast) + { + _SelectedPlayerNr = _NameSelections[_NameSelection].TilePlayerNr(mouseEvent); + if (_SelectedPlayerNr > -1) + { + for (int i = 0; i < CGame.NumPlayer; i++) + { + if (CGame.Players[i].ProfileID == -1) + { + //Update Game-infos with new player + CGame.Players[i].ProfileID = _SelectedPlayerNr; + //Update config for default players. + CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; + CConfig.SaveConfig(); + //Update texture and name + _Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture; + _Texts[_TextPlayer[i]].Text = CProfiles.Profiles[_SelectedPlayerNr].PlayerName; + //Update profile-warning + _CheckPlayers(); + //Update Tiles-List + _NameSelections[_NameSelection].UpdateList(); + break; + } + } + } + } + if (mouseEvent.RB && _SelectingFast) stopSelectingFast = true; else if (mouseEvent.RB) From d3c33764a22ad6f0531fc6cad3d76083eb169442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sat, 27 Apr 2013 17:03:40 +0200 Subject: [PATCH 03/11] Added drag'n'drop for selected profiles for easier switching and unsetting. --- Vocaluxe/Screens/CScreenNames.cs | 57 ++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 16642327..e104e317 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -57,8 +57,9 @@ namespace Vocaluxe.Screens private bool _SelectingKeyboardActive; private bool _SelectingFast; - private int _SelectingFastPlayerNr; - private int _SelectedPlayerNr; + private int _SelectingSwitchNr = -1; + private int _SelectingFastPlayerNr = 0; + private int _SelectedPlayerNr = -1; public override void Init() { @@ -368,6 +369,25 @@ namespace Vocaluxe.Screens _ChooseAvatarStatic.Texture = selectedPlayer.Texture; } } + else + { + for (int i = 0; i < CGame.NumPlayer; i++) + { + if (CHelper.IsInBounds(_Statics[_StaticPlayer[i]].Rect, mouseEvent)) + { + _SelectingSwitchNr = i; + _SelectedPlayerNr = CGame.Players[i].ProfileID; + //Update of Drag/Drop-Texture + CStatic selectedPlayer = _Statics[_StaticPlayerAvatar[i]]; + _ChooseAvatarStatic.Visible = true; + _ChooseAvatarStatic.Rect = selectedPlayer.Rect; + _ChooseAvatarStatic.Rect.Z = CSettings.ZNear; + _ChooseAvatarStatic.Color = new SColorF(1, 1, 1, 1); + _ChooseAvatarStatic.Texture = selectedPlayer.Texture; + break; + } + } + } } //Check if LeftButton is hold and Select-Mode active @@ -391,6 +411,26 @@ namespace Vocaluxe.Screens //Check if Mouse is in area if (CHelper.IsInBounds(_Statics[_StaticPlayer[i]].Rect, mouseEvent)) { + if (_SelectingSwitchNr > -1 && CGame.Players[i].ProfileID > -1) + { + //Update Game-infos with new player + CGame.Players[_SelectingSwitchNr].ProfileID = CGame.Players[i].ProfileID; + //Update config for default players. + CConfig.Players[_SelectingSwitchNr] = CProfiles.Profiles[i].ProfileFile; + //Update texture and name + _Statics[_StaticPlayerAvatar[_SelectingSwitchNr]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture; + _Texts[_TextPlayer[_SelectingSwitchNr]].Text = CProfiles.Profiles[CGame.Players[i].ProfileID].PlayerName; + } + else if (_SelectingSwitchNr > -1) + { + //Update Game-infos with new player + CGame.Players[_SelectingSwitchNr].ProfileID = -1; + //Update config for default players. + CConfig.Players[_SelectingSwitchNr] = string.Empty; + //Update texture and name + _Statics[_StaticPlayerAvatar[_SelectingSwitchNr]].Texture = _OriginalPlayerAvatarTextures[_SelectingSwitchNr]; + _Texts[_TextPlayer[_SelectingSwitchNr]].Text = CProfiles.GetPlayerName(-1, (_SelectingSwitchNr+1)); + } //Update Game-infos with new player CGame.Players[i].ProfileID = _SelectedPlayerNr; //Update config for default players. @@ -403,8 +443,21 @@ namespace Vocaluxe.Screens _CheckPlayers(); //Update Tiles-List _NameSelections[_NameSelection].UpdateList(); + break; + } + //Selected player is dropped out of area + else if (_SelectingSwitchNr > -1) + { + //Update Game-infos with new player + CGame.Players[_SelectingSwitchNr].ProfileID = -1; + //Update config for default players. + CConfig.Players[_SelectingSwitchNr] = string.Empty; + //Update texture and name + _Statics[_StaticPlayerAvatar[_SelectingSwitchNr]].Texture = _OriginalPlayerAvatarTextures[_SelectingSwitchNr]; + _Texts[_TextPlayer[_SelectingSwitchNr]].Text = CProfiles.GetPlayerName(-1, (_SelectingSwitchNr + 1)); } } + _SelectingSwitchNr = -1; _SelectedPlayerNr = -1; //Reset variables _ChooseAvatarStatic.Visible = false; From 3232a1e98929e02f2d67ea63fba9b501edea7105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sat, 27 Apr 2013 17:50:02 +0200 Subject: [PATCH 04/11] Reset selected players before activating fast-selection. --- Vocaluxe/Screens/CScreenNames.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index e104e317..99006246 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -140,6 +140,7 @@ namespace Vocaluxe.Screens { _SelectingFastPlayerNr = 1; _SelectingFast = true; + _ResetPlayerSelections(); } else { @@ -570,6 +571,7 @@ namespace Vocaluxe.Screens } else if(mouseEvent.MB) { + _ResetPlayerSelections(); _SelectingFast = true; _SelectingFastPlayerNr = 1; _SelectingKeyboardActive = true; @@ -706,6 +708,21 @@ namespace Vocaluxe.Screens _CheckPlayers(); } + private void _ResetPlayerSelections() + { + for (int i = 0; i < CGame.NumPlayer; i++) + { + CGame.Players[i].ProfileID = -1; + //Update config for default players. + CConfig.Players[i] = String.Empty; + //Update texture and name + _Statics[_StaticPlayerAvatar[i]].Texture = _OriginalPlayerAvatarTextures[i]; + _Texts[_TextPlayer[i]].Text = CProfiles.GetPlayerName(-1, i + 1); + } + _NameSelections[_NameSelection].UpdateList(); + CConfig.SaveConfig(); + } + private void _CheckMics() { List playerWithoutMicro = new List(); From bad6b272459191cdd688031bb36c97abc870055f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sun, 28 Apr 2013 10:15:40 +0200 Subject: [PATCH 05/11] Fixed webcam-image-aspect on ScreenProfiles. --- Vocaluxe/Screens/CScreenProfiles.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Vocaluxe/Screens/CScreenProfiles.cs b/Vocaluxe/Screens/CScreenProfiles.cs index 87ff1d71..b3c3740e 100644 --- a/Vocaluxe/Screens/CScreenProfiles.cs +++ b/Vocaluxe/Screens/CScreenProfiles.cs @@ -314,11 +314,9 @@ namespace Vocaluxe.Screens { if (_Snapshot == null) CWebcam.GetFrame(ref _WebcamTexture); - _Statics[_StaticAvatar].Texture = _WebcamTexture; - RectangleF bounds = new RectangleF(_WebcamTexture.Rect.X, _WebcamTexture.Rect.Y, _WebcamTexture.Rect.W, _WebcamTexture.Rect.H); - RectangleF rect = new RectangleF(0f, 0f, _WebcamTexture.Rect.W, _WebcamTexture.Rect.H); - CHelper.SetRect(bounds, out rect, rect.Width / rect.Height, EAspect.Crop); + _Statics[_StaticAvatar].Aspect = EAspect.Crop; + _Statics[_StaticAvatar].Texture = _WebcamTexture; } else _Statics[_StaticAvatar].Texture = CProfiles.Avatars[avatarNr].Texture; From 9712771eda9492a1459ce363060ecef686ee2b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Mon, 29 Apr 2013 08:28:15 +0200 Subject: [PATCH 06/11] Fixed error on loading playlists. --- Vocaluxe/Screens/CScreenSong.cs | 2 +- VocaluxeLib/Menu/CPlaylist.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 49e62367..abed8efb 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -1194,7 +1194,7 @@ namespace Vocaluxe.Screens private void _OpenPlaylist(int playlistID) { - if (CPlaylists.Playlists.Length > playlistID && playlistID >= 0) + if (CPlaylists.Playlists.Length > playlistID && playlistID >= 0 && _Playlists[_Playlist].ActivePlaylistID != playlistID) { _Playlists[_Playlist].LoadPlaylist(playlistID); _SongMenus[_SongMenu].SetSmallView(true); diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index 95f02019..29bb1943 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -1138,8 +1138,8 @@ namespace VocaluxeLib.Menu { if (playlistID > -1 && playlistID < CBase.Playlist.GetNumPlaylists()) { - _Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetPlaylistName(ActivePlaylistID); ActivePlaylistID = playlistID; + _Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetPlaylistName(ActivePlaylistID); _PlaylistElementContents.Clear(); for (int i = 0; i < CBase.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++) { From 3884632772aaa390859814c46669b88ecb640053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Mon, 29 Apr 2013 08:45:42 +0200 Subject: [PATCH 07/11] Added message for no-mics-error on party-screen. Please add "TR_SCREENPARTY_ERROR_MICS" to TRANSIFEX refs #2 --- Output/Themes/Ambient/Screens/ScreenParty.xml | 32 ++++++++++++++++++- Vocaluxe/Screens/CScreenParty.cs | 19 ++++------- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenParty.xml b/Output/Themes/Ambient/Screens/ScreenParty.xml index 86df74ac..c6779b60 100644 --- a/Output/Themes/Ambient/Screens/ScreenParty.xml +++ b/Output/Themes/Ambient/Screens/ScreenParty.xml @@ -471,6 +471,36 @@ + + + 850 + 560 + + 0,00 + + 32 + + 600 + + + TextWarningColor + + + TextSColor + + Center + + Center + + + + Outline + + TR_SCREENPARTY_ERROR_MICS + + + + Button @@ -653,4 +683,4 @@ 1 - \ No newline at end of file + diff --git a/Vocaluxe/Screens/CScreenParty.cs b/Vocaluxe/Screens/CScreenParty.cs index f6e37116..d81e0fec 100644 --- a/Vocaluxe/Screens/CScreenParty.cs +++ b/Vocaluxe/Screens/CScreenParty.cs @@ -39,6 +39,7 @@ namespace Vocaluxe.Screens private const string _TextAuthor = "TextAuthor"; private const string _TextVersion = "TextVersion"; private const string _TextError = "TextError"; + private const string _TextErrorMics = "TextErrorMics"; private const string _ButtonStart = "ButtonStart"; private const string _ButtonExit = "ButtonExit"; private const string _SelectSlideModes = "SelectSlideModes"; @@ -49,7 +50,7 @@ namespace Vocaluxe.Screens { base.Init(); - _ThemeTexts = new string[] {_TextDescription, _TextTargetAudience, _TextNumTeams, _TextNumPlayers, _TextAuthor, _TextVersion, _TextError}; + _ThemeTexts = new string[] {_TextDescription, _TextTargetAudience, _TextNumTeams, _TextNumPlayers, _TextAuthor, _TextVersion, _TextError, _TextErrorMics}; _ThemeButtons = new string[] {_ButtonStart, _ButtonExit}; _ThemeSelectSlides = new string[] {_SelectSlideModes}; } @@ -120,6 +121,8 @@ namespace Vocaluxe.Screens _SelectSlides[_SelectSlideModes].Selection = 0; _UpdateSelection(); + _Texts[_TextErrorMics].Visible = CConfig.GetMaxNumMics() == 0; + _SetInteractionToSelectSlide(_SelectSlides[_SelectSlideModes]); } @@ -174,16 +177,8 @@ namespace Vocaluxe.Screens _Texts[_TextVersion].Text = _PartyModeInfos[index].VersionMajor + "." + _PartyModeInfos[index].VersionMinor; _Texts[_TextVersion].TranslationID = _PartyModeInfos[index].PartyModeID; - if (!_PartyModeInfos[index].Playable) - { - _Buttons[_ButtonStart].Visible = false; - _Texts[_TextError].Visible = true; - } - else - { - _Buttons[_ButtonStart].Visible = true; - _Texts[_TextError].Visible = false; - } + _Buttons[_ButtonStart].Visible = _PartyModeInfos[index].Playable && CConfig.GetMaxNumMics() > 0; + _Texts[_TextError].Visible = !_PartyModeInfos[index].Playable; } private void _StartPartyMode() @@ -196,7 +191,7 @@ namespace Vocaluxe.Screens return; if (CConfig.GetMaxNumMics() == 0) - return; //TODO: Add message! + return; CParty.SetPartyMode(_PartyModeInfos[index].PartyModeID); CGraphics.FadeTo(EScreens.ScreenPartyDummy); From 4aa94e188c2e74fa20f6a1e1bb0bb178e0ac165d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Mon, 29 Apr 2013 09:24:18 +0200 Subject: [PATCH 08/11] Added more lyric-position-options. TRANSIFEX: Add: TR_SCREENOLYRICS_POSITION, TR_CONFIG_LYRICSPOSITION_BOTTOM, TR_CONFIG_LYRICSPOSITION_TOP, TR_CONFIG_LYRICSPOSITION_BOTH, TR_CONFIG_LYRICSPOSITION_DYNAMIC Remove: TR_SCREENOLYRICS_ONTOP --- .../Ambient/Screens/ScreenOptionsLyrics.xml | 10 ++--- .../Changelog_ScreenOptionsLyrics.txt | 4 +- Vocaluxe/Base/CConfig.cs | 8 ++-- Vocaluxe/Screens/CScreenOptionsLyrics.cs | 10 ++--- Vocaluxe/Screens/CScreenSing.cs | 40 +++++++++++++------ VocaluxeLib/Menu/Enums.cs | 8 ++++ 6 files changed, 52 insertions(+), 28 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsLyrics.xml b/Output/Themes/Ambient/Screens/ScreenOptionsLyrics.xml index 72cd3bdb..0276de59 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsLyrics.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsLyrics.xml @@ -1,7 +1,7 @@  - 1 + 2 Video @@ -111,7 +111,7 @@ Outline - TR_SCREENOLYRICS_ONTOP + TR_SCREENOLYRICS_POSITION @@ -240,7 +240,7 @@ 4 - + Invisible @@ -306,6 +306,6 @@ Bold 2 - + - \ No newline at end of file + diff --git a/Output/Themes/Changelog/Changelog_ScreenOptionsLyrics.txt b/Output/Themes/Changelog/Changelog_ScreenOptionsLyrics.txt index 8af47a1e..2c584a57 100644 --- a/Output/Themes/Changelog/Changelog_ScreenOptionsLyrics.txt +++ b/Output/Themes/Changelog/Changelog_ScreenOptionsLyrics.txt @@ -1,5 +1,7 @@ ScreenOptionsSound - +++++++++++ +Version 2: +Rename to ++++++++++ Version 1: diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index f15bb95d..af26eae3 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -93,7 +93,7 @@ namespace Vocaluxe.Base public static int NumPlayer = 2; public static EOffOn Tabs = EOffOn.TR_CONFIG_OFF; public static string Language = "English"; - public static EOffOn LyricsOnTop = EOffOn.TR_CONFIG_OFF; + public static ELyricsPosition LyricsPosition = ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM; public static readonly string[] Players = new string[CSettings.MaxNumPlayer]; public static float MinLineBreakTime = 0.1f; //Minimum time to show the text before it is (to be) sung (if possible) @@ -221,7 +221,7 @@ namespace Vocaluxe.Base xmlReader.TryGetIntValue("//root/Game/NumPlayer", ref NumPlayer); xmlReader.TryGetEnumValue("//root/Game/Tabs", ref Tabs); xmlReader.GetValue("//root/Game/Language", out Language, Language); - xmlReader.TryGetEnumValue("//root/Game/LyricsOnTop", ref LyricsOnTop); + xmlReader.TryGetEnumValue("//root/Game/LyricsOnTop", ref LyricsPosition); xmlReader.TryGetFloatValue("//root/Game/MinLineBreakTime", ref MinLineBreakTime); if ((ScoreAnimationTime > 0 && ScoreAnimationTime < 1) || ScoreAnimationTime < 0) @@ -461,8 +461,8 @@ namespace Vocaluxe.Base writer.WriteComment("Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)))); writer.WriteElementString("Tabs", Enum.GetName(typeof(EOffOn), Tabs)); - writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)))); - writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(EOffOn), LyricsOnTop)); + writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(ELyricsPosition)))); + writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(ELyricsPosition), LyricsPosition)); writer.WriteComment("MinLineBreakTime: Value >= 0 in s. Minimum time the text is shown before it is to be sung"); writer.WriteElementString("MinLineBreakTime", MinLineBreakTime.ToString()); diff --git a/Vocaluxe/Screens/CScreenOptionsLyrics.cs b/Vocaluxe/Screens/CScreenOptionsLyrics.cs index 718b9b2d..029923e2 100644 --- a/Vocaluxe/Screens/CScreenOptionsLyrics.cs +++ b/Vocaluxe/Screens/CScreenOptionsLyrics.cs @@ -28,11 +28,11 @@ 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 1; } + get { return 2; } } private const string _SelectSlideLyricStyle = "SelectSlideLyricStyle"; - private const string _SelectSlideLyricsOnTop = "SelectSlideLyricsOnTop"; + private const string _SelectSlideLyricsPosition = "SelectSlideLyricsPosition"; private const string _ButtonExit = "ButtonExit"; @@ -41,14 +41,14 @@ namespace Vocaluxe.Screens base.Init(); _ThemeButtons = new string[] {_ButtonExit}; - _ThemeSelectSlides = new string[] {_SelectSlideLyricStyle, _SelectSlideLyricsOnTop}; + _ThemeSelectSlides = new string[] {_SelectSlideLyricStyle, _SelectSlideLyricsPosition}; } public override void LoadTheme(string xmlPath) { base.LoadTheme(xmlPath); _SelectSlides[_SelectSlideLyricStyle].SetValues((int)CConfig.LyricStyle); - _SelectSlides[_SelectSlideLyricsOnTop].SetValues((int)CConfig.LyricsOnTop); + _SelectSlides[_SelectSlideLyricsPosition].SetValues((int)CConfig.LyricsPosition); } public override bool HandleInput(SKeyEvent keyEvent) @@ -122,7 +122,7 @@ namespace Vocaluxe.Screens private void _SaveConfig() { - CConfig.LyricsOnTop = (EOffOn)_SelectSlides[_SelectSlideLyricsOnTop].Selection; + CConfig.LyricsPosition = (ELyricsPosition)_SelectSlides[_SelectSlideLyricsPosition].Selection; CConfig.LyricStyle = (ELyricStyle)_SelectSlides[_SelectSlideLyricStyle].Selection; CConfig.SaveConfig(); } diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 21aff197..88e61824 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -649,6 +649,7 @@ namespace Vocaluxe.Screens } } _SetDuetLyricsVisibility(song.IsDuet); + _SetNormalLyricsVisibility(); for (int p = 0; p < CGame.NumPlayer; p++) _NoteLines[p] = _SingNotes[_SingBars].AddPlayer(_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1], CTheme.GetPlayerColor(p + 1), p); @@ -688,13 +689,23 @@ namespace Vocaluxe.Screens } else { - bool lyricsOnTop = (CGame.NumPlayer != 1) && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON; + bool lyricsOnTop = CConfig.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP + || CConfig.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH + || (CConfig.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && (CGame.NumPlayer > 2 && CGame.NumPlayer != 4)); _Lyrics[_LyricMainTop].Visible = lyricsOnTop; _Lyrics[_LyricSubTop].Visible = lyricsOnTop; _Statics[_StaticLyricsTop].Visible = lyricsOnTop; } } + private void _SetNormalLyricsVisibility() + { + bool visible = CConfig.LyricsPosition != ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP; + _Lyrics[_LyricMain].Visible = visible; + _Lyrics[_LyricSub].Visible = visible; + _Statics[_StaticLyrics].Visible = visible; + } + private void _StartSong() { _PrepareTimeLine(); @@ -999,27 +1010,30 @@ namespace Vocaluxe.Screens if (time > totaltime) time = totaltime; - SRectF rect = _Statics[_StaticLyricHelper].Rect; - SColorF color = new SColorF( - _Statics[_StaticLyricHelper].Color.R, - _Statics[_StaticLyricHelper].Color.G, - _Statics[_StaticLyricHelper].Color.B, - _Statics[_StaticLyricHelper].Color.A * _Statics[_StaticLyricHelper].Alpha * alpha); + if (_Statics[_StaticLyrics].Visible) + { + SRectF rect = _Statics[_StaticLyricHelper].Rect; + SColorF color = new SColorF( + _Statics[_StaticLyricHelper].Color.R, + _Statics[_StaticLyricHelper].Color.G, + _Statics[_StaticLyricHelper].Color.B, + _Statics[_StaticLyricHelper].Color.A * _Statics[_StaticLyricHelper].Alpha * alpha); - float distance = _Lyrics[_LyricMain].GetCurrentLyricPosX() - rect.X - rect.W; - CDraw.DrawTexture(_Statics[_StaticLyricHelper].Texture, - new SRectF(rect.X + distance * (1f - time / totaltime), rect.Y, rect.W, rect.H, rect.Z), color); + float distance = _Lyrics[_LyricMain].GetCurrentLyricPosX() - rect.X - rect.W; + CDraw.DrawTexture(_Statics[_StaticLyricHelper].Texture, + new SRectF(rect.X + distance * (1f - time / totaltime), rect.Y, rect.W, rect.H, rect.Z), color); + } if (_Statics[_StaticLyricsTop].Visible) { - rect = _Statics[_StaticLyricHelperTop].Rect; - color = new SColorF( + SRectF rect = _Statics[_StaticLyricHelperTop].Rect; + SColorF color = new SColorF( _Statics[_StaticLyricHelperTop].Color.R, _Statics[_StaticLyricHelperTop].Color.G, _Statics[_StaticLyricHelperTop].Color.B, _Statics[_StaticLyricHelperTop].Color.A * _Statics[_StaticLyricHelper].Alpha * alpha); - distance = _Lyrics[_LyricMainTop].GetCurrentLyricPosX() - rect.X - rect.W; + float distance = _Lyrics[_LyricMainTop].GetCurrentLyricPosX() - rect.X - rect.W; CDraw.DrawTexture(_Statics[_StaticLyricHelperTop].Texture, new SRectF(rect.X + distance * (1f - time / totaltime), rect.Y, rect.W, rect.H, rect.Z), color); } diff --git a/VocaluxeLib/Menu/Enums.cs b/VocaluxeLib/Menu/Enums.cs index 29babf1e..126575ce 100644 --- a/VocaluxeLib/Menu/Enums.cs +++ b/VocaluxeLib/Menu/Enums.cs @@ -272,6 +272,14 @@ namespace VocaluxeLib.Menu // ReSharper restore InconsistentNaming } + public enum ELyricsPosition + { + TR_CONFIG_LYRICSPOSITION_BOTTOM, + TR_CONFIG_LYRICSPOSITION_TOP, + TR_CONFIG_LYRICSPOSITION_BOTH, + TR_CONFIG_LYRICSPOSITION_DYNAMIC + } + public enum ELyricStyle { Fill, From 0187dd5638809bec8020cc118eebbe410c134465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Mon, 29 Apr 2013 11:28:18 +0200 Subject: [PATCH 09/11] Fixed wrong game-mode on ScreenHighscore. --- Vocaluxe/Screens/CScreenHighscore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 0f3bb0c4..3dc5ef1e 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -255,7 +255,7 @@ namespace Vocaluxe.Screens if (points.NumRounds > 1) _Texts[_TextSongName].Text += " (" + (_Round + 1) + "/" + points.NumRounds + ")"; - switch (CGame.GetGameMode(_Round)) + switch (CGame.GetGameMode(_Round + 1)) { case EGameMode.TR_GAMEMODE_NORMAL: _Texts[_TextSongMode].Text = "TR_GAMEMODE_NORMAL"; From 331fbb152642a41be536d54f0390cca3893de51e Mon Sep 17 00:00:00 2001 From: Flamefire Date: Tue, 30 Apr 2013 19:42:37 +0200 Subject: [PATCH 10/11] Revert "Added message for no-mics-error on party-screen." This reverts commit 3884632772aaa390859814c46669b88ecb640053. --- Output/Themes/Ambient/Screens/ScreenParty.xml | 32 +------------------ Vocaluxe/Screens/CScreenParty.cs | 19 +++++++---- 2 files changed, 13 insertions(+), 38 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenParty.xml b/Output/Themes/Ambient/Screens/ScreenParty.xml index c6779b60..86df74ac 100644 --- a/Output/Themes/Ambient/Screens/ScreenParty.xml +++ b/Output/Themes/Ambient/Screens/ScreenParty.xml @@ -471,36 +471,6 @@ - - - 850 - 560 - - 0,00 - - 32 - - 600 - - - TextWarningColor - - - TextSColor - - Center - - Center - - - - Outline - - TR_SCREENPARTY_ERROR_MICS - - - - Button @@ -683,4 +653,4 @@ 1 - + \ No newline at end of file diff --git a/Vocaluxe/Screens/CScreenParty.cs b/Vocaluxe/Screens/CScreenParty.cs index d81e0fec..f6e37116 100644 --- a/Vocaluxe/Screens/CScreenParty.cs +++ b/Vocaluxe/Screens/CScreenParty.cs @@ -39,7 +39,6 @@ namespace Vocaluxe.Screens private const string _TextAuthor = "TextAuthor"; private const string _TextVersion = "TextVersion"; private const string _TextError = "TextError"; - private const string _TextErrorMics = "TextErrorMics"; private const string _ButtonStart = "ButtonStart"; private const string _ButtonExit = "ButtonExit"; private const string _SelectSlideModes = "SelectSlideModes"; @@ -50,7 +49,7 @@ namespace Vocaluxe.Screens { base.Init(); - _ThemeTexts = new string[] {_TextDescription, _TextTargetAudience, _TextNumTeams, _TextNumPlayers, _TextAuthor, _TextVersion, _TextError, _TextErrorMics}; + _ThemeTexts = new string[] {_TextDescription, _TextTargetAudience, _TextNumTeams, _TextNumPlayers, _TextAuthor, _TextVersion, _TextError}; _ThemeButtons = new string[] {_ButtonStart, _ButtonExit}; _ThemeSelectSlides = new string[] {_SelectSlideModes}; } @@ -121,8 +120,6 @@ namespace Vocaluxe.Screens _SelectSlides[_SelectSlideModes].Selection = 0; _UpdateSelection(); - _Texts[_TextErrorMics].Visible = CConfig.GetMaxNumMics() == 0; - _SetInteractionToSelectSlide(_SelectSlides[_SelectSlideModes]); } @@ -177,8 +174,16 @@ namespace Vocaluxe.Screens _Texts[_TextVersion].Text = _PartyModeInfos[index].VersionMajor + "." + _PartyModeInfos[index].VersionMinor; _Texts[_TextVersion].TranslationID = _PartyModeInfos[index].PartyModeID; - _Buttons[_ButtonStart].Visible = _PartyModeInfos[index].Playable && CConfig.GetMaxNumMics() > 0; - _Texts[_TextError].Visible = !_PartyModeInfos[index].Playable; + if (!_PartyModeInfos[index].Playable) + { + _Buttons[_ButtonStart].Visible = false; + _Texts[_TextError].Visible = true; + } + else + { + _Buttons[_ButtonStart].Visible = true; + _Texts[_TextError].Visible = false; + } } private void _StartPartyMode() @@ -191,7 +196,7 @@ namespace Vocaluxe.Screens return; if (CConfig.GetMaxNumMics() == 0) - return; + return; //TODO: Add message! CParty.SetPartyMode(_PartyModeInfos[index].PartyModeID); CGraphics.FadeTo(EScreens.ScreenPartyDummy); From 9a6f94a769ddb314a0a99923c8328a179c16889c Mon Sep 17 00:00:00 2001 From: Flamefire Date: Tue, 30 Apr 2013 19:46:57 +0200 Subject: [PATCH 11/11] Changed message for No mics in Party mode TRANSIFEX: add TR_SCREENPARTY_ERROR_MICS --- Vocaluxe/Screens/CScreenParty.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Vocaluxe/Screens/CScreenParty.cs b/Vocaluxe/Screens/CScreenParty.cs index 79d12cad..6b31fab1 100644 --- a/Vocaluxe/Screens/CScreenParty.cs +++ b/Vocaluxe/Screens/CScreenParty.cs @@ -180,6 +180,12 @@ namespace Vocaluxe.Screens _Texts[_TextError].Text = "TR_SCREENPARTY_ERROR"; _Texts[_TextError].Visible = true; } + else if (CConfig.GetMaxNumMics() == 0) + { + _Buttons[_ButtonStart].Visible = false; + _Texts[_TextError].Text = "TR_SCREENPARTY_ERROR_MICS"; + _Texts[_TextError].Visible = true; + } else { _Buttons[_ButtonStart].Visible = true; @@ -198,13 +204,6 @@ namespace Vocaluxe.Screens _Buttons[_ButtonStart].Visible = false; _Texts[_TextError].Text = "TR_SCREENPARTY_ERROR"; _Texts[_TextError].Visible = true; - } - - if (CConfig.GetMaxNumMics() == 0) - { - _Buttons[_ButtonStart].Visible = false; - _Texts[_TextError].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_PL").Replace("%v", ""); - _Texts[_TextError].Visible = true; return; }