Merge branch 'medley' of github.com:Vocaluxe/Vocaluxe into medley
This commit is contained in:
commit
8fa2cb864e
6 files changed
+327
-254
No files matched your search
@@ -1211,10 +1211,10 @@
|
|||||||
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
|
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
|
||||||
<SkinHighlighted>SelectSlide</SkinHighlighted>
|
<SkinHighlighted>SelectSlide</SkinHighlighted>
|
||||||
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
|
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
|
||||||
<X>54</X>
|
<X>0</X>
|
||||||
<Y>28</Y>
|
<Y>28</Y>
|
||||||
<Z>-1,01</Z>
|
<Z>-1,01</Z>
|
||||||
<W>235</W>
|
<W>343</W>
|
||||||
<H>24</H>
|
<H>24</H>
|
||||||
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
|
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
|
||||||
<ArrowLeftX>54</ArrowLeftX>
|
<ArrowLeftX>54</ArrowLeftX>
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ namespace Vocaluxe.Lib.Playlist
|
|||||||
Songs.RemoveAt(SongNr);
|
Songs.RemoveAt(SongNr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SongDown(int SongNr)
|
public void SongUp(int SongNr)
|
||||||
{
|
{
|
||||||
if (SongNr != 0)
|
if (SongNr != 0)
|
||||||
{
|
{
|
||||||
@@ -246,9 +246,9 @@ namespace Vocaluxe.Lib.Playlist
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SongUp(int SongNr)
|
public void SongDown(int SongNr)
|
||||||
{
|
{
|
||||||
if (SongNr + 1 < Songs.Count)
|
if (SongNr < Songs.Count - 1)
|
||||||
{
|
{
|
||||||
Songs.Reverse(SongNr, 2);
|
Songs.Reverse(SongNr, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,19 @@ namespace Vocaluxe.Menu
|
|||||||
public float SReflectionSpace;
|
public float SReflectionSpace;
|
||||||
public float SReflectionHeight;
|
public float SReflectionHeight;
|
||||||
|
|
||||||
private bool _Selected;
|
|
||||||
public bool Pressed;
|
public bool Pressed;
|
||||||
|
|
||||||
|
public bool EditMode
|
||||||
|
{
|
||||||
|
get { return Text.EditMode; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Text.EditMode = value;
|
||||||
|
SText.EditMode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool _Selected;
|
||||||
public bool Selected
|
public bool Selected
|
||||||
{
|
{
|
||||||
get { return _Selected; }
|
get { return _Selected; }
|
||||||
@@ -72,6 +83,7 @@ namespace Vocaluxe.Menu
|
|||||||
SText = new CText();
|
SText = new CText();
|
||||||
Selected = false;
|
Selected = false;
|
||||||
Visible = true;
|
Visible = true;
|
||||||
|
EditMode = false;
|
||||||
|
|
||||||
Reflection = false;
|
Reflection = false;
|
||||||
ReflectionSpace = 0f;
|
ReflectionSpace = 0f;
|
||||||
|
|||||||
+274
-242
@@ -96,7 +96,6 @@ namespace Vocaluxe.Menu
|
|||||||
if (CurrentPlaylistElement == -1 && _Selected && PlaylistElementContents.Count > 0)
|
if (CurrentPlaylistElement == -1 && _Selected && PlaylistElementContents.Count > 0)
|
||||||
{
|
{
|
||||||
CurrentPlaylistElement = 0;
|
CurrentPlaylistElement = 0;
|
||||||
ActiveHover = CurrentPlaylistElement;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,7 +103,6 @@ namespace Vocaluxe.Menu
|
|||||||
public EEditMode _EditMode;
|
public EEditMode _EditMode;
|
||||||
public int ActivePlaylistID = -1;
|
public int ActivePlaylistID = -1;
|
||||||
public int Offset = 0;
|
public int Offset = 0;
|
||||||
public int ActiveHover = -1;
|
|
||||||
public int CurrentPlaylistElement = -1;
|
public int CurrentPlaylistElement = -1;
|
||||||
|
|
||||||
public CPlaylist()
|
public CPlaylist()
|
||||||
@@ -203,6 +201,7 @@ namespace Vocaluxe.Menu
|
|||||||
if (_ThemeLoaded)
|
if (_ThemeLoaded)
|
||||||
{
|
{
|
||||||
_Theme.Name = ElementName;
|
_Theme.Name = ElementName;
|
||||||
|
|
||||||
//Check for highest x/y-coords
|
//Check for highest x/y-coords
|
||||||
CompleteRect = Rect;
|
CompleteRect = Rect;
|
||||||
//ButtonPlaylistClose
|
//ButtonPlaylistClose
|
||||||
@@ -345,7 +344,7 @@ namespace Vocaluxe.Menu
|
|||||||
|
|
||||||
for (int i = 0; i < PlaylistElements.Count; i++ )
|
for (int i = 0; i < PlaylistElements.Count; i++ )
|
||||||
{
|
{
|
||||||
if (i == ActiveHover && _Selected)
|
if (i == CurrentPlaylistElement && _Selected)
|
||||||
{
|
{
|
||||||
PlaylistElements[i].Background.Texture = CTheme.GetSkinTexture(_Theme.STextureBackgroundName);
|
PlaylistElements[i].Background.Texture = CTheme.GetSkinTexture(_Theme.STextureBackgroundName);
|
||||||
PlaylistElements[i].Background.Color = BackgroundSColor;
|
PlaylistElements[i].Background.Color = BackgroundSColor;
|
||||||
@@ -390,17 +389,6 @@ namespace Vocaluxe.Menu
|
|||||||
{
|
{
|
||||||
if (Selected)
|
if (Selected)
|
||||||
{
|
{
|
||||||
int PrevPlaylistElement = CurrentPlaylistElement;
|
|
||||||
int CurrPlaylistElement = -1;
|
|
||||||
//_Interactions.HandleInput(KeyEvent);
|
|
||||||
|
|
||||||
for (int i = 0; i < PlaylistElements.Count; i++)
|
|
||||||
{
|
|
||||||
//Hover for playlist-element
|
|
||||||
if (PlaylistElementContents.Count - 1 >= i && PlaylistElements[i].SelectSlide.Selected)
|
|
||||||
CurrPlaylistElement = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Active EditMode ignores other input!
|
//Active EditMode ignores other input!
|
||||||
if (_EditMode == EEditMode.PlaylistName)
|
if (_EditMode == EEditMode.PlaylistName)
|
||||||
{
|
{
|
||||||
@@ -413,252 +401,294 @@ namespace Vocaluxe.Menu
|
|||||||
CPlaylists.Playlists[ActivePlaylistID].PlaylistName = _Theme.ButtonPlaylistName.Text.Text;
|
CPlaylists.Playlists[ActivePlaylistID].PlaylistName = _Theme.ButtonPlaylistName.Text.Text;
|
||||||
CPlaylists.Playlists[ActivePlaylistID].SavePlaylist();
|
CPlaylists.Playlists[ActivePlaylistID].SavePlaylist();
|
||||||
_EditMode = EEditMode.None;
|
_EditMode = EEditMode.None;
|
||||||
|
_Theme.ButtonPlaylistName.EditMode = false;
|
||||||
}
|
}
|
||||||
else if (KeyEvent.Key == Keys.Escape)
|
else if (KeyEvent.Key == Keys.Escape)
|
||||||
{
|
{
|
||||||
_Theme.ButtonPlaylistName.Text.Text = CPlaylists.Playlists[ActivePlaylistID].PlaylistName;
|
_Theme.ButtonPlaylistName.Text.Text = CPlaylists.Playlists[ActivePlaylistID].PlaylistName;
|
||||||
_EditMode = EEditMode.None;
|
_EditMode = EEditMode.None;
|
||||||
|
_Theme.ButtonPlaylistName.EditMode = false;
|
||||||
}
|
}
|
||||||
else if (KeyEvent.Key == Keys.Back || KeyEvent.Key == Keys.Delete)
|
else if (KeyEvent.Key == Keys.Back || KeyEvent.Key == Keys.Delete)
|
||||||
{
|
{
|
||||||
if (_Theme.ButtonPlaylistName.Text.Text.Length > 0)
|
if (_Theme.ButtonPlaylistName.Text.Text.Length > 0)
|
||||||
_Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text.Remove(_Theme.ButtonPlaylistName.Text.Text.Length - 1);
|
_Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text.Remove(_Theme.ButtonPlaylistName.Text.Text.Length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (KeyEvent.Key)
|
if (CurrentPlaylistElement == -1 || PlaylistElementContents.Count == 0 || KeyEvent.ModSHIFT) //no song is selected
|
||||||
{
|
{
|
||||||
case Keys.Up:
|
_Interactions.HandleInput(KeyEvent);
|
||||||
if (CurrentPlaylistElement == -1 && PlaylistElementContents.Count > 0)
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
{
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
SetSelectionToLastEntry();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (CurrentPlaylistElement == 0 || PlaylistElementContents.Count == 0 || KeyEvent.ModSHIFT)
|
|
||||||
{
|
|
||||||
CurrentPlaylistElement = -1;
|
|
||||||
ActiveHover = CurrentPlaylistElement;
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[0].SelectSlide);
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
if (CurrentPlaylistElement != -1)
|
||||||
if (selection != -1 && PlaylistElementContents.Count > selection)
|
return true;
|
||||||
|
}
|
||||||
|
else if (CurrentPlaylistElement != -1) //a song is selected
|
||||||
|
{
|
||||||
|
int ScrollLimit = PlaylistElements.Count / 2;
|
||||||
|
|
||||||
|
//special actions if a song is selected
|
||||||
|
switch (KeyEvent.Key)
|
||||||
|
{
|
||||||
|
case Keys.Up:
|
||||||
|
if (KeyEvent.ModSHIFT)
|
||||||
{
|
{
|
||||||
CurrentPlaylistElement = selection;
|
_Interactions.SetInteractionToSelectSlide(PlaylistElements[0].SelectSlide);
|
||||||
ActiveHover = CurrentPlaylistElement;
|
_Interactions.HandleInput(KeyEvent);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
}
|
}
|
||||||
return true;
|
else if (CurrentPlaylistElement > ScrollLimit || PlaylistElementContents.Count == 0)
|
||||||
}
|
|
||||||
else if (CurrentPlaylistElement - 1 > 0)
|
|
||||||
{
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
|
||||||
|
|
||||||
if (selection != -1 && PlaylistElementContents.Count > selection)
|
|
||||||
{
|
{
|
||||||
CurrentPlaylistElement = selection;
|
_Interactions.HandleInput(KeyEvent);
|
||||||
ActiveHover = CurrentPlaylistElement;
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
}
|
}
|
||||||
return true;
|
else if (CurrentPlaylistElement <= ScrollLimit)
|
||||||
}
|
|
||||||
else if (CurrentPlaylistElement - 1 == 0)
|
|
||||||
{
|
|
||||||
if (Offset > 0)
|
|
||||||
{
|
{
|
||||||
Offset--;
|
if (Offset > 0)
|
||||||
Update();
|
{
|
||||||
|
Offset--;
|
||||||
|
Update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_Interactions.HandleInput(KeyEvent);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
case Keys.Down:
|
||||||
_Interactions.HandleInput(KeyEvent);
|
if (KeyEvent.ModSHIFT)
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
|
||||||
if (selection != -1 && PlaylistElementContents.Count > selection)
|
|
||||||
{
|
{
|
||||||
CurrentPlaylistElement = selection;
|
for (int i = PlaylistElements.Count - 1; i >= 0; i--)
|
||||||
ActiveHover = CurrentPlaylistElement;
|
{
|
||||||
|
if (PlaylistElements[i].SelectSlide.Visible)
|
||||||
|
{
|
||||||
|
_Interactions.SetInteractionToSelectSlide(PlaylistElements[0].SelectSlide);
|
||||||
|
_Interactions.HandleInput(KeyEvent);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else if (CurrentPlaylistElement >= ScrollLimit)
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
case Keys.Down:
|
|
||||||
if (CurrentPlaylistElement == -1 && PlaylistElementContents.Count > 0)
|
|
||||||
{
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
SetSelectionToFirstEntry();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (CurrentPlaylistElement == PlaylistElements.Count - 1 || PlaylistElementContents.Count == 0 || KeyEvent.ModSHIFT)
|
|
||||||
{
|
|
||||||
CurrentPlaylistElement = -1;
|
|
||||||
ActiveHover = CurrentPlaylistElement;
|
|
||||||
|
|
||||||
int sel = PlaylistElementContents.Count - 1;
|
|
||||||
if (sel > PlaylistElements.Count - 1)
|
|
||||||
sel = PlaylistElements.Count - 1;
|
|
||||||
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[sel].SelectSlide);
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
|
||||||
if (selection != -1 && PlaylistElementContents.Count > selection)
|
|
||||||
{
|
{
|
||||||
CurrentPlaylistElement = selection;
|
if (Offset < PlaylistElementContents.Count - PlaylistElements.Count)
|
||||||
ActiveHover = CurrentPlaylistElement;
|
{
|
||||||
|
Offset++;
|
||||||
|
Update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_Interactions.HandleInput(KeyEvent);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
else if (CurrentPlaylistElement < ScrollLimit)
|
||||||
}
|
|
||||||
else if (CurrentPlaylistElement + 1 < PlaylistElements.Count - 1)
|
|
||||||
{
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
|
||||||
|
|
||||||
if (selection != -1 && PlaylistElementContents.Count > selection)
|
|
||||||
{
|
{
|
||||||
CurrentPlaylistElement = selection;
|
_Interactions.HandleInput(KeyEvent);
|
||||||
ActiveHover = CurrentPlaylistElement;
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (CurrentPlaylistElement + 1 >= PlaylistElements.Count - 1 && CurrentPlaylistElement + Offset + 1 < PlaylistElementContents.Count)
|
|
||||||
{
|
|
||||||
if (PlaylistElementContents[CurrentPlaylistElement + Offset + 1].SongID != -1)
|
|
||||||
{
|
|
||||||
Offset++;
|
|
||||||
Update();
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
case Keys.Delete:
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
|
||||||
if (selection != -1 && PlaylistElementContents.Count > selection)
|
|
||||||
{
|
|
||||||
CurrentPlaylistElement = selection;
|
|
||||||
ActiveHover = CurrentPlaylistElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
case Keys.Delete:
|
|
||||||
if (CurrentPlaylistElement != -1)
|
|
||||||
{
|
|
||||||
CPlaylists.Playlists[ActivePlaylistID].DeleteSong(PlaylistElements[CurrentPlaylistElement].Content);
|
CPlaylists.Playlists[ActivePlaylistID].DeleteSong(PlaylistElements[CurrentPlaylistElement].Content);
|
||||||
UpdatePlaylist();
|
UpdatePlaylist();
|
||||||
|
|
||||||
|
if (Offset > 0)
|
||||||
|
Offset--;
|
||||||
|
|
||||||
|
Update();
|
||||||
|
|
||||||
|
if (PlaylistElementContents.Count - 1 < CurrentPlaylistElement)
|
||||||
|
{
|
||||||
|
CurrentPlaylistElement = PlaylistElementContents.Count - 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (CurrentPlaylistElement != -1)
|
if (CurrentPlaylistElement != -1)
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
||||||
return true;
|
break;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
|
case Keys.Back:
|
||||||
|
ClosePlaylist(); //really? or better global?
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Enter:
|
||||||
|
StartPlaylistSongs();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Add: //move the selected song up
|
||||||
|
if (PlaylistElementContents.Count > 1 && (CurrentPlaylistElement > 0 || Offset > 0))
|
||||||
|
{
|
||||||
|
CPlaylists.Playlists[ActivePlaylistID].SongUp(CurrentPlaylistElement + Offset);
|
||||||
|
UpdatePlaylist();
|
||||||
|
|
||||||
|
KeyEvent key = new KeyEvent();
|
||||||
|
key.Key = Keys.Up;
|
||||||
|
|
||||||
|
if (CurrentPlaylistElement > ScrollLimit)
|
||||||
|
{
|
||||||
|
_Interactions.HandleInput(key);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
}
|
||||||
|
else if (CurrentPlaylistElement <= ScrollLimit)
|
||||||
|
{
|
||||||
|
if (Offset > 0)
|
||||||
|
{
|
||||||
|
Offset--;
|
||||||
|
Update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_Interactions.HandleInput(key);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Subtract: //move the selected song down
|
||||||
|
if (PlaylistElementContents.Count > 1 && CurrentPlaylistElement + Offset < PlaylistElementContents.Count - 1)
|
||||||
|
{
|
||||||
|
CPlaylists.Playlists[ActivePlaylistID].SongDown(CurrentPlaylistElement + Offset);
|
||||||
|
UpdatePlaylist();
|
||||||
|
|
||||||
|
KeyEvent key = new KeyEvent();
|
||||||
|
key.Key = Keys.Down;
|
||||||
|
|
||||||
|
if (CurrentPlaylistElement >= ScrollLimit)
|
||||||
|
{
|
||||||
|
if (Offset < PlaylistElementContents.Count - PlaylistElements.Count)
|
||||||
|
{
|
||||||
|
Offset++;
|
||||||
|
Update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_Interactions.HandleInput(key);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (CurrentPlaylistElement < ScrollLimit)
|
||||||
|
{
|
||||||
|
_Interactions.HandleInput(key);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.PageUp: //scroll up
|
||||||
|
if (PlaylistElementContents.Count > 0)
|
||||||
|
{
|
||||||
|
Offset -= PlaylistElements.Count;
|
||||||
|
|
||||||
|
if (Offset < 0)
|
||||||
|
Offset = 0;
|
||||||
|
|
||||||
|
Update();
|
||||||
|
CurrentPlaylistElement = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.PageDown: //scroll down
|
||||||
|
if (PlaylistElementContents.Count > 0)
|
||||||
|
{
|
||||||
|
Offset += PlaylistElements.Count;
|
||||||
|
|
||||||
|
if (Offset > PlaylistElementContents.Count - PlaylistElements.Count)
|
||||||
|
Offset = PlaylistElementContents.Count - PlaylistElements.Count;
|
||||||
|
|
||||||
|
if (Offset < 0)
|
||||||
|
Offset = 0;
|
||||||
|
|
||||||
|
Update();
|
||||||
|
|
||||||
|
for (int i = PlaylistElements.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (PlaylistElements[i].SelectSlide.Visible)
|
||||||
|
{
|
||||||
|
CurrentPlaylistElement = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Left:
|
||||||
|
_Interactions.HandleInput(KeyEvent);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
|
||||||
|
if (CurrentPlaylistElement != -1)
|
||||||
|
{
|
||||||
|
CPlaylists.Playlists[ActivePlaylistID].Songs[CurrentPlaylistElement + Offset].GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||||
|
UpdatePlaylist();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Right:
|
||||||
|
_Interactions.HandleInput(KeyEvent);
|
||||||
|
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||||
|
|
||||||
|
if (CurrentPlaylistElement != -1)
|
||||||
|
{
|
||||||
|
CPlaylists.Playlists[ActivePlaylistID].Songs[CurrentPlaylistElement + Offset].GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||||
|
UpdatePlaylist();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//default actions
|
||||||
|
switch (KeyEvent.Key)
|
||||||
|
{
|
||||||
case Keys.Back:
|
case Keys.Back:
|
||||||
ClosePlaylist();
|
if (_Theme.ButtonPlaylistName.Selected)
|
||||||
|
{
|
||||||
|
_EditMode = EEditMode.PlaylistName;
|
||||||
|
_Theme.ButtonPlaylistName.EditMode = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ClosePlaylist();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
if (KeyEvent.ModSHIFT)
|
if (_Theme.ButtonPlaylistClose.Selected)
|
||||||
|
{
|
||||||
|
ClosePlaylist();
|
||||||
|
}
|
||||||
|
else if (_Theme.ButtonPlaylistSing.Selected)
|
||||||
|
{
|
||||||
StartPlaylistSongs();
|
StartPlaylistSongs();
|
||||||
else
|
}
|
||||||
|
else if (_Theme.ButtonPlaylistSave.Selected)
|
||||||
{
|
{
|
||||||
if (_Theme.ButtonPlaylistClose.Selected)
|
CPlaylists.SavePlaylist(ActivePlaylistID);
|
||||||
|
}
|
||||||
|
else if (_Theme.ButtonPlaylistDelete.Selected)
|
||||||
|
{
|
||||||
|
CPlaylists.DeletePlaylist(ActivePlaylistID);
|
||||||
|
ClosePlaylist();
|
||||||
|
}
|
||||||
|
else if (_Theme.ButtonPlaylistName.Selected)
|
||||||
|
{
|
||||||
|
if (_EditMode != EEditMode.PlaylistName)
|
||||||
{
|
{
|
||||||
ClosePlaylist();
|
_EditMode = EEditMode.PlaylistName;
|
||||||
|
_Theme.ButtonPlaylistName.EditMode = true;
|
||||||
}
|
}
|
||||||
else if (_Theme.ButtonPlaylistSing.Selected)
|
else
|
||||||
{
|
{
|
||||||
StartPlaylistSongs();
|
_EditMode = EEditMode.None;
|
||||||
}
|
_Theme.ButtonPlaylistName.EditMode = false;
|
||||||
else if (_Theme.ButtonPlaylistSave.Selected)
|
|
||||||
{
|
|
||||||
CPlaylists.SavePlaylist(ActivePlaylistID);
|
|
||||||
}
|
|
||||||
else if (_Theme.ButtonPlaylistDelete.Selected)
|
|
||||||
{
|
|
||||||
CPlaylists.DeletePlaylist(ActivePlaylistID);
|
|
||||||
ClosePlaylist();
|
|
||||||
}
|
|
||||||
else if (_Theme.ButtonPlaylistName.Selected)
|
|
||||||
{
|
|
||||||
if (_EditMode != EEditMode.PlaylistName)
|
|
||||||
_EditMode = EEditMode.PlaylistName;
|
|
||||||
else
|
|
||||||
_EditMode = EEditMode.None;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.PageUp:
|
|
||||||
if (CurrentPlaylistElement != -1)
|
|
||||||
{
|
|
||||||
CPlaylists.Playlists[ActivePlaylistID].SongDown(CurrentPlaylistElement + Offset);
|
|
||||||
if (CurrentPlaylistElement - 1 > -1)
|
|
||||||
{
|
|
||||||
CurrentPlaylistElement--;
|
|
||||||
ActiveHover = CurrentPlaylistElement;
|
|
||||||
}
|
|
||||||
else if (Offset > 0)
|
|
||||||
{
|
|
||||||
Offset--;
|
|
||||||
}
|
|
||||||
UpdatePlaylist();
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Keys.PageDown:
|
|
||||||
if (CurrentPlaylistElement != -1)
|
|
||||||
{
|
|
||||||
CPlaylists.Playlists[ActivePlaylistID].SongUp(CurrentPlaylistElement + Offset);
|
|
||||||
if (CurrentPlaylistElement + 1 < PlaylistElements.Count)
|
|
||||||
{
|
|
||||||
CurrentPlaylistElement++;
|
|
||||||
ActiveHover = CurrentPlaylistElement;
|
|
||||||
}
|
|
||||||
else if (Offset + CurrentPlaylistElement < PlaylistElementContents.Count)
|
|
||||||
{
|
|
||||||
Offset++;
|
|
||||||
}
|
|
||||||
UpdatePlaylist();
|
|
||||||
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Keys.Left:
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
if (CurrentPlaylistElement != -1)
|
|
||||||
{
|
|
||||||
CPlaylists.Playlists[ActivePlaylistID].Songs[CurrentPlaylistElement + Offset].GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
|
||||||
UpdatePlaylist();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
case Keys.Right:
|
|
||||||
_Interactions.HandleInput(KeyEvent);
|
|
||||||
if (CurrentPlaylistElement != -1)
|
|
||||||
{
|
|
||||||
CPlaylists.Playlists[ActivePlaylistID].Songs[CurrentPlaylistElement + Offset].GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
|
||||||
UpdatePlaylist();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetSelectionToLastEntry()
|
private void SetSelectionToLastEntry()
|
||||||
@@ -666,21 +696,21 @@ namespace Vocaluxe.Menu
|
|||||||
if (PlaylistElementContents.Count == 0)
|
if (PlaylistElementContents.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
|
||||||
if (selection == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int off = PlaylistElementContents.Count - PlaylistElements.Count;
|
int off = PlaylistElementContents.Count - PlaylistElements.Count;
|
||||||
if (off >= 0)
|
if (off >= 0)
|
||||||
{
|
|
||||||
Offset = off;
|
Offset = off;
|
||||||
Update();
|
else
|
||||||
}
|
Offset = 0;
|
||||||
|
|
||||||
if (PlaylistElementContents.Count > selection)
|
Update();
|
||||||
|
|
||||||
|
for (int i = PlaylistElements.Count - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
CurrentPlaylistElement = selection;
|
if (PlaylistElements[i].SelectSlide.Visible)
|
||||||
ActiveHover = CurrentPlaylistElement;
|
{
|
||||||
|
CurrentPlaylistElement = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,18 +719,10 @@ namespace Vocaluxe.Menu
|
|||||||
if (PlaylistElementContents.Count == 0)
|
if (PlaylistElementContents.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int selection = GetSelectedSelectionNr();
|
|
||||||
if (selection == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Offset = 0;
|
Offset = 0;
|
||||||
Update();
|
Update();
|
||||||
|
|
||||||
if (PlaylistElementContents.Count > selection)
|
CurrentPlaylistElement = 0;
|
||||||
{
|
|
||||||
CurrentPlaylistElement = selection;
|
|
||||||
ActiveHover = CurrentPlaylistElement;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int GetSelectedSelectionNr()
|
private int GetSelectedSelectionNr()
|
||||||
@@ -713,6 +735,20 @@ namespace Vocaluxe.Menu
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ScrollToBottom()
|
||||||
|
{
|
||||||
|
if (PlaylistElementContents.Count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int off = PlaylistElementContents.Count - PlaylistElements.Count;
|
||||||
|
if (off >= 0)
|
||||||
|
Offset = off;
|
||||||
|
else
|
||||||
|
Offset = 0;
|
||||||
|
|
||||||
|
Update();
|
||||||
|
}
|
||||||
|
|
||||||
public bool HandleMouse(MouseEvent MouseEvent)
|
public bool HandleMouse(MouseEvent MouseEvent)
|
||||||
{
|
{
|
||||||
_Interactions.HandleMouse(MouseEvent);
|
_Interactions.HandleMouse(MouseEvent);
|
||||||
@@ -742,6 +778,7 @@ namespace Vocaluxe.Menu
|
|||||||
Update();
|
Update();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
//LB actions
|
//LB actions
|
||||||
if (MouseEvent.LB)
|
if (MouseEvent.LB)
|
||||||
@@ -775,6 +812,7 @@ namespace Vocaluxe.Menu
|
|||||||
else if (_Theme.ButtonPlaylistName.Selected)
|
else if (_Theme.ButtonPlaylistName.Selected)
|
||||||
{
|
{
|
||||||
_EditMode = EEditMode.PlaylistName;
|
_EditMode = EEditMode.PlaylistName;
|
||||||
|
_Theme.ButtonPlaylistName.EditMode = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -786,8 +824,8 @@ namespace Vocaluxe.Menu
|
|||||||
if (PlaylistElementContents.Count - 1 >= i && CHelper.IsInBounds(PlaylistElements[i].Background.Rect, MouseEvent))
|
if (PlaylistElementContents.Count - 1 >= i && CHelper.IsInBounds(PlaylistElements[i].Background.Rect, MouseEvent))
|
||||||
{
|
{
|
||||||
hover_set = true;
|
hover_set = true;
|
||||||
ActiveHover = i;
|
|
||||||
CurrentPlaylistElement = i;
|
CurrentPlaylistElement = i;
|
||||||
|
_Interactions.SetInteractionToSelectSlide(PlaylistElements[CurrentPlaylistElement].SelectSlide);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Delete Entry with RB
|
//Delete Entry with RB
|
||||||
@@ -800,14 +838,12 @@ namespace Vocaluxe.Menu
|
|||||||
}
|
}
|
||||||
if(!hover_set)
|
if(!hover_set)
|
||||||
{
|
{
|
||||||
ActiveHover = -1;
|
|
||||||
CurrentPlaylistElement = -1;
|
CurrentPlaylistElement = -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EEditMode.PlaylistName:
|
case EEditMode.PlaylistName:
|
||||||
_Interactions.SetInteractionToButton(_Theme.ButtonPlaylistName);
|
_Interactions.SetInteractionToButton(_Theme.ButtonPlaylistName);
|
||||||
ActiveHover = -1;
|
|
||||||
CurrentPlaylistElement = -1;
|
CurrentPlaylistElement = -1;
|
||||||
if (MouseEvent.LB)
|
if (MouseEvent.LB)
|
||||||
{
|
{
|
||||||
@@ -825,6 +861,7 @@ namespace Vocaluxe.Menu
|
|||||||
{
|
{
|
||||||
_Theme.ButtonPlaylistName.Text.Text = CPlaylists.Playlists[ActivePlaylistID].PlaylistName;
|
_Theme.ButtonPlaylistName.Text.Text = CPlaylists.Playlists[ActivePlaylistID].PlaylistName;
|
||||||
_EditMode = EEditMode.None;
|
_EditMode = EEditMode.None;
|
||||||
|
_Theme.ButtonPlaylistName.EditMode = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -917,12 +954,8 @@ namespace Vocaluxe.Menu
|
|||||||
pec.Mode = CPlaylists.Playlists[ActivePlaylistID].Songs[i].GameMode;
|
pec.Mode = CPlaylists.Playlists[ActivePlaylistID].Songs[i].GameMode;
|
||||||
PlaylistElementContents.Add(pec);
|
PlaylistElementContents.Add(pec);
|
||||||
}
|
}
|
||||||
|
|
||||||
Update();
|
Update();
|
||||||
if (PlaylistElementContents.Count - 1 < ActiveHover || PlaylistElementContents.Count - 1 < CurrentPlaylistElement)
|
|
||||||
{
|
|
||||||
ActiveHover = PlaylistElementContents.Count - 1;
|
|
||||||
CurrentPlaylistElement = PlaylistElementContents.Count - 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartPlaylistSongs()
|
private void StartPlaylistSongs()
|
||||||
@@ -952,21 +985,20 @@ namespace Vocaluxe.Menu
|
|||||||
{
|
{
|
||||||
if (ActivePlaylistID > -1 && ActivePlaylistID < CPlaylists.NumPlaylists)
|
if (ActivePlaylistID > -1 && ActivePlaylistID < CPlaylists.NumPlaylists)
|
||||||
{
|
{
|
||||||
int e = 0 + Offset;
|
|
||||||
for (int i = 0; i < PlaylistElements.Count; i++ )
|
for (int i = 0; i < PlaylistElements.Count; i++ )
|
||||||
{
|
{
|
||||||
if (e + i < PlaylistElementContents.Count)
|
if (Offset + i < PlaylistElementContents.Count)
|
||||||
{
|
{
|
||||||
PlaylistElements[i].Content = e+i;
|
PlaylistElements[i].Content = Offset + i;
|
||||||
PlaylistElements[i].Background.Visible = true;
|
PlaylistElements[i].Background.Visible = true;
|
||||||
PlaylistElements[i].Cover.Visible = true;
|
PlaylistElements[i].Cover.Visible = true;
|
||||||
PlaylistElements[i].SelectSlide.Visible = true;
|
PlaylistElements[i].SelectSlide.Visible = true;
|
||||||
PlaylistElements[i].Text1.Visible = true;
|
PlaylistElements[i].Text1.Visible = true;
|
||||||
PlaylistElementContent pec = PlaylistElementContents[e + i];
|
PlaylistElementContent pec = PlaylistElementContents[Offset + i];
|
||||||
CSong song = CSongs.GetSong(pec.SongID);
|
CSong song = CSongs.GetSong(pec.SongID);
|
||||||
PlaylistElements[i].Cover.Texture = song.CoverTextureSmall;
|
PlaylistElements[i].Cover.Texture = song.CoverTextureSmall;
|
||||||
string t1 = _Theme.Text1.Text.Replace("%a", song.Artist).Replace("%t", song.Title);
|
string t1 = _Theme.Text1.Text.Replace("%a", song.Artist).Replace("%t", song.Title);
|
||||||
PlaylistElements[i].Text1.Text = song.Artist + " - " + song.Title;
|
PlaylistElements[i].Text1.Text = /*(Offset + i + 1).ToString() + ") " + */song.Artist + " - " + song.Title; //TODO: Add text field for the number
|
||||||
PlaylistElements[i].SelectSlide.Clear();
|
PlaylistElements[i].SelectSlide.Clear();
|
||||||
for (int g = 0; g < pec.Modes.Length; g++)
|
for (int g = 0; g < pec.Modes.Length; g++)
|
||||||
{
|
{
|
||||||
|
|||||||
+24
-6
@@ -217,6 +217,7 @@ namespace Vocaluxe.Menu
|
|||||||
|
|
||||||
public bool Selected;
|
public bool Selected;
|
||||||
public bool Visible = true;
|
public bool Visible = true;
|
||||||
|
public bool EditMode = false;
|
||||||
|
|
||||||
public float Alpha = 1f;
|
public float Alpha = 1f;
|
||||||
|
|
||||||
@@ -602,8 +603,10 @@ namespace Vocaluxe.Menu
|
|||||||
|
|
||||||
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
||||||
|
|
||||||
|
if (!EditMode)
|
||||||
CFonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
CFonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||||
|
else
|
||||||
|
CFonts.DrawText(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||||
|
|
||||||
if (Reflection)
|
if (Reflection)
|
||||||
{
|
{
|
||||||
@@ -622,7 +625,10 @@ namespace Vocaluxe.Menu
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CFonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
if (!EditMode)
|
||||||
|
CFonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||||
|
else
|
||||||
|
CFonts.DrawTextReflection(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Selected && (CSettings.GameState == EGameState.EditTheme))
|
if (Selected && (CSettings.GameState == EGameState.EditTheme))
|
||||||
@@ -659,7 +665,11 @@ namespace Vocaluxe.Menu
|
|||||||
|
|
||||||
CFonts.SetFont(Fon);
|
CFonts.SetFont(Fon);
|
||||||
CFonts.Style = Style;
|
CFonts.Style = Style;
|
||||||
CFonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
|
||||||
|
if (!EditMode)
|
||||||
|
CFonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
||||||
|
else
|
||||||
|
CFonts.DrawText(Text + "|", Height, x, Y, Z, color, begin, end);
|
||||||
|
|
||||||
if (Reflection)
|
if (Reflection)
|
||||||
{
|
{
|
||||||
@@ -738,13 +748,21 @@ namespace Vocaluxe.Menu
|
|||||||
|
|
||||||
CFonts.SetFont(Fon);
|
CFonts.SetFont(Fon);
|
||||||
CFonts.Style = Style;
|
CFonts.Style = Style;
|
||||||
CFonts.DrawText(_Text, h, x, y, Z, color);
|
|
||||||
|
if (!EditMode)
|
||||||
|
CFonts.DrawText(_Text, h, x, y, Z, color);
|
||||||
|
else
|
||||||
|
CFonts.DrawText(_Text + "|", h, x, y, Z, color);
|
||||||
|
|
||||||
if (reflection)
|
if (reflection)
|
||||||
{
|
{
|
||||||
float space = (rectHeight - Y - bounds.Height) * 2f + reflectionSpace;
|
float space = (rectHeight - Y - bounds.Height) * 2f + reflectionSpace;
|
||||||
float height = reflectionHeight - (rectHeight - Y) + bounds.Height;
|
float height = reflectionHeight - (rectHeight - Y) + bounds.Height;
|
||||||
CFonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
|
|
||||||
|
if (!EditMode)
|
||||||
|
CFonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
|
||||||
|
else
|
||||||
|
CFonts.DrawTextReflection(_Text + "|", h, x, y, Z, color, space, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Selected && (CSettings.GameState == EGameState.EditTheme))
|
if (Selected && (CSettings.GameState == EGameState.EditTheme))
|
||||||
|
|||||||
@@ -771,8 +771,11 @@ namespace Vocaluxe.Screens
|
|||||||
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection))
|
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection))
|
||||||
{
|
{
|
||||||
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection;
|
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection;
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection + 1;
|
||||||
|
|
||||||
//Open playlist
|
//Open playlist
|
||||||
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
||||||
|
Playlists[htPlaylists(Playlist)].ScrollToBottom();
|
||||||
}
|
}
|
||||||
ToggleSongOptions(ESongOptionsView.None);
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
}
|
}
|
||||||
@@ -791,13 +794,16 @@ namespace Vocaluxe.Screens
|
|||||||
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
|
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
|
||||||
else
|
else
|
||||||
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
|
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
|
||||||
|
|
||||||
//Check if Playlist really exists
|
//Check if Playlist really exists
|
||||||
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1 < 0)
|
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1 < 0)
|
||||||
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
|
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
|
||||||
else
|
else
|
||||||
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1;
|
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1;
|
||||||
|
|
||||||
//Add song to playlist
|
//Add song to playlist
|
||||||
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
||||||
|
|
||||||
//Open playlist
|
//Open playlist
|
||||||
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
||||||
}
|
}
|
||||||
@@ -813,12 +819,16 @@ namespace Vocaluxe.Screens
|
|||||||
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
|
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
|
||||||
else
|
else
|
||||||
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
|
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
|
||||||
|
|
||||||
//Create new playlist
|
//Create new playlist
|
||||||
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
|
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
|
||||||
|
|
||||||
//Add song to playlist
|
//Add song to playlist
|
||||||
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
||||||
|
|
||||||
//Open playlist
|
//Open playlist
|
||||||
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
||||||
|
|
||||||
//Add new playlist to select-slide
|
//Add new playlist to select-slide
|
||||||
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
|
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
|
||||||
|
|
||||||
@@ -837,6 +847,7 @@ namespace Vocaluxe.Screens
|
|||||||
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
|
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
|
||||||
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
||||||
Playlists[htPlaylists(Playlist)].UpdatePlaylist();
|
Playlists[htPlaylists(Playlist)].UpdatePlaylist();
|
||||||
|
Playlists[htPlaylists(Playlist)].ScrollToBottom();
|
||||||
}
|
}
|
||||||
ToggleSongOptions(ESongOptionsView.Song);
|
ToggleSongOptions(ESongOptionsView.Song);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user