Added song-options on ScreenSong. Need fix for drawing...

This commit is contained in:
Florian Kuepper committed 2012-06-17 11:29:31 +02:00
1 parent 07bad380a3
commit 992397d498
9 files changed
+493 -84

No files matched your search

+4
View File
@@ -118,6 +118,10 @@
<TR_SCREENNAMES_WARNING_PROFILES_PL>Warnung: Den Spielern %v sind keine Profile zugeordnet!</TR_SCREENNAMES_WARNING_PROFILES_PL> <TR_SCREENNAMES_WARNING_PROFILES_PL>Warnung: Den Spielern %v sind keine Profile zugeordnet!</TR_SCREENNAMES_WARNING_PROFILES_PL>
<!--ScreenSong--> <!--ScreenSong-->
<TR_SCREENSONG_MENU>Songauswahl</TR_SCREENSONG_MENU> <TR_SCREENSONG_MENU>Songauswahl</TR_SCREENSONG_MENU>
<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_SONGOPTIONS>Lied-Optionen</TR_SCREENSONG_SONGOPTIONS>
<TR_SCREENSONG_SEARCH>Suche:</TR_SCREENSONG_SEARCH> <TR_SCREENSONG_SEARCH>Suche:</TR_SCREENSONG_SEARCH>
<TR_SCREENSONG_NOLANGUAGE>Ohne Sprache</TR_SCREENSONG_NOLANGUAGE> <TR_SCREENSONG_NOLANGUAGE>Ohne Sprache</TR_SCREENSONG_NOLANGUAGE>
<TR_SCREENSONG_NOYEAR>Ohne Jahr</TR_SCREENSONG_NOYEAR> <TR_SCREENSONG_NOYEAR>Ohne Jahr</TR_SCREENSONG_NOYEAR>
+4
View File
@@ -118,6 +118,10 @@
<TR_SCREENNAMES_WARNING_PROFILES_PL>Warning: There are no profiles assigned to players %v!</TR_SCREENNAMES_WARNING_PROFILES_PL> <TR_SCREENNAMES_WARNING_PROFILES_PL>Warning: There are no profiles assigned to players %v!</TR_SCREENNAMES_WARNING_PROFILES_PL>
<!--ScreenSong--> <!--ScreenSong-->
<TR_SCREENSONG_MENU>Song Selection</TR_SCREENSONG_MENU> <TR_SCREENSONG_MENU>Song Selection</TR_SCREENSONG_MENU>
<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_SONGOPTIONS>Song Options</TR_SCREENSONG_SONGOPTIONS>
<TR_SCREENSONG_SEARCH>Search:</TR_SCREENSONG_SEARCH> <TR_SCREENSONG_SEARCH>Search:</TR_SCREENSONG_SEARCH>
<TR_SCREENSONG_NOLANGUAGE>No Language</TR_SCREENSONG_NOLANGUAGE> <TR_SCREENSONG_NOLANGUAGE>No Language</TR_SCREENSONG_NOLANGUAGE>
<TR_SCREENSONG_NOYEAR>No Year</TR_SCREENSONG_NOYEAR> <TR_SCREENSONG_NOYEAR>No Year</TR_SCREENSONG_NOYEAR>
+255 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<ScreenSong> <ScreenSong>
<ScreenVersion>2</ScreenVersion> <ScreenVersion>3</ScreenVersion>
<Background1> <Background1>
<!--<Type>: Background type: None, Color, Texture, Video--> <!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type> <Type>Video</Type>
@@ -33,6 +33,25 @@
<Height>26</Height> <Height>26</Height>
</Reflection> </Reflection>
</Static1> </Static1>
<StaticOptionsBG>
<!--<Skin>: Texture name-->
<Skin>SongMenuBG</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>40</X>
<Y>40</Y>
<Z>-2,10</Z>
<W>360</W>
<H>360</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<R>1</R>
<G>1</G>
<B>1</B>
<A>0.3</A>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</StaticOptionsBG>
<StaticSearchBar> <StaticSearchBar>
<!--<Skin>: Texture name--> <!--<Skin>: Texture name-->
<Skin>Menu</Skin> <Skin>Menu</Skin>
@@ -53,6 +72,175 @@
<Height>26</Height> <Height>26</Height>
</Reflection> </Reflection>
</StaticSearchBar> </StaticSearchBar>
<ButtonOptionsSing>
<!--<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: Left, Center, Right-->
<Align>Center</Align>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Text or translation tag-->
<Text>TR_SCREENSONG_BUTTON_SING</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-->
</ButtonOptionsSing>
<ButtonOptionsPlaylist>
<!--<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: Left, Center, Right-->
<Align>Center</Align>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Text or translation tag-->
<Text>TR_SCREENSONG_BUTTON_PLAYLIST</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-->
</ButtonOptionsPlaylist>
<ButtonOptionsClose>
<!--<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>225</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: Left, Center, Right-->
<Align>Center</Align>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Text or translation tag-->
<Text>TR_SCREENSONG_BUTTON_CANCEL</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-->
</ButtonOptionsClose>
<TextOptionsTitle>
<!--<X>, <Y>: Text position-->
<X>200</X>
<Y>45</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
<!--<H>: Text height-->
<H>40</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>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align: Left, Center, Right-->
<Align>Center</Align>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Text or translation tag-->
<Text>TR_SCREENSONG_SONGOPTIONS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextOptionsTitle>
<TextCategory> <TextCategory>
<!--<X>, <Y>: Text position--> <!--<X>, <Y>: Text position-->
<X>220</X> <X>220</X>
@@ -171,6 +359,71 @@
<!-- <Space>: Reflection Space--> <!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height--> <!-- <Height>: Reflection Height-->
</TextSearchBar> </TextSearchBar>
<SelectSlideOptionsMode>
<!--<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>135</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>140</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>140</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</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
<TextMaxW>280</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>
</SelectSlideOptionsMode>
<SongMenu> <SongMenu>
<!--<CoverBackground>: Texture name of cover background/tiles--> <!--<CoverBackground>: Texture name of cover background/tiles-->
<CoverBackground>CoverTile</CoverBackground> <CoverBackground>CoverTile</CoverBackground>
@@ -395,4 +648,4 @@
</SongMenuTileBoard> </SongMenuTileBoard>
</SongMenu> </SongMenu>
</ScreenSong> </ScreenSong>
</root> </root>
+1
View File
@@ -308,6 +308,7 @@
<PlayIcon>PlayIcon.png</PlayIcon> <PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon> <PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon> <RepeatIcon>RepeatIcon.png</RepeatIcon>
<SongMenuBG>SongMenuBG.png</SongMenuBG>
</Skins> </Skins>
<Videos> <Videos>
<BG_Video>[Blue]BG_Video.mp4</BG_Video> <BG_Video>[Blue]BG_Video.mp4</BG_Video>
+1
View File
@@ -308,6 +308,7 @@
<PlayIcon>PlayIcon.png</PlayIcon> <PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon> <PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon> <RepeatIcon>RepeatIcon.png</RepeatIcon>
<SongMenuBG>SongMenuBG.png</SongMenuBG>
</Skins> </Skins>
<Videos> <Videos>
<BG_Video>[Green]BG_Video.mp4</BG_Video> <BG_Video>[Green]BG_Video.mp4</BG_Video>
+1
View File
@@ -308,6 +308,7 @@
<PlayIcon>PlayIcon.png</PlayIcon> <PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon> <PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon> <RepeatIcon>RepeatIcon.png</RepeatIcon>
<SongMenuBG>SongMenuBG.png</SongMenuBG>
</Skins> </Skins>
<Videos> <Videos>
<BG_Video>[Red]BG_Video.mp4</BG_Video> <BG_Video>[Red]BG_Video.mp4</BG_Video>
+1
View File
@@ -308,6 +308,7 @@
<PlayIcon>PlayIcon.png</PlayIcon> <PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon> <PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon> <RepeatIcon>RepeatIcon.png</RepeatIcon>
<SongMenuBG>SongMenuBG.png</SongMenuBG>
</Skins> </Skins>
<Videos> <Videos>
<BG_Video>[Yellow]BG_Video.mp4</BG_Video> <BG_Video>[Yellow]BG_Video.mp4</BG_Video>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+226 -82
View File
@@ -17,22 +17,35 @@ namespace Vocaluxe.Screens
class CScreenSong : CMenu class CScreenSong : CMenu
{ {
// Version number for theme files. Increment it, if you've changed something on the theme files! // 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 TextCategory = "TextCategory";
private const string TextSelection = "TextSelection"; private const string TextSelection = "TextSelection";
private const string TextSearchBarTitle = "TextSearchBarTitle"; private const string TextSearchBarTitle = "TextSearchBarTitle";
private const string TextSearchBar = "TextSearchBar"; 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 StaticSearchBar = "StaticSearchBar";
private const string StaticOptionsBG = "StaticOptionsBG";
private const string SongMenu = "SongMenu"; private const string SongMenu = "SongMenu";
private string _SearchText = String.Empty; private string _SearchText = String.Empty;
private bool _SearchActive = false; private bool _SearchActive = false;
private bool _SongOptionsActive = false;
private List<GameModes.EGameMode> _AvailableGameModes;
public CScreenSong() public CScreenSong()
{ {
Init(); Init();
_AvailableGameModes = new List<GameModes.EGameMode>();
} }
protected override void Init() protected override void Init()
@@ -41,87 +54,76 @@ namespace Vocaluxe.Screens
_ThemeName = "ScreenSong"; _ThemeName = "ScreenSong";
_ScreenVersion = ScreenVersion; _ScreenVersion = ScreenVersion;
_ThemeStatics = new string[] { StaticSearchBar }; _ThemeStatics = new string[] { StaticSearchBar, StaticOptionsBG };
_ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar }; _ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar, TextOptionsTitle };
_ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing };
_ThemeSelectSlides = new string[] { SelectSlideOptionsMode };
_ThemeSongMenus = new string[] { SongMenu }; _ThemeSongMenus = new string[] { SongMenu };
} }
public override void LoadTheme() public override void LoadTheme()
{ {
base.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) public override bool HandleInput(KeyEvent KeyEvent)
{ {
base.HandleInput(KeyEvent); base.HandleInput(KeyEvent);
if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode)) if (!_SongOptionsActive)
{ {
if (_SearchActive)
ApplyNewSearchFilter(_SearchText + KeyEvent.Unicode); if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode))
/*
else if (!Char.IsControl(KeyEvent.Unicode))
{ {
JumpTo(KeyEvent.Unicode); if (_SearchActive)
return true; ApplyNewSearchFilter(_SearchText + KeyEvent.Unicode);
} */ /*
} else if (!Char.IsControl(KeyEvent.Unicode))
else {
{ JumpTo(KeyEvent.Unicode);
SongMenus[htSongMenus(SongMenu)].HandleInput(ref KeyEvent); return true;
} */
if (KeyEvent.Handled) }
return true; else
switch (KeyEvent.Key)
{ {
case Keys.Escape: SongMenus[htSongMenus(SongMenu)].HandleInput(ref KeyEvent);
if (CSongs.Category < 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
CGraphics.FadeTo(EScreens.ScreenMain);
break;
case Keys.Enter: if (KeyEvent.Handled)
if (CSongs.NumVisibleSongs > 0) return true;
StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
break;
case Keys.Back: switch (KeyEvent.Key)
if (_SearchText.Length > 0) {
{ case Keys.Escape:
ApplyNewSearchFilter(_SearchText.Remove(_SearchText.Length - 1)); if (CSongs.Category < 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
} CGraphics.FadeTo(EScreens.ScreenMain);
break;
if (!_SearchActive && CSongs.Category < 0) case Keys.Enter:
CGraphics.FadeTo(EScreens.ScreenMain); 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 && CSongs.Category < 0)
if (_SearchActive) CGraphics.FadeTo(EScreens.ScreenMain);
{
_SearchActive = false;
_SearchText = String.Empty;
ApplyNewSearchFilter(_SearchText);
}
else
{
_SearchActive = true;
}
break;
case Keys.A: break;
if (!_SearchActive && KeyEvent.Mod == Modifier.None)
{
StartRandomAllSongs();
}
if (KeyEvent.Mod == Modifier.Ctrl)
{
StartRandomVisibleSongs();
}
break;
case Keys.F: case Keys.F3:
if (KeyEvent.Mod == Modifier.Ctrl){
if (_SearchActive) if (_SearchActive)
{ {
_SearchActive = false; _SearchActive = false;
@@ -132,19 +134,69 @@ namespace Vocaluxe.Screens
{ {
_SearchActive = true; _SearchActive = true;
} }
} break;
break;
case Keys.R: case Keys.A:
if (CSongs.Category != -1 && KeyEvent.Mod == Modifier.Ctrl) 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; break;
case Keys.S: case Keys.Escape:
if (CSongs.NumVisibleSongs > 0) case Keys.Back:
StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong()); ToggleSongOptions();
break; break;
} }
} }
@@ -156,22 +208,55 @@ namespace Vocaluxe.Screens
{ {
base.HandleMouse(MouseEvent); 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 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; return true;
@@ -230,6 +315,17 @@ namespace Vocaluxe.Screens
base.Draw(); base.Draw();
SongMenus[htSongMenus(SongMenu)].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; return true;
} }
@@ -244,10 +340,17 @@ namespace Vocaluxe.Screens
{ {
if ((CSongs.Category >= 0) && (SongNr >= 0)) if ((CSongs.Category >= 0) && (SongNr >= 0))
{ {
if (CSongs.VisibleSongs[SongNr].IsDuet) if (_AvailableGameModes.Count >= SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection)
CGame.SetGameMode(GameModes.EGameMode.Duet); {
CGame.SetGameMode(_AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection]);
}
else 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.Reset();
CGame.ClearSongs(); CGame.ClearSongs();
@@ -377,5 +480,46 @@ namespace Vocaluxe.Screens
SongMenus[htSongMenus(SongMenu)].OnShow(); 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;
}
}
} }
} }