Added repeat function

This commit is contained in:
Stephan Sundermann committed 2012-03-02 17:28:51 +01:00
1 parent 6bd7c5361e
commit 8b1a7520b8
9 files changed
+67 -2

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.
@@ -206,5 +206,52 @@
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonNext>
<ButtonRepeat>
<!--<Skin>: Texture name-->
<Skin>RepeatIcon</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>RepeatIcon</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>265</X>
<Y>0</Y>
<Z>0,00</Z>
<W>50</W>
<H>50</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>265</X>
<Y>25</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</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>Normal</Font>
<!--<Text>: Text or translation tag-->
<Text></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-->
</ButtonRepeat>
</PopupScreenPlayerControl>
</root>
+1
View File
@@ -220,6 +220,7 @@
<NextIcon>NextIcon.png</NextIcon>
<PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon>
</Skins>
<Videos>
<BG_Video>[Blue]BG_Video.mp4</BG_Video>
+1
View File
@@ -220,6 +220,7 @@
<NextIcon>NextIcon.png</NextIcon>
<PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon>
</Skins>
<Videos>
<BG_Video>[Green]BG_Video.mp4</BG_Video>
+2 -1
View File
@@ -219,7 +219,8 @@
<PreviousIcon>PreviousIcon.png</PreviousIcon>
<NextIcon>NextIcon.png</NextIcon>
<PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon>
<PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon>
</Skins>
<Videos>
<BG_Video>[Red]BG_Video.mp4</BG_Video>
+2 -1
View File
@@ -219,7 +219,8 @@
<PreviousIcon>PreviousIcon.png</PreviousIcon>
<NextIcon>NextIcon.png</NextIcon>
<PlayIcon>PlayIcon.png</PlayIcon>
<PauseIcon>PauseIcon.png</PauseIcon>
<PauseIcon>PauseIcon.png</PauseIcon>
<RepeatIcon>RepeatIcon.png</RepeatIcon>
</Skins>
<Videos>
<BG_Video>[Yellow]BG_Video.mp4</BG_Video>
+8
View File
@@ -132,6 +132,14 @@ namespace Vocaluxe.Base
}
}
public static void Repeat()
{
if (_AllFileNames.Count > 0 && _CurrentMusicStream != -1)
{
CSound.SetPosition(_CurrentMusicStream, 0);
}
}
public static void ApplyVolume()
{
CSound.SetStreamVolume(_CurrentMusicStream, CConfig.BackgroundMusicVolume);
@@ -22,6 +22,7 @@ namespace Vocaluxe.Screens
private const string ButtonPlay = "ButtonPlay";
private const string ButtonPause = "ButtonPause";
private const string ButtonNext = "ButtonNext";
private const string ButtonRepeat = "ButtonRepeat";
public CPopupScreenPlayerControl()
{
@@ -42,6 +43,7 @@ namespace Vocaluxe.Screens
buttons.Add(ButtonPause);
buttons.Add(ButtonPrevious);
buttons.Add(ButtonNext);
buttons.Add(ButtonRepeat);
_ThemeButtons = buttons.ToArray();
}
@@ -70,6 +72,8 @@ namespace Vocaluxe.Screens
CBackgroundMusic.Play();
if (Buttons[htButtons(ButtonPause)].Selected)
CBackgroundMusic.Pause();
if (Buttons[htButtons(ButtonRepeat)].Selected)
CBackgroundMusic.Repeat();
break;
}
}
@@ -90,6 +94,8 @@ namespace Vocaluxe.Screens
CBackgroundMusic.Play();
if (Buttons[htButtons(ButtonPause)].Selected)
CBackgroundMusic.Pause();
if (Buttons[htButtons(ButtonRepeat)].Selected)
CBackgroundMusic.Repeat();
} else if (MouseEvent.LB)
{
CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);