Merge pull request #46 from flokuep/develop
Merge pull request #46 from flokuep/develop
No files matched your search
@@ -123,6 +123,7 @@
|
||||
<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_RANDOMCAT>Zufällige Kategorie wählen</TR_SCREENSONG_BUTTON_RANDOMCAT>
|
||||
<TR_SCREENSONG_BUTTON_SINGALL>Alle Songs singen</TR_SCREENSONG_BUTTON_SINGALL>
|
||||
<TR_SCREENSONG_BUTTON_SINGALLVISIBLE>Alle sichtbaren Songs singen</TR_SCREENSONG_BUTTON_SINGALLVISIBLE>
|
||||
<TR_SCREENSONG_BUTTON_OPENPLAYLIST>Playlist öffnen</TR_SCREENSONG_BUTTON_OPENPLAYLIST>
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<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_RANDOMCAT>Select a random category</TR_SCREENSONG_BUTTON_RANDOMCAT>
|
||||
<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>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -10,10 +10,10 @@
|
||||
<Y>0</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>1181</W>
|
||||
<H>50</H>
|
||||
<H>42</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>Visible</Color>
|
||||
<Color>StaticColor</Color>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
@@ -22,11 +22,11 @@
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>CoverBackground</Skin>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||
<X>50</X>
|
||||
<Y>0</Y>
|
||||
<X>55</X>
|
||||
<Y>2</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>50</W>
|
||||
<H>50</H>
|
||||
<W>38</W>
|
||||
<H>38</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>Visible</Color>
|
||||
@@ -36,14 +36,14 @@
|
||||
</StaticCover>
|
||||
<TextCurrentSong>
|
||||
<!--<X>, <Y>: Text position-->
|
||||
<X>630</X>
|
||||
<Y>0</Y>
|
||||
<X>410</X>
|
||||
<Y>4</Y>
|
||||
<!--<Z>: Text position-->
|
||||
<Z>0,00</Z>
|
||||
<!--<H>: Text height-->
|
||||
<H>50</H>
|
||||
<H>32</H>
|
||||
<!--<MaxW>: Maximum text width (if exists)-->
|
||||
<MaxW>650</MaxW>
|
||||
<MaxW>769</MaxW>
|
||||
<!--<Color>: Text color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>StaticColor</Color>
|
||||
@@ -70,11 +70,11 @@
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>PlayIcon</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>200</X>
|
||||
<Y>5</Y>
|
||||
<X>146</X>
|
||||
<Y>8</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<W>28</W>
|
||||
<H>28</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -119,11 +119,11 @@
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>PauseIcon</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>200</X>
|
||||
<Y>5</Y>
|
||||
<X>145</X>
|
||||
<Y>8</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<W>28</W>
|
||||
<H>28</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -168,11 +168,11 @@
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>PreviousIcon</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>125</X>
|
||||
<Y>0</Y>
|
||||
<X>100</X>
|
||||
<Y>2</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>50</W>
|
||||
<H>50</H>
|
||||
<W>38</W>
|
||||
<H>38</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -217,11 +217,11 @@
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>NextIcon</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>265</X>
|
||||
<Y>0</Y>
|
||||
<X>185</X>
|
||||
<Y>2</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>50</W>
|
||||
<H>50</H>
|
||||
<W>38</W>
|
||||
<H>38</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -266,11 +266,11 @@
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>RepeatIcon</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>330</X>
|
||||
<Y>0</Y>
|
||||
<X>225</X>
|
||||
<Y>2</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>50</W>
|
||||
<H>50</H>
|
||||
<W>38</W>
|
||||
<H>38</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -311,15 +311,15 @@
|
||||
</ButtonRepeat>
|
||||
<ButtonShowVideo>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>VideoIcon</Skin>
|
||||
<Skin>VideoIconCO</Skin>
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>VideoIcon</SkinSelected>
|
||||
<SkinSelected>VideoIconCO</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>405</X>
|
||||
<Y>0</Y>
|
||||
<X>270</X>
|
||||
<Y>2</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>50</W>
|
||||
<H>50</H>
|
||||
<W>38</W>
|
||||
<H>38</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -364,11 +364,11 @@
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>DuetIcon</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>555</X>
|
||||
<Y>0</Y>
|
||||
<X>360</X>
|
||||
<Y>2</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>50</W>
|
||||
<H>50</H>
|
||||
<W>38</W>
|
||||
<H>38</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -409,15 +409,15 @@
|
||||
</ButtonSing>
|
||||
<ButtonToBackgroundVideo>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>VideoIcon</Skin>
|
||||
<Skin>VideoIconBG</Skin>
|
||||
<!--<SkinSelected>: Texture name for selected button-->
|
||||
<SkinSelected>VideoIcon</SkinSelected>
|
||||
<SkinSelected>VideoIconBG</SkinSelected>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||
<X>480</X>
|
||||
<Y>0</Y>
|
||||
<X>315</X>
|
||||
<Y>2</Y>
|
||||
<Z>0,00</Z>
|
||||
<W>50</W>
|
||||
<H>50</H>
|
||||
<W>38</W>
|
||||
<H>38</H>
|
||||
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>ButtonColor</Color>
|
||||
@@ -457,4 +457,4 @@
|
||||
<!-- <Height>: Reflection Height of selected button-->
|
||||
</ButtonToBackgroundVideo>
|
||||
</PopupScreenPlayerControl>
|
||||
</root>
|
||||
</root>
|
||||
@@ -473,6 +473,55 @@
|
||||
<!-- <Space>: Reflection Space of selected button-->
|
||||
<!-- <Height>: Reflection Height of selected button-->
|
||||
</ButtonOptionsSingAllVisible>
|
||||
<ButtonOptionsRandomCategory>
|
||||
<!--<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_RANDOMCAT</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-->
|
||||
</ButtonOptionsRandomCategory>
|
||||
<ButtonOptionsRandom>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>Button</Skin>
|
||||
@@ -1162,10 +1211,10 @@
|
||||
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
|
||||
<SkinHighlighted>SelectSlide</SkinHighlighted>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
|
||||
<X>0</X>
|
||||
<X>52</X>
|
||||
<Y>28</Y>
|
||||
<Z>-1,01</Z>
|
||||
<W>343</W>
|
||||
<W>241</W>
|
||||
<H>24</H>
|
||||
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
|
||||
<ArrowLeftX>54</ArrowLeftX>
|
||||
@@ -1174,7 +1223,7 @@
|
||||
<ArrowLeftW>20</ArrowLeftW>
|
||||
<ArrowLeftH>20</ArrowLeftH>
|
||||
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
|
||||
<ArrowRightX>235</ArrowRightX>
|
||||
<ArrowRightX>271</ArrowRightX>
|
||||
<ArrowRightY>30</ArrowRightY>
|
||||
<ArrowRightZ>-1,02</ArrowRightZ>
|
||||
<ArrowRightW>20</ArrowRightW>
|
||||
|
||||
@@ -317,6 +317,8 @@
|
||||
<EnergyBeam>EnergyBeam.png</EnergyBeam>
|
||||
<DuetIcon>DuetIcon.png</DuetIcon>
|
||||
<VideoIcon>VideoIcon.png</VideoIcon>
|
||||
<VideoIconCO>VideoIconCO.png</VideoIconCO>
|
||||
<VideoIconBG>VideoIconBG.png</VideoIconBG>
|
||||
<MedleyCalcIcon>MedleyCalcIcon.png</MedleyCalcIcon>
|
||||
<MedleyTagIcon>MedleyTagIcon.png</MedleyTagIcon>
|
||||
<Invisible>Invisible.png</Invisible>
|
||||
@@ -338,4 +340,4 @@
|
||||
<IntroMid>[Blue]IntroMid.mp4</IntroMid>
|
||||
<IntroOut>[Blue]IntroOut.mp4</IntroOut>
|
||||
</Videos>
|
||||
</root>
|
||||
</root>
|
||||
@@ -311,6 +311,8 @@
|
||||
<EnergyBeam>EnergyBeam.png</EnergyBeam>
|
||||
<DuetIcon>DuetIcon.png</DuetIcon>
|
||||
<VideoIcon>VideoIcon.png</VideoIcon>
|
||||
<VideoIconCO>VideoIconCO.png</VideoIconCO>
|
||||
<VideoIconBG>VideoIconBG.png</VideoIconBG>
|
||||
<MedleyCalcIcon>MedleyCalcIcon.png</MedleyCalcIcon>
|
||||
<MedleyTagIcon>MedleyTagIcon.png</MedleyTagIcon>
|
||||
<Invisible>Invisible.png</Invisible>
|
||||
@@ -332,4 +334,4 @@
|
||||
<IntroMid>[Green]IntroMid.mp4</IntroMid>
|
||||
<IntroOut>[Green]IntroOut.mp4</IntroOut>
|
||||
</Videos>
|
||||
</root>
|
||||
</root>
|
||||
@@ -311,6 +311,8 @@
|
||||
<EnergyBeam>EnergyBeam.png</EnergyBeam>
|
||||
<DuetIcon>DuetIcon.png</DuetIcon>
|
||||
<VideoIcon>VideoIcon.png</VideoIcon>
|
||||
<VideoIconCO>VideoIconCO.png</VideoIconCO>
|
||||
<VideoIconBG>VideoIconBG.png</VideoIconBG>
|
||||
<MedleyCalcIcon>MedleyCalcIcon.png</MedleyCalcIcon>
|
||||
<MedleyTagIcon>MedleyTagIcon.png</MedleyTagIcon>
|
||||
<Invisible>Invisible.png</Invisible>
|
||||
@@ -332,4 +334,4 @@
|
||||
<IntroMid>[Red]IntroMid.mp4</IntroMid>
|
||||
<IntroOut>[Red]IntroOut.mp4</IntroOut>
|
||||
</Videos>
|
||||
</root>
|
||||
</root>
|
||||
@@ -311,6 +311,8 @@
|
||||
<EnergyBeam>EnergyBeam.png</EnergyBeam>
|
||||
<DuetIcon>DuetIcon.png</DuetIcon>
|
||||
<VideoIcon>VideoIcon.png</VideoIcon>
|
||||
<VideoIconCO>VideoIconCO.png</VideoIconCO>
|
||||
<VideoIconBG>VideoIconBG.png</VideoIconBG>
|
||||
<MedleyCalcIcon>MedleyCalcIcon.png</MedleyCalcIcon>
|
||||
<MedleyTagIcon>MedleyTagIcon.png</MedleyTagIcon>
|
||||
<Invisible>Invisible.png</Invisible>
|
||||
@@ -332,4 +334,4 @@
|
||||
<IntroMid>[Yellow]IntroMid.mp4</IntroMid>
|
||||
<IntroOut>[Yellow]IntroOut.mp4</IntroOut>
|
||||
</Videos>
|
||||
</root>
|
||||
</root>
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
@@ -6,7 +6,7 @@ Version 3:
|
||||
Add:
|
||||
<StaticOptionsBG>
|
||||
<TextOptionsTitle>
|
||||
<ButtonOptionsSing>, <ButtonOptionsClose>, <ButtonOptionsPlaylist>, <ButtonOptionsSingAll>, <ButtonOptionsSingAllVisible>, <ButtonOptionsRandom>, <ButtonOptionsRandom>, <ButtonOpenOptions>
|
||||
<ButtonOptionsSing>, <ButtonOptionsClose>, <ButtonOptionsPlaylist>, <ButtonOptionsSingAll>, <ButtonOptionsSingAllVisible>, <ButtonOptionsRandom>, <ButtonOptionsRandom>, <ButtonOptionsRandomCategory>, <ButtonOpenOptions>
|
||||
<SelectSlideOptionsMode>, <SelectSlideOptionsPlaylistAdd>, <SelectSlideOptionsPlaylistOpen>
|
||||
and
|
||||
<Playlist> as a new Screen-Element. For details, look at ScreenSong.xml
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Vocaluxe.Base
|
||||
private static bool _Playing;
|
||||
private static bool _Disabled;
|
||||
private static bool _CanSing;
|
||||
private static bool _RepeatSong;
|
||||
|
||||
public static bool VideoEnabled
|
||||
{
|
||||
@@ -84,6 +85,18 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
}
|
||||
|
||||
public static bool RepeatSong
|
||||
{
|
||||
get
|
||||
{
|
||||
return _RepeatSong;
|
||||
}
|
||||
set
|
||||
{
|
||||
_RepeatSong = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static int SongID
|
||||
{
|
||||
get
|
||||
@@ -120,7 +133,10 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
get
|
||||
{
|
||||
return _CurrentPlaylistElement.Artist + " - " + _CurrentPlaylistElement.Title;
|
||||
if (_CurrentPlaylistElement.Artist != "" && _CurrentPlaylistElement.Title != "")
|
||||
return _CurrentPlaylistElement.Artist + " - " + _CurrentPlaylistElement.Title;
|
||||
else
|
||||
return Path.GetFileNameWithoutExtension(_CurrentPlaylistElement.MusicFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +241,14 @@ namespace Vocaluxe.Base
|
||||
|
||||
bool finished = CSound.IsFinished(_CurrentMusicStream);
|
||||
if (_Playing && (timeToPlay <= CSettings.BackgroundMusicFadeTime || finished))
|
||||
Next();
|
||||
if (_RepeatSong)
|
||||
{
|
||||
CSound.SetPosition(_CurrentMusicStream, 0);
|
||||
if (_VideoEnabled && _Video != -1)
|
||||
CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap);
|
||||
}
|
||||
else
|
||||
Next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,25 +294,30 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
if (_PreviousFileNames.Count > 0 || _PreviousMusicIndex >= 0)
|
||||
{
|
||||
Stop();
|
||||
float pos = CSound.GetPosition(_CurrentMusicStream);
|
||||
if (CSound.GetPosition(_CurrentMusicStream) >= 1.5f)
|
||||
{
|
||||
CSound.SetPosition(_CurrentMusicStream, 0);
|
||||
if (_VideoEnabled && _Video != -1)
|
||||
CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap);
|
||||
}
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
_PreviousMusicIndex--;
|
||||
if (_PreviousMusicIndex < 0)
|
||||
_PreviousMusicIndex = 0; //No previous songs left, so play the first
|
||||
|
||||
_PreviousMusicIndex--;
|
||||
if (_PreviousMusicIndex < 0)
|
||||
_PreviousMusicIndex = 0; //No previous songs left, so play the first
|
||||
_CurrentPlaylistElement = _PreviousFileNames[_PreviousMusicIndex];
|
||||
|
||||
_CurrentPlaylistElement = _PreviousFileNames[_PreviousMusicIndex];
|
||||
|
||||
_CurrentMusicStream = CSound.Load(_CurrentPlaylistElement.MusicFilePath);
|
||||
if (_VideoEnabled)
|
||||
LoadVideo();
|
||||
CSound.SetStreamVolume(_CurrentMusicStream, 0f);
|
||||
Play();
|
||||
_CurrentMusicStream = CSound.Load(_CurrentPlaylistElement.MusicFilePath);
|
||||
if (_VideoEnabled)
|
||||
LoadVideo();
|
||||
CSound.SetStreamVolume(_CurrentMusicStream, 0f);
|
||||
Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Repeat()
|
||||
{
|
||||
if (_AllFileNames.Count > 0 && _CurrentMusicStream != -1)
|
||||
else if (_CurrentMusicStream != -1)
|
||||
{
|
||||
CSound.SetPosition(_CurrentMusicStream, 0);
|
||||
if (_VideoEnabled && _Video != -1)
|
||||
@@ -519,7 +547,7 @@ class PlaylistElement
|
||||
if (_Song != null)
|
||||
return _Song.Title;
|
||||
|
||||
return "Unknown";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,7 +558,7 @@ class PlaylistElement
|
||||
if (_Song != null)
|
||||
return _Song.Artist;
|
||||
|
||||
return "Unknown";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace Vocaluxe.Base
|
||||
private static int _CoverLoadIndex = -1;
|
||||
private static int _CatIndex = -1;
|
||||
private static List<CCategory> _Categories = new List<CCategory>();
|
||||
private static List<CCategory> _CategoriesForRandom = new List<CCategory>();
|
||||
|
||||
private static Stopwatch _CoverLoadTimer = new Stopwatch();
|
||||
|
||||
@@ -275,6 +276,35 @@ namespace Vocaluxe.Base
|
||||
_SongsForRandom.AddRange(VisibleSongs);
|
||||
}
|
||||
|
||||
public static int GetRandomCategory()
|
||||
{
|
||||
if (_CategoriesForRandom.Count == 0)
|
||||
UpdateRandomCategoryList();
|
||||
|
||||
if (_CategoriesForRandom.Count == 0)
|
||||
return -1;
|
||||
|
||||
CCategory category = _CategoriesForRandom[CGame.Rand.Next(0, _CategoriesForRandom.Count - 1)];
|
||||
_CategoriesForRandom.Remove(category);
|
||||
return GetCategoryNumber(category);
|
||||
}
|
||||
|
||||
public static void UpdateRandomCategoryList()
|
||||
{
|
||||
_CategoriesForRandom.Clear();
|
||||
_CategoriesForRandom.AddRange(Categories);
|
||||
}
|
||||
|
||||
private static int GetCategoryNumber(CCategory category)
|
||||
{
|
||||
for (int i = 0; i < Categories.Length; i++)
|
||||
{
|
||||
if (Categories[i] == category)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static CSong[] AllSongs
|
||||
{
|
||||
get { return _Songs.ToArray(); }
|
||||
|
||||
@@ -205,6 +205,10 @@ namespace Vocaluxe.Lib.Playlist
|
||||
song.GameMode = gm;
|
||||
Songs.Add(song);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLog.LogError("Can't find song '" + title + "' from '" + artist + "' in playlist file: " + PlaylistFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -103,6 +103,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
return _SongMenu.GetSelectedCategory();
|
||||
}
|
||||
|
||||
public void SetSelectedCategory(int CategoryNr)
|
||||
{
|
||||
_SongMenu.SetSelectedCategory(CategoryNr);
|
||||
}
|
||||
|
||||
public int GetActualSelection()
|
||||
{
|
||||
return _SongMenu.GetActualSelection();
|
||||
|
||||
@@ -541,6 +541,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
return;
|
||||
}
|
||||
|
||||
public virtual void SetSelectedCategory(int CategoryNr)
|
||||
{
|
||||
if (!_Initialized)
|
||||
return;
|
||||
}
|
||||
|
||||
public virtual void SetSmallView(bool SmallView)
|
||||
{
|
||||
if (!_Initialized)
|
||||
|
||||
@@ -566,6 +566,62 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
}
|
||||
|
||||
public override void SetSelectedCategory(int CategoryNr)
|
||||
{
|
||||
base.SetSelectedCategory(CategoryNr);
|
||||
|
||||
if (CategoryNr < 0)
|
||||
return;
|
||||
|
||||
if (CSongs.Categories.Length > CategoryNr)
|
||||
{
|
||||
bool sel = false;
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
if (tile.Selected)
|
||||
{
|
||||
sel = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_Locked == -1 || !sel)
|
||||
{
|
||||
if (_PreviewSelected > -1)
|
||||
{
|
||||
_Locked = _PreviewSelected;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Locked = 0;
|
||||
_actualSelection = 0;
|
||||
_PreviewSelected = 0;
|
||||
SetSelectedNow();
|
||||
UpdateList(0);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
tile.Selected = false;
|
||||
}
|
||||
|
||||
_PreviewSelected = CategoryNr;
|
||||
SetSelectedNow();
|
||||
_Locked = CategoryNr;
|
||||
|
||||
UpdateList((CategoryNr / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
|
||||
_PreviewSelected = _Locked;
|
||||
_actualSelection = _Locked;
|
||||
|
||||
for (int i = 0; i < _Tiles.Count; i++)
|
||||
{
|
||||
_Tiles[i].Selected = _Locked == i + _Offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void EnterCategory(int cat)
|
||||
{
|
||||
base.EnterCategory(cat);
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
void SetActive(bool Active);
|
||||
|
||||
int GetSelectedCategory();
|
||||
void SetSelectedCategory(int CategoryNr);
|
||||
int GetActualSelection();
|
||||
|
||||
bool IsSelected();
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Vocaluxe.Screens
|
||||
if (Buttons[htButtons(ButtonPause)].Selected)
|
||||
CBackgroundMusic.Pause();
|
||||
if (Buttons[htButtons(ButtonRepeat)].Selected)
|
||||
CBackgroundMusic.Repeat();
|
||||
CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
|
||||
if (Buttons[htButtons(ButtonShowVideo)].Selected)
|
||||
VideoPreview = !VideoPreview;
|
||||
if (Buttons[htButtons(ButtonSing)].Selected)
|
||||
@@ -162,7 +162,7 @@ namespace Vocaluxe.Screens
|
||||
if (Buttons[htButtons(ButtonPause)].Selected)
|
||||
CBackgroundMusic.Pause();
|
||||
if (Buttons[htButtons(ButtonRepeat)].Selected)
|
||||
CBackgroundMusic.Repeat();
|
||||
CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
|
||||
if (Buttons[htButtons(ButtonShowVideo)].Selected)
|
||||
VideoPreview = !VideoPreview;
|
||||
if (Buttons[htButtons(ButtonSing)].Selected)
|
||||
@@ -187,6 +187,7 @@ namespace Vocaluxe.Screens
|
||||
Statics[htStatics(StaticCover)].Visible = !_VideoPreview || !CBackgroundMusic.SongHasVideo;
|
||||
Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = VideoBackground;
|
||||
Buttons[htButtons(ButtonShowVideo)].Pressed = _VideoPreview;
|
||||
Buttons[htButtons(ButtonRepeat)].Pressed = CBackgroundMusic.RepeatSong;
|
||||
Buttons[htButtons(ButtonSing)].Visible = CBackgroundMusic.CanSing;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Vocaluxe.Screens
|
||||
private const string ButtonOptionsPlaylist = "ButtonOptionsPlaylist";
|
||||
private const string ButtonOptionsClose = "ButtonOptionsClose";
|
||||
private const string ButtonOptionsRandom = "ButtonOptionsRandom";
|
||||
private const string ButtonOptionsRandomCategory = "ButtonOptionsRandomCategory";
|
||||
private const string ButtonOptionsSingAll = "ButtonOptionsSingAll";
|
||||
private const string ButtonOptionsSingAllVisible = "ButtonOptionsSingAllVisible";
|
||||
private const string ButtonOptionsOpenPlaylist = "ButtonOptionsOpenPlaylist";
|
||||
@@ -78,7 +79,7 @@ namespace Vocaluxe.Screens
|
||||
_ScreenVersion = ScreenVersion;
|
||||
_ThemeStatics = new string[] { StaticSearchBar, StaticOptionsBG };
|
||||
_ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar, TextOptionsTitle };
|
||||
_ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing, ButtonOptionsRandom, ButtonOptionsSingAll, ButtonOptionsSingAllVisible, ButtonOptionsOpenPlaylist, ButtonOpenOptions };
|
||||
_ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing, ButtonOptionsRandom, ButtonOptionsRandomCategory, ButtonOptionsSingAll, ButtonOptionsSingAllVisible, ButtonOptionsOpenPlaylist, ButtonOpenOptions };
|
||||
_ThemeSelectSlides = new string[] { SelectSlideOptionsMode, SelectSlideOptionsPlaylistAdd, SelectSlideOptionsPlaylistOpen };
|
||||
_ThemeSongMenus = new string[] { SongMenu };
|
||||
_ThemePlaylists = new string[] { Playlist };
|
||||
@@ -94,6 +95,7 @@ namespace Vocaluxe.Screens
|
||||
Buttons[htButtons(ButtonOptionsSing)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsRandom)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsSingAll)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false;
|
||||
@@ -237,13 +239,20 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
|
||||
}
|
||||
else if (CSongs.Category == -1 && KeyEvent.Mod == Modifier.Ctrl)
|
||||
{
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
|
||||
}
|
||||
break;
|
||||
|
||||
//TODO: Delete that!
|
||||
case Keys.S:
|
||||
if (!_SearchActive && CSongs.NumVisibleSongs > 0)
|
||||
{
|
||||
StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,6 +282,13 @@ namespace Vocaluxe.Screens
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
|
||||
}
|
||||
}
|
||||
else if (Buttons[htButtons(ButtonOptionsRandom)].Selected)
|
||||
{
|
||||
if (CSongs.Category == -1)
|
||||
{
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
|
||||
}
|
||||
}
|
||||
else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected)
|
||||
{
|
||||
StartRandomAllSongs();
|
||||
@@ -338,8 +354,14 @@ namespace Vocaluxe.Screens
|
||||
|
||||
if (MouseEvent.MB && CSongs.Category != -1)
|
||||
{
|
||||
Console.WriteLine("MB pressed");
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
|
||||
}
|
||||
else if (MouseEvent.MB && CSongs.Category == -1)
|
||||
{
|
||||
Console.WriteLine("MB pressed");
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
|
||||
}
|
||||
else
|
||||
SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent);
|
||||
|
||||
@@ -389,6 +411,13 @@ namespace Vocaluxe.Screens
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
|
||||
}
|
||||
}
|
||||
else if (Buttons[htButtons(ButtonOptionsRandomCategory)].Selected)
|
||||
{
|
||||
if (CSongs.Category == -1)
|
||||
{
|
||||
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
|
||||
}
|
||||
}
|
||||
else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected)
|
||||
{
|
||||
ToggleSongOptions(ESongOptionsView.None);
|
||||
@@ -689,6 +718,7 @@ namespace Vocaluxe.Screens
|
||||
else if (view == ESongOptionsView.General)
|
||||
{
|
||||
Buttons[htButtons(ButtonOptionsRandom)].Visible = CSongs.Category != -1;
|
||||
Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = CSongs.Category == -1;
|
||||
Buttons[htButtons(ButtonOptionsSingAll)].Visible = true;
|
||||
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = CSongs.Category != -1;
|
||||
|
||||
@@ -723,6 +753,7 @@ namespace Vocaluxe.Screens
|
||||
Buttons[htButtons(ButtonOptionsSing)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsRandom)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsSingAll)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false;
|
||||
Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false;
|
||||
|
||||