Added another song-menu for general options: select random, sing all/visible, open playlist.

Open this menu with space or clicking on song-video.
This commit is contained in:
Florian Kuepper committed 2012-11-01 16:30:03 +01:00
1 parent 53108eeeb6
commit 0a1f5e31d5
4 files changed
+476 -58

No files matched your search

+4
View File
@@ -122,6 +122,10 @@
<TR_SCREENSONG_BUTTON_SING>Lied singen</TR_SCREENSONG_BUTTON_SING>
<TR_SCREENSONG_BUTTON_PLAYLIST>Zur Playlist hinzufügen</TR_SCREENSONG_BUTTON_PLAYLIST>
<TR_SCREENSONG_BUTTON_CANCEL>Schließen</TR_SCREENSONG_BUTTON_CANCEL>
<TR_SCREENSONG_BUTTON_RANDOM>Zufälligen Song wählen</TR_SCREENSONG_BUTTON_RANDOM>
<TR_SCREENSONG_BUTTON_SINGALL>Alle Songs singen</TR_SCREENSONG_BUTTON_SINGALL>
<TR_SCREENSONG_BUTTON_SINGALLVISIBLE>Alle sichtbaren Song singen</TR_SCREENSONG_BUTTON_SINGALLVISIBLE>
<TR_SCREENSONG_BUTTON_OPENPLAYLIST>Playlist öffnen</TR_SCREENSONG_BUTTON_OPENPLAYLIST>
<TR_SCREENSONG_NEWPLAYLIST>Neue Playlist</TR_SCREENSONG_NEWPLAYLIST>
<TR_SCREENSONG_SONGOPTIONS>Lied-Optionen</TR_SCREENSONG_SONGOPTIONS>
<TR_SCREENSONG_SEARCH>Suche:</TR_SCREENSONG_SEARCH>
+4
View File
@@ -122,6 +122,10 @@
<TR_SCREENSONG_BUTTON_SING>Sing</TR_SCREENSONG_BUTTON_SING>
<TR_SCREENSONG_BUTTON_PLAYLIST>Add to playlist</TR_SCREENSONG_BUTTON_PLAYLIST>
<TR_SCREENSONG_BUTTON_CANCEL>Close</TR_SCREENSONG_BUTTON_CANCEL>
<TR_SCREENSONG_BUTTON_RANDOM>Select a random song</TR_SCREENSONG_BUTTON_RANDOM>
<TR_SCREENSONG_BUTTON_SINGALL>Sing all songs</TR_SCREENSONG_BUTTON_SINGALL>
<TR_SCREENSONG_BUTTON_SINGALLVISIBLE>Sing all visible songs</TR_SCREENSONG_BUTTON_SINGALLVISIBLE>
<TR_SCREENSONG_BUTTON_OPENPLAYLIST>Open playlist</TR_SCREENSONG_BUTTON_OPENPLAYLIST>
<TR_SCREENSONG_NEWPLAYLIST>New Playlist</TR_SCREENSONG_NEWPLAYLIST>
<TR_SCREENSONG_SONGOPTIONS>Song Options</TR_SCREENSONG_SONGOPTIONS>
<TR_SCREENSONG_SEARCH>Search:</TR_SCREENSONG_SEARCH>
+314 -4
View File
@@ -200,7 +200,7 @@
</TextSearchBar>
<TextOptionsTitle>
<!--<X>, <Y>: Text position-->
<X>200</X>
<X>220</X>
<Y>45</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
@@ -235,7 +235,7 @@
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>290</Y>
<Y>360</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
@@ -375,6 +375,251 @@
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsSing>
<ButtonOptionsSingAll>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>135</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>180</X>
<Y>5</Y>
<!--<H>: Text height-->
<H>30</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENSONG_BUTTON_SINGALL</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsSingAll>
<ButtonOptionsSingAllVisible>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>180</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>180</X>
<Y>5</Y>
<!--<H>: Text height-->
<H>30</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENSONG_BUTTON_SINGALLVISIBLE</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsSingAllVisible>
<ButtonOptionsRandom>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>90</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>180</X>
<Y>5</Y>
<!--<H>: Text height-->
<H>30</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENSONG_BUTTON_RANDOM</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsRandom>
<ButtonOptionsOpenPlaylist>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>275</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>180</X>
<Y>5</Y>
<!--<H>: Text height-->
<H>30</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENSONG_BUTTON_OPENPLAYLIST</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsOpenPlaylist>
<ButtonOpenOptions>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Invisible</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>40</Y>
<Z>-1,01</Z>
<W>360</W>
<H>360</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Invisible</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Invisible</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>180</X>
<Y>5</Y>
<!--<H>: Text height-->
<H>30</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOpenOptions>
<SelectSlideOptionsMode>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
@@ -440,7 +685,7 @@
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>1</NumVisible>
</SelectSlideOptionsMode>
<SelectSlideOptionsPlaylist>
<SelectSlideOptionsPlaylistAdd>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
@@ -504,7 +749,72 @@
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>1</NumVisible>
</SelectSlideOptionsPlaylist>
</SelectSlideOptionsPlaylistAdd>
<SelectSlideOptionsPlaylistOpen>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<!--<SkinArrowRight>: Texture name of right arrow-->
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<!--<SkinSelected>: Texture name for selected SelectSlide-->
<SkinSelected>SelectSlide</SkinSelected>
<!--<SkinArrowLeftSelected>: Texture name of selected left arrow-->
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<!--<SkinArrowRightSelected>: Texture name of selected right arrow-->
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
<SkinHighlighted>SelectSlide</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>40</X>
<Y>230</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>45</ArrowLeftX>
<ArrowLeftY>235</ArrowLeftY>
<ArrowLeftZ>-2,12</ArrowLeftZ>
<ArrowLeftW>30</ArrowLeftW>
<ArrowLeftH>30</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>365</ArrowRightX>
<ArrowRightY>235</ArrowRightY>
<ArrowRightZ>-2,12</ArrowRightZ>
<ArrowRightW>30</ArrowRightW>
<ArrowRightH>30</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
<!--<ArrowSColor>: Selected arrow color from ColorScheme (high priority)-->
<!--or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)-->
<ArrowSColor>ArrowSColor</ArrowSColor>
<!--<TextColor>: Text color from ColorScheme (high priority)-->
<!--or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)-->
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<!--<TextH>: Text height-->
<TextH>30,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
<TextMaxW>280,00</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>1</NumVisible>
</SelectSlideOptionsPlaylistOpen>
<SongMenu>
<!--<CoverBackground>: Texture name of cover background/tiles-->
<CoverBackground>CoverTile</CoverBackground>
+154 -54
View File
@@ -17,6 +17,13 @@ namespace Vocaluxe.Screens
{
class CScreenSong : CMenu
{
enum ESongOptionsView
{
None,
Song,
General
}
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 3;
@@ -26,12 +33,18 @@ namespace Vocaluxe.Screens
private const string TextSearchBar = "TextSearchBar";
private const string TextOptionsTitle = "TextOptionsTitle";
private const string ButtonOpenOptions = "ButtonOpenOptions";
private const string ButtonOptionsSing = "ButtonOptionsSing";
private const string ButtonOptionsPlaylist = "ButtonOptionsPlaylist";
private const string ButtonOptionsClose = "ButtonOptionsClose";
private const string ButtonOptionsRandom = "ButtonOptionsRandom";
private const string ButtonOptionsSingAll = "ButtonOptionsSingAll";
private const string ButtonOptionsSingAllVisible = "ButtonOptionsSingAllVisible";
private const string ButtonOptionsOpenPlaylist = "ButtonOptionsOpenPlaylist";
private const string SelectSlideOptionsMode = "SelectSlideOptionsMode";
private const string SelectSlideOptionsPlaylist = "SelectSlideOptionsPlaylist";
private const string SelectSlideOptionsPlaylistAdd = "SelectSlideOptionsPlaylistAdd";
private const string SelectSlideOptionsPlaylistOpen = "SelectSlideOptionsPlaylistOpen";
private const string StaticSearchBar = "StaticSearchBar";
private const string StaticOptionsBG = "StaticOptionsBG";
@@ -60,8 +73,8 @@ namespace Vocaluxe.Screens
_ScreenVersion = ScreenVersion;
_ThemeStatics = new string[] { StaticSearchBar, StaticOptionsBG };
_ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar, TextOptionsTitle };
_ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing };
_ThemeSelectSlides = new string[] { SelectSlideOptionsMode, SelectSlideOptionsPlaylist };
_ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing, ButtonOptionsRandom, ButtonOptionsSingAll, ButtonOptionsSingAllVisible, ButtonOptionsOpenPlaylist, ButtonOpenOptions };
_ThemeSelectSlides = new string[] { SelectSlideOptionsMode, SelectSlideOptionsPlaylistAdd, SelectSlideOptionsPlaylistOpen };
_ThemeSongMenus = new string[] { SongMenu };
_ThemePlaylists = new string[] { Playlist };
}
@@ -70,10 +83,15 @@ namespace Vocaluxe.Screens
{
base.LoadTheme();
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Visible = false;
Buttons[htButtons(ButtonOptionsClose)].Visible = false;
Buttons[htButtons(ButtonOptionsSing)].Visible = false;
Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false;
Buttons[htButtons(ButtonOptionsRandom)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAll)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false;
Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false;
Texts[htTexts(TextOptionsTitle)].Visible = false;
Statics[htStatics(StaticOptionsBG)].Visible = false;
Playlists[htPlaylists(Playlist)].Visible = false;
@@ -129,7 +147,7 @@ namespace Vocaluxe.Screens
if (CSongs.NumVisibleSongs > 0)
{
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.Song);
}
break;
@@ -153,6 +171,10 @@ namespace Vocaluxe.Screens
break;
case Keys.Space:
ToggleSongOptions(ESongOptionsView.General);
break;
case Keys.F3:
if (_SearchActive)
{
@@ -166,7 +188,7 @@ namespace Vocaluxe.Screens
}
break;
//TODO: Move that to the new menu and delete it!
//TODO: Delete it! ??? Shouldn't we keep this as shortcut?
case Keys.A:
if (!_SearchActive && KeyEvent.Mod == Modifier.None)
{
@@ -219,14 +241,33 @@ namespace Vocaluxe.Screens
case Keys.Enter:
if (Buttons[htButtons(ButtonOptionsClose)].Selected)
{
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.None);
}
else if (Buttons[htButtons(ButtonOptionsSing)].Selected)
{
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.None);
StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
}
else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
{
OpenAndAddPlaylistAction();
}
else if (Buttons[htButtons(ButtonOptionsRandom)].Selected)
{
if (CSongs.Category != -1)
{
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
}
}
else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected)
{
StartRandomAllSongs();
}
else if (Buttons[htButtons(ButtonOptionsSingAllVisible)].Selected)
{
StartRandomVisibleSongs();
}
else if (Buttons[htButtons(ButtonOptionsOpenPlaylist)].Selected)
{
OpenPlaylistAction();
}
@@ -234,7 +275,8 @@ namespace Vocaluxe.Screens
case Keys.Escape:
case Keys.Back:
ToggleSongOptions();
case Keys.Space:
ToggleSongOptions(ESongOptionsView.None);
break;
}
}
@@ -270,7 +312,7 @@ namespace Vocaluxe.Screens
CGraphics.FadeTo(EScreens.ScreenMain);
}
else if (MouseEvent.RB && _SongOptionsActive)
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.None);
if (MouseEvent.MB && CSongs.Category != -1)
{
@@ -284,7 +326,14 @@ namespace Vocaluxe.Screens
{
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
{
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.Song);
}
}
else if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonOpenOptions)].Selected)
{
ToggleSongOptions(ESongOptionsView.General);
}
}
}
@@ -295,21 +344,42 @@ namespace Vocaluxe.Screens
{
if (Buttons[htButtons(ButtonOptionsClose)].Selected)
{
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.None);
}
else if (Buttons[htButtons(ButtonOptionsSing)].Selected)
{
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.None);
StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
}
else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
{
OpenAndAddPlaylistAction();
}
else if (Buttons[htButtons(ButtonOptionsRandom)].Selected)
{
if (CSongs.Category != -1)
{
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
}
}
else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartRandomAllSongs();
}
else if (Buttons[htButtons(ButtonOptionsSingAllVisible)].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartRandomVisibleSongs();
}
else if (Buttons[htButtons(ButtonOptionsOpenPlaylist)].Selected)
{
OpenPlaylistAction();
}
}
if (MouseEvent.RB)
{
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.None);
}
}
@@ -534,55 +604,71 @@ namespace Vocaluxe.Screens
SongMenus[htSongMenus(SongMenu)].OnShow();
}
private void ToggleSongOptions()
private void ToggleSongOptions(ESongOptionsView view)
{
_SongOptionsActive = !_SongOptionsActive;
if (_SongOptionsActive)
{
EGameMode LastMode = EGameMode.TR_GAMEMODE_NORMAL;
if (_AvailableGameModes.Count > 0)
LastMode = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
SetInteractionToButton(Buttons[htButtons(ButtonOptionsSing)]);
_AvailableGameModes.Clear();
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Clear();
if (!CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
if (view == ESongOptionsView.Song)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_NORMAL));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_NORMAL);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_SHORTSONG));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_SHORTSONG);
EGameMode LastMode = EGameMode.TR_GAMEMODE_NORMAL;
if (_AvailableGameModes.Count > 0)
LastMode = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
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.TR_GAMEMODE_NORMAL));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_NORMAL);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_SHORTSONG));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_SHORTSONG);
}
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_DUET));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_DUET);
}
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].Medley.Source != EMedleySource.None)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_MEDLEY));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_MEDLEY);
}
//Set SelectSlide-Selection to last selected game-mode if possible
for (int i = 0; i < _AvailableGameModes.Count; i++)
{
if (_AvailableGameModes[i] == LastMode)
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].SetSelectionByValueIndex(i);
}
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = true;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Visible = true;
Buttons[htButtons(ButtonOptionsSing)].Visible = true;
Buttons[htButtons(ButtonOptionsPlaylist)].Visible = true;
}
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
else if (view == ESongOptionsView.General)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_DUET));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_DUET);
Buttons[htButtons(ButtonOptionsRandom)].Visible = CSongs.Category != -1;
Buttons[htButtons(ButtonOptionsSingAll)].Visible = true;
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = true;
Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = true;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Visible = true;
}
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].Medley.Source != EMedleySource.None)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_MEDLEY));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_MEDLEY);
}
//Set SelectSlide-Selection to last selected game-mode if possible
for (int i = 0; i < _AvailableGameModes.Count; i++)
{
if (_AvailableGameModes[i] == LastMode)
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].SetSelectionByValueIndex(i);
}
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = true;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].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;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Visible = false;
Buttons[htButtons(ButtonOptionsClose)].Visible = false;
Buttons[htButtons(ButtonOptionsSing)].Visible = false;
Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false;
Buttons[htButtons(ButtonOptionsRandom)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAll)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false;
Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false;
Texts[htTexts(TextOptionsTitle)].Visible = false;
Statics[htStatics(StaticOptionsBG)].Visible = false;
}
@@ -614,15 +700,29 @@ namespace Vocaluxe.Screens
private void UpdatePlaylistNames()
{
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].Clear();
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].AddValue("TR_SCREENSONG_NEWPLAYLIST");
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].AddValues(CPlaylists.PlaylistNames);
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Clear();
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValue("TR_SCREENSONG_NEWPLAYLIST");
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValues(CPlaylists.PlaylistNames);
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Clear();
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].AddValues(CPlaylists.PlaylistNames);
}
private void OpenPlaylistAction()
{
//Open a playlist
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection))
{
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection;
//Open playlist
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
}
ToggleSongOptions(ESongOptionsView.None);
}
private void OpenAndAddPlaylistAction()
{
//Open a playlist and add song
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].Selection - 1))
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1))
{
//Check selected game-mode
EGameMode gm;
@@ -634,17 +734,17 @@ namespace Vocaluxe.Screens
else
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
//Check if Playlist really exists
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].Selection - 1 < 0)
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1 < 0)
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
else
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].Selection - 1;
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1;
//Add song to playlist
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
//Open playlist
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
}
//Create a new playlist and add song
else if ((SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].Selection - 1) == -1)
else if ((SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1) == -1)
{
//Check selected game-mode
EGameMode gm;
@@ -662,7 +762,7 @@ namespace Vocaluxe.Screens
//Open playlist
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
//Add new playlist to select-slide
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylist)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
}
//Add song to loaded playlist
@@ -680,7 +780,7 @@ namespace Vocaluxe.Screens
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
Playlists[htPlaylists(Playlist)].UpdatePlaylist();
}
ToggleSongOptions();
ToggleSongOptions(ESongOptionsView.Song);
}
}
}