diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml
index ecb1c632..e3aac4ae 100644
--- a/Output/Languages/Deutsch.xml
+++ b/Output/Languages/Deutsch.xml
@@ -118,6 +118,10 @@
Warnung: Den Spielern %v sind keine Profile zugeordnet!
Songauswahl
+ Lied singen
+ Zur Playlist hinzufügen
+ Schließen
+ Lied-Optionen
Suche:
Ohne Sprache
Ohne Jahr
diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml
index e40c62d2..fb5d72e4 100644
--- a/Output/Languages/English.xml
+++ b/Output/Languages/English.xml
@@ -118,6 +118,10 @@
Warning: There are no profiles assigned to players %v!
Song Selection
+ Sing
+ Add to playlist
+ Close
+ Song Options
Search:
No Language
No Year
diff --git a/Output/Themes/Ambient/Screens/ScreenSong.xml b/Output/Themes/Ambient/Screens/ScreenSong.xml
index 84bfa297..fc3e511a 100644
--- a/Output/Themes/Ambient/Screens/ScreenSong.xml
+++ b/Output/Themes/Ambient/Screens/ScreenSong.xml
@@ -1,7 +1,7 @@
- 2
+ 3
Video
@@ -33,6 +33,25 @@
26
+
+
+ SongMenuBG
+
+ 40
+ 40
+ -2,10
+ 360
+ 360
+
+
+ 1
+ 1
+ 1
+ 0.3
+
+
+
+
Menu
@@ -53,6 +72,175 @@
26
+
+
+ Button
+
+ Button
+
+ 40
+ 90
+ -2,11
+ 360
+ 40
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ 180
+ 5
+
+ 30
+
+ 350
+
+
+ ButtonTextColor
+
+
+ ButtonTextSColor
+
+ Center
+
+
+
+ Outline
+
+ TR_SCREENSONG_BUTTON_SING
+
+
+
+
+
+
+
+
+
+
+ Button
+
+ Button
+
+ 40
+ 180
+ -2,11
+ 360
+ 40
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ 180
+ 5
+
+ 30
+
+ 350
+
+
+ ButtonTextColor
+
+
+ ButtonTextSColor
+
+ Center
+
+
+
+ Outline
+
+ TR_SCREENSONG_BUTTON_PLAYLIST
+
+
+
+
+
+
+
+
+
+
+ Button
+
+ Button
+
+ 40
+ 225
+ -2,11
+ 360
+ 40
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ 180
+ 5
+
+ 30
+
+ 350
+
+
+ ButtonTextColor
+
+
+ ButtonTextSColor
+
+ Center
+
+
+
+ Outline
+
+ TR_SCREENSONG_BUTTON_CANCEL
+
+
+
+
+
+
+
+
+
+
+ 200
+ 45
+
+ -2,11
+
+ 40
+
+ 350
+
+
+ StaticColor
+
+
+ TextSColor
+
+ Center
+
+
+
+ Outline
+
+ TR_SCREENSONG_SONGOPTIONS
+
+
+
+
220
@@ -171,6 +359,71 @@
+
+
+ Button
+
+ SelectSlideArrowLeft
+
+ SelectSlideArrowRight
+
+ SelectSlide
+
+ SelectSlideArrowLeft
+
+ SelectSlideArrowRight
+
+ SelectSlide
+
+ 40
+ 135
+ -2,11
+ 360
+ 40
+
+ 45
+ 140
+ -2,12
+ 30
+ 30
+
+ 365
+ 140
+ -2,12
+ 30
+ 30
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ SelectSlideHColor
+
+
+ ArrowColor
+
+
+ ArrowSColor
+
+
+ TextColor
+
+
+ TextSColor
+
+ 30
+
+ 280
+
+ Outline
+
+ Bold
+
+ 1
+
CoverTile
@@ -395,4 +648,4 @@
-
\ No newline at end of file
+
diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml
index 3369f76b..3169a5a6 100644
--- a/Output/Themes/Ambient/Skin Blue.xml
+++ b/Output/Themes/Ambient/Skin Blue.xml
@@ -308,6 +308,7 @@
PlayIcon.png
PauseIcon.png
RepeatIcon.png
+ SongMenuBG.png
[Blue]BG_Video.mp4
diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml
index 46bfead0..fd6af963 100644
--- a/Output/Themes/Ambient/Skin Green.xml
+++ b/Output/Themes/Ambient/Skin Green.xml
@@ -308,6 +308,7 @@
PlayIcon.png
PauseIcon.png
RepeatIcon.png
+ SongMenuBG.png
[Green]BG_Video.mp4
diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml
index cf07c56a..c48cc135 100644
--- a/Output/Themes/Ambient/Skin Red.xml
+++ b/Output/Themes/Ambient/Skin Red.xml
@@ -308,6 +308,7 @@
PlayIcon.png
PauseIcon.png
RepeatIcon.png
+ SongMenuBG.png
[Red]BG_Video.mp4
diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml
index e89cb753..9e58f222 100644
--- a/Output/Themes/Ambient/Skin Yellow.xml
+++ b/Output/Themes/Ambient/Skin Yellow.xml
@@ -308,6 +308,7 @@
PlayIcon.png
PauseIcon.png
RepeatIcon.png
+ SongMenuBG.png
[Yellow]BG_Video.mp4
diff --git a/Output/Themes/Ambient/SongMenuBG.png b/Output/Themes/Ambient/SongMenuBG.png
new file mode 100644
index 00000000..a7333adb
Binary files /dev/null and b/Output/Themes/Ambient/SongMenuBG.png differ
diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs
index 5ee5c9e5..d8035d7a 100644
--- a/Vocaluxe/Screens/CScreenSong.cs
+++ b/Vocaluxe/Screens/CScreenSong.cs
@@ -17,22 +17,35 @@ namespace Vocaluxe.Screens
class CScreenSong : CMenu
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
- const int ScreenVersion = 2;
+ const int ScreenVersion = 3;
private const string TextCategory = "TextCategory";
private const string TextSelection = "TextSelection";
private const string TextSearchBarTitle = "TextSearchBarTitle";
private const string TextSearchBar = "TextSearchBar";
+ private const string TextOptionsTitle = "TextOptionsTitle";
+
+ private const string ButtonOptionsSing = "ButtonOptionsSing";
+ private const string ButtonOptionsPlaylist = "ButtonOptionsPlaylist";
+ private const string ButtonOptionsClose = "ButtonOptionsClose";
+
+ private const string SelectSlideOptionsMode = "SelectSlideOptionsMode";
private const string StaticSearchBar = "StaticSearchBar";
+ private const string StaticOptionsBG = "StaticOptionsBG";
private const string SongMenu = "SongMenu";
private string _SearchText = String.Empty;
private bool _SearchActive = false;
+ private bool _SongOptionsActive = false;
+ private List _AvailableGameModes;
+
public CScreenSong()
{
Init();
+
+ _AvailableGameModes = new List();
}
protected override void Init()
@@ -41,87 +54,76 @@ namespace Vocaluxe.Screens
_ThemeName = "ScreenSong";
_ScreenVersion = ScreenVersion;
- _ThemeStatics = new string[] { StaticSearchBar };
- _ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar };
+ _ThemeStatics = new string[] { StaticSearchBar, StaticOptionsBG };
+ _ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar, TextOptionsTitle };
+ _ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing };
+ _ThemeSelectSlides = new string[] { SelectSlideOptionsMode };
_ThemeSongMenus = new string[] { SongMenu };
}
public override void LoadTheme()
{
base.LoadTheme();
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = false;
+ Buttons[htButtons(ButtonOptionsClose)].Visible = false;
+ Buttons[htButtons(ButtonOptionsSing)].Visible = false;
+ Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false;
+ Texts[htTexts(TextOptionsTitle)].Visible = false;
+ Statics[htStatics(StaticOptionsBG)].Visible = false;
}
public override bool HandleInput(KeyEvent KeyEvent)
{
base.HandleInput(KeyEvent);
- if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode))
+ if (!_SongOptionsActive)
{
- if (_SearchActive)
- ApplyNewSearchFilter(_SearchText + KeyEvent.Unicode);
- /*
- else if (!Char.IsControl(KeyEvent.Unicode))
+
+ if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode))
{
- JumpTo(KeyEvent.Unicode);
- return true;
- } */
- }
- else
- {
- SongMenus[htSongMenus(SongMenu)].HandleInput(ref KeyEvent);
-
- if (KeyEvent.Handled)
- return true;
-
- switch (KeyEvent.Key)
+ if (_SearchActive)
+ ApplyNewSearchFilter(_SearchText + KeyEvent.Unicode);
+ /*
+ else if (!Char.IsControl(KeyEvent.Unicode))
+ {
+ JumpTo(KeyEvent.Unicode);
+ return true;
+ } */
+ }
+ else
{
- case Keys.Escape:
- if (CSongs.Category < 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
- CGraphics.FadeTo(EScreens.ScreenMain);
- break;
+ SongMenus[htSongMenus(SongMenu)].HandleInput(ref KeyEvent);
- case Keys.Enter:
- if (CSongs.NumVisibleSongs > 0)
- StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
- break;
+ if (KeyEvent.Handled)
+ return true;
- case Keys.Back:
- if (_SearchText.Length > 0)
- {
- ApplyNewSearchFilter(_SearchText.Remove(_SearchText.Length - 1));
- }
+ switch (KeyEvent.Key)
+ {
+ case Keys.Escape:
+ if (CSongs.Category < 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
+ CGraphics.FadeTo(EScreens.ScreenMain);
+ break;
- if (!_SearchActive && CSongs.Category < 0)
- CGraphics.FadeTo(EScreens.ScreenMain);
+ case Keys.Enter:
+ if (CSongs.NumVisibleSongs > 0)
+ {
+ if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
+ ToggleSongOptions();
+ }
+ break;
- break;
+ case Keys.Back:
+ if (_SearchText.Length > 0)
+ {
+ ApplyNewSearchFilter(_SearchText.Remove(_SearchText.Length - 1));
+ }
- case Keys.F3:
- if (_SearchActive)
- {
- _SearchActive = false;
- _SearchText = String.Empty;
- ApplyNewSearchFilter(_SearchText);
- }
- else
- {
- _SearchActive = true;
- }
- break;
+ if (!_SearchActive && CSongs.Category < 0)
+ CGraphics.FadeTo(EScreens.ScreenMain);
- case Keys.A:
- if (!_SearchActive && KeyEvent.Mod == Modifier.None)
- {
- StartRandomAllSongs();
- }
- if (KeyEvent.Mod == Modifier.Ctrl)
- {
- StartRandomVisibleSongs();
- }
- break;
+ break;
- case Keys.F:
- if (KeyEvent.Mod == Modifier.Ctrl){
+ case Keys.F3:
if (_SearchActive)
{
_SearchActive = false;
@@ -132,19 +134,69 @@ namespace Vocaluxe.Screens
{
_SearchActive = true;
}
- }
- break;
+ break;
- case Keys.R:
- if (CSongs.Category != -1 && KeyEvent.Mod == Modifier.Ctrl)
+ case Keys.A:
+ if (!_SearchActive && KeyEvent.Mod == Modifier.None)
+ {
+ StartRandomAllSongs();
+ }
+ if (KeyEvent.Mod == Modifier.Ctrl)
+ {
+ StartRandomVisibleSongs();
+ }
+ break;
+
+ case Keys.F:
+ if (KeyEvent.Mod == Modifier.Ctrl)
+ {
+ if (_SearchActive)
+ {
+ _SearchActive = false;
+ _SearchText = String.Empty;
+ ApplyNewSearchFilter(_SearchText);
+ }
+ else
+ {
+ _SearchActive = true;
+ }
+ }
+ break;
+
+ case Keys.R:
+ if (CSongs.Category != -1 && KeyEvent.Mod == Modifier.Ctrl)
+ {
+ SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
+ }
+ break;
+
+ case Keys.S:
+ if (CSongs.NumVisibleSongs > 0)
+ StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
+ break;
+ }
+ }
+ }
+
+ else
+ {
+ switch (KeyEvent.Key)
+ {
+ case Keys.Enter:
+ if (Buttons[htButtons(ButtonOptionsClose)].Selected)
+ ToggleSongOptions();
+ else if (Buttons[htButtons(ButtonOptionsSing)].Selected)
{
- SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
+ ToggleSongOptions();
+ StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
}
+ else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
+ ToggleSongOptions();
break;
- case Keys.S:
- if (CSongs.NumVisibleSongs > 0)
- StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
+ case Keys.Escape:
+ case Keys.Back:
+ ToggleSongOptions();
break;
}
}
@@ -156,22 +208,55 @@ namespace Vocaluxe.Screens
{
base.HandleMouse(MouseEvent);
- if ((MouseEvent.RB) && (CSongs.Category < 0))
+ if (!_SongOptionsActive)
{
- CGraphics.FadeTo(EScreens.ScreenMain);
+
+ if ((MouseEvent.RB) && (CSongs.Category < 0))
+ {
+ CGraphics.FadeTo(EScreens.ScreenMain);
+ }
+ else if (MouseEvent.RB && _SongOptionsActive)
+ ToggleSongOptions();
+
+ if (MouseEvent.MB && CSongs.Category != -1)
+ {
+ Console.WriteLine("MB pressed");
+ SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
+ }
+ else
+ SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent);
+
+ if (MouseEvent.LB && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
+ {
+ if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
+ {
+ ToggleSongOptions();
+ }
+ }
}
- if (MouseEvent.MB && CSongs.Category != -1)
- {
- Console.WriteLine("MB pressed");
- SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
- }
else
- SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent);
-
- if (MouseEvent.LB && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
{
- StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
+ if (MouseEvent.LB && IsMouseOver(MouseEvent))
+ {
+ if (Buttons[htButtons(ButtonOptionsClose)].Selected)
+ {
+ ToggleSongOptions();
+ }
+ else if (Buttons[htButtons(ButtonOptionsSing)].Selected)
+ {
+ ToggleSongOptions();
+ StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
+ }
+ else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
+ {
+ ToggleSongOptions();
+ }
+ }
+ if (MouseEvent.RB)
+ {
+ ToggleSongOptions();
+ }
}
return true;
@@ -230,6 +315,17 @@ namespace Vocaluxe.Screens
base.Draw();
SongMenus[htSongMenus(SongMenu)].Draw();
+ if (_SongOptionsActive)
+ {
+ Statics[htStatics(StaticOptionsBG)].Draw();
+ Texts[htTexts(TextOptionsTitle)].Draw();
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Draw();
+ Buttons[htButtons(ButtonOptionsClose)].Draw();
+ Buttons[htButtons(ButtonOptionsSing)].Draw();
+ Buttons[htButtons(ButtonOptionsPlaylist)].Draw();
+
+ }
+
return true;
}
@@ -244,10 +340,17 @@ namespace Vocaluxe.Screens
{
if ((CSongs.Category >= 0) && (SongNr >= 0))
{
- if (CSongs.VisibleSongs[SongNr].IsDuet)
- CGame.SetGameMode(GameModes.EGameMode.Duet);
+ if (_AvailableGameModes.Count >= SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection)
+ {
+ CGame.SetGameMode(_AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection]);
+ }
else
- CGame.SetGameMode(GameModes.EGameMode.Normal);
+ {
+ if (CSongs.VisibleSongs[SongNr].IsDuet)
+ CGame.SetGameMode(GameModes.EGameMode.Duet);
+ else
+ CGame.SetGameMode(GameModes.EGameMode.Normal);
+ }
CGame.Reset();
CGame.ClearSongs();
@@ -377,5 +480,46 @@ namespace Vocaluxe.Screens
SongMenus[htSongMenus(SongMenu)].OnShow();
}
+
+ private void ToggleSongOptions()
+ {
+ _SongOptionsActive = !_SongOptionsActive;
+ if (_SongOptionsActive)
+ {
+ SetInteractionToButton(Buttons[htButtons(ButtonOptionsSing)]);
+ _AvailableGameModes.Clear();
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Clear();
+ if (!CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
+ {
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.Normal));
+ _AvailableGameModes.Add(GameModes.EGameMode.Normal);
+ }
+ if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
+ {
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.Duet));
+ _AvailableGameModes.Add(GameModes.EGameMode.Duet);
+ }
+ if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].Medley.Source != EMedleySource.None)
+ {
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.Medley));
+ _AvailableGameModes.Add(GameModes.EGameMode.Medley);
+ }
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = true;
+ Buttons[htButtons(ButtonOptionsClose)].Visible = true;
+ Buttons[htButtons(ButtonOptionsSing)].Visible = true;
+ Buttons[htButtons(ButtonOptionsPlaylist)].Visible = true;
+ Texts[htTexts(TextOptionsTitle)].Visible = true;
+ Statics[htStatics(StaticOptionsBG)].Visible = true;
+ }
+ else
+ {
+ SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = false;
+ Buttons[htButtons(ButtonOptionsClose)].Visible = false;
+ Buttons[htButtons(ButtonOptionsSing)].Visible = false;
+ Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false;
+ Texts[htTexts(TextOptionsTitle)].Visible = false;
+ Statics[htStatics(StaticOptionsBG)].Visible = false;
+ }
+ }
}
}