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 01fcfac2..7a939e8d 100644
--- a/Vocaluxe/Base/CConfig.cs
+++ b/Vocaluxe/Base/CConfig.cs
@@ -94,7 +94,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)
@@ -222,7 +222,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/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";
diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs
index 9f7fc909..99006246 100644
--- a/Vocaluxe/Screens/CScreenNames.cs
+++ b/Vocaluxe/Screens/CScreenNames.cs
@@ -56,9 +56,10 @@ namespace Vocaluxe.Screens
private readonly STexture[] _OriginalPlayerAvatarTextures = new STexture[CSettings.MaxNumPlayer];
private bool _SelectingKeyboardActive;
- private bool _SelectingKeyboardUnendless;
- private int _SelectingKeyboardPlayerNr;
- private int _SelectedPlayerNr;
+ private bool _SelectingFast;
+ private int _SelectingSwitchNr = -1;
+ private int _SelectingFastPlayerNr = 0;
+ private int _SelectedPlayerNr = -1;
public override void Init()
{
@@ -137,16 +138,17 @@ namespace Vocaluxe.Screens
case Keys.P:
if (!_SelectingKeyboardActive)
{
- _SelectingKeyboardPlayerNr = 1;
- _SelectingKeyboardUnendless = true;
+ _SelectingFastPlayerNr = 1;
+ _SelectingFast = true;
+ _ResetPlayerSelections();
}
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 +167,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 +181,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 +226,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 +246,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 +296,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 +329,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 +341,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;
@@ -363,10 +370,29 @@ 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
- 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 +400,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++)
@@ -386,6 +412,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.
@@ -398,14 +444,57 @@ 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;
}
- 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 +506,36 @@ namespace Vocaluxe.Screens
_NameSelections[_NameSelection].UpdateList();
}
- if (mouseEvent.RB)
+ 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)
{
bool exit = true;
//Remove profile-selection
@@ -443,6 +561,23 @@ 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)
+ {
+ _ResetPlayerSelections();
+ _SelectingFast = true;
+ _SelectingFastPlayerNr = 1;
+ _SelectingKeyboardActive = true;
+ _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr);
+ }
+
//Check mouse-wheel for scrolling
if (mouseEvent.Wheel != 0)
{
@@ -452,6 +587,14 @@ namespace Vocaluxe.Screens
_NameSelections[_NameSelection].UpdateList(offset);
}
}
+
+ if (stopSelectingFast)
+ {
+ _SelectingFast = false;
+ _SelectingFastPlayerNr = 0;
+ _SelectingKeyboardActive = false;
+ _NameSelections[_NameSelection].FastSelection(false, -1);
+ }
return true;
}
@@ -565,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();
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/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;
}
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;
diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs
index 4a93a260..f85934f9 100644
--- a/Vocaluxe/Screens/CScreenSing.cs
+++ b/Vocaluxe/Screens/CScreenSing.cs
@@ -651,6 +651,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);
@@ -690,13 +691,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();
@@ -1001,27 +1012,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/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs
index a9de0f7d..e04ad980 100644
--- a/Vocaluxe/Screens/CScreenSong.cs
+++ b/Vocaluxe/Screens/CScreenSong.cs
@@ -1196,7 +1196,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/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)
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++)
{
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,