Merge pull request #482 from Vocaluxe/ButtonFilterToPlaylist
Add list button to toggle playlist filter (#218)
This commit is contained in:
8 files changed
+74
-2
No files matched your search
@@ -1,5 +1,11 @@
|
||||
ScreenSong
|
||||
|
||||
++++++++++
|
||||
Version 10:
|
||||
|
||||
Add:
|
||||
<ButtonPlaylistList>
|
||||
|
||||
++++++++++
|
||||
Version 9:
|
||||
|
||||
|
||||
@@ -353,6 +353,7 @@
|
||||
<DeleteIcon>DeleteIcon.png</DeleteIcon>
|
||||
<SaveIcon>SaveIcon.png</SaveIcon>
|
||||
<SingIcon>SingIcon.png</SingIcon>
|
||||
<ListIcon>ListIcon.png</ListIcon>
|
||||
<Minus>MinusIcon.png</Minus>
|
||||
<Plus>PlusIcon.png</Plus>
|
||||
<VolUp>VolUp.png</VolUp>
|
||||
|
||||
@@ -353,6 +353,7 @@
|
||||
<DeleteIcon>DeleteIcon.png</DeleteIcon>
|
||||
<SaveIcon>SaveIcon.png</SaveIcon>
|
||||
<SingIcon>SingIcon.png</SingIcon>
|
||||
<ListIcon>ListIcon.png</ListIcon>
|
||||
<Minus>MinusIcon.png</Minus>
|
||||
<Plus>PlusIcon.png</Plus>
|
||||
<VolUp>VolUp.png</VolUp>
|
||||
|
||||
@@ -353,6 +353,7 @@
|
||||
<DeleteIcon>DeleteIcon.png</DeleteIcon>
|
||||
<SaveIcon>SaveIcon.png</SaveIcon>
|
||||
<SingIcon>SingIcon.png</SingIcon>
|
||||
<ListIcon>ListIcon.png</ListIcon>
|
||||
<Minus>MinusIcon.png</Minus>
|
||||
<Plus>PlusIcon.png</Plus>
|
||||
<VolUp>VolUp.png</VolUp>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 720 B |
@@ -2,7 +2,7 @@
|
||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Informations>
|
||||
<ScreenName>ScreenSong</ScreenName>
|
||||
<ScreenVersion>9</ScreenVersion>
|
||||
<ScreenVersion>10</ScreenVersion>
|
||||
</Informations>
|
||||
<Backgrounds>
|
||||
<Background Name="Background1">
|
||||
@@ -1460,6 +1460,33 @@
|
||||
<Text />
|
||||
</Text>
|
||||
</ButtonPlaylistSave>
|
||||
<ButtonPlaylistList Name="ButtonPlaylistList">
|
||||
<Skin>ListIcon</Skin>
|
||||
<SkinSelected>ListIcon</SkinSelected>
|
||||
<Rect>
|
||||
<X>1120</X>
|
||||
<Y>548</Y>
|
||||
<W>35</W>
|
||||
<H>35</H>
|
||||
<Z>-1.01</Z>
|
||||
</Rect>
|
||||
<Color Name="ButtonColor" />
|
||||
<SelColor Name="ButtonSelColor" />
|
||||
<Text Name="Text">
|
||||
<X>180</X>
|
||||
<Y>5</Y>
|
||||
<Z>0</Z>
|
||||
<H>25</H>
|
||||
<MaxW>350</MaxW>
|
||||
<Color Name="ButtonTextColor" />
|
||||
<SelColor Name="ButtonTextSelColor" />
|
||||
<Align>Center</Align>
|
||||
<ResizeAlign>Center</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text />
|
||||
</Text>
|
||||
</ButtonPlaylistList>
|
||||
<ButtonPlaylistDelete Name="ButtonPlaylistDelete">
|
||||
<Skin>DeleteIcon</Skin>
|
||||
<SkinSelected>DeleteIcon</SkinSelected>
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Vocaluxe.Screens
|
||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 9; }
|
||||
get { return 10; }
|
||||
}
|
||||
|
||||
private const string _TextCategory = "TextCategory";
|
||||
@@ -217,6 +217,11 @@ namespace Vocaluxe.Screens
|
||||
keyEvent.Handled = true;
|
||||
return true;
|
||||
}
|
||||
if (keyEvent.Key == Keys.Enter && _Playlist.isButtonPlaylistListSelected())
|
||||
{
|
||||
_TogglePlaylistFilter();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Playlist selection is handled below not in base!
|
||||
@@ -506,6 +511,11 @@ namespace Vocaluxe.Screens
|
||||
_SongMenu.SmallView = false;
|
||||
return true;
|
||||
}
|
||||
if (mouseEvent.LB && _Playlist.isButtonPlaylistListSelected())
|
||||
{
|
||||
_TogglePlaylistFilter();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (CHelper.IsInBounds(_SongMenu.Rect, mouseEvent))
|
||||
{
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace VocaluxeLib.Menu
|
||||
public SThemeButton ButtonPlaylistSave;
|
||||
public SThemeButton ButtonPlaylistDelete;
|
||||
public SThemeButton ButtonPlaylistSing;
|
||||
public SThemeButton ButtonPlaylistList;
|
||||
|
||||
public SThemeSelectSlide SelectSlideGameMode;
|
||||
}
|
||||
@@ -163,6 +164,7 @@ namespace VocaluxeLib.Menu
|
||||
private readonly CButton _ButtonPlaylistSave;
|
||||
private readonly CButton _ButtonPlaylistDelete;
|
||||
private readonly CButton _ButtonPlaylistSing;
|
||||
private readonly CButton _ButtonPlaylistList;
|
||||
private readonly CText _Text1;
|
||||
private readonly CSelectSlide _SelectSlideGameMode;
|
||||
private readonly CStatic _StaticPlaylistHeader;
|
||||
@@ -235,6 +237,7 @@ namespace VocaluxeLib.Menu
|
||||
_ButtonPlaylistDelete = new CButton(_PartyModeID);
|
||||
_ButtonPlaylistSave = new CButton(_PartyModeID);
|
||||
_ButtonPlaylistSing = new CButton(_PartyModeID);
|
||||
_ButtonPlaylistList = new CButton(_PartyModeID);
|
||||
_SelectSlideGameMode = new CSelectSlide(_PartyModeID);
|
||||
|
||||
Visible = false;
|
||||
@@ -254,6 +257,7 @@ namespace VocaluxeLib.Menu
|
||||
_ButtonPlaylistDelete = new CButton(_Theme.ButtonPlaylistDelete, _PartyModeID);
|
||||
_ButtonPlaylistSave = new CButton(_Theme.ButtonPlaylistSave, _PartyModeID);
|
||||
_ButtonPlaylistSing = new CButton(_Theme.ButtonPlaylistSing, _PartyModeID);
|
||||
_ButtonPlaylistList = new CButton(_Theme.ButtonPlaylistList, _PartyModeID);
|
||||
_SelectSlideGameMode = new CSelectSlide(_Theme.SelectSlideGameMode, _PartyModeID);
|
||||
|
||||
_AddStatic(_StaticPlaylistFooter);
|
||||
@@ -263,6 +267,7 @@ namespace VocaluxeLib.Menu
|
||||
_AddButton(_ButtonPlaylistDelete);
|
||||
_AddButton(_ButtonPlaylistSave);
|
||||
_AddButton(_ButtonPlaylistSing);
|
||||
_AddButton(_ButtonPlaylistList);
|
||||
|
||||
Visible = false;
|
||||
Selected = false;
|
||||
@@ -279,6 +284,7 @@ namespace VocaluxeLib.Menu
|
||||
_Theme.ButtonPlaylistClose = (SThemeButton)_ButtonPlaylistClose.GetTheme();
|
||||
_Theme.ButtonPlaylistSave = (SThemeButton)_ButtonPlaylistSave.GetTheme();
|
||||
_Theme.ButtonPlaylistDelete = (SThemeButton)_ButtonPlaylistDelete.GetTheme();
|
||||
_Theme.ButtonPlaylistList = (SThemeButton)_ButtonPlaylistList.GetTheme();
|
||||
}
|
||||
|
||||
public void UpdateGame()
|
||||
@@ -321,6 +327,7 @@ namespace VocaluxeLib.Menu
|
||||
_ButtonPlaylistName.UnloadSkin();
|
||||
_ButtonPlaylistSave.UnloadSkin();
|
||||
_ButtonPlaylistSing.UnloadSkin();
|
||||
_ButtonPlaylistList.UnloadSkin();
|
||||
|
||||
_StaticPlaylistFooter.UnloadSkin();
|
||||
_StaticPlaylistHeader.UnloadSkin();
|
||||
@@ -342,6 +349,7 @@ namespace VocaluxeLib.Menu
|
||||
_ButtonPlaylistName.LoadSkin();
|
||||
_ButtonPlaylistSave.LoadSkin();
|
||||
_ButtonPlaylistSing.LoadSkin();
|
||||
_ButtonPlaylistList.LoadSkin();
|
||||
|
||||
_StaticPlaylistFooter.LoadSkin();
|
||||
_StaticPlaylistHeader.LoadSkin();
|
||||
@@ -640,6 +648,8 @@ namespace VocaluxeLib.Menu
|
||||
_StartPlaylistSongs();
|
||||
else if (_ButtonPlaylistSave.Selected)
|
||||
CBase.Playlist.Save(ActivePlaylistID);
|
||||
else if (isButtonPlaylistListSelected())
|
||||
return false; // Currently CScreenSong do this event!
|
||||
else if (_ButtonPlaylistDelete.Selected)
|
||||
{
|
||||
CBase.Playlist.Delete(ActivePlaylistID);
|
||||
@@ -672,6 +682,11 @@ namespace VocaluxeLib.Menu
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool isButtonPlaylistListSelected()
|
||||
{
|
||||
return _ButtonPlaylistList.Selected;
|
||||
}
|
||||
|
||||
private void _SetSelectionToLastEntry()
|
||||
{
|
||||
if (_PlaylistElementContents.Count == 0)
|
||||
@@ -781,6 +796,8 @@ namespace VocaluxeLib.Menu
|
||||
//LB actions
|
||||
if (mouseEvent.LB)
|
||||
{
|
||||
if (isButtonPlaylistListSelected())
|
||||
return false; // Currently CScreenSong do this event!
|
||||
if (_CurrentPlaylistElement != -1)
|
||||
{
|
||||
CBase.Playlist.GetSong(ActivePlaylistID, _CurrentPlaylistElement + _Offset).GameMode =
|
||||
@@ -1171,6 +1188,15 @@ namespace VocaluxeLib.Menu
|
||||
_CompleteRect.W = _ButtonPlaylistDelete.Rect.W + _ButtonPlaylistDelete.Rect.X - _CompleteRect.X;
|
||||
if (_ButtonPlaylistDelete.Rect.Y + _ButtonPlaylistDelete.Rect.H > _CompleteRect.Y + _CompleteRect.H)
|
||||
_CompleteRect.H = _ButtonPlaylistDelete.Rect.H + _ButtonPlaylistDelete.Rect.Y - _CompleteRect.Y;
|
||||
//ButtonPlaylistList
|
||||
if (_ButtonPlaylistList.Rect.X < _CompleteRect.X)
|
||||
_CompleteRect.X = _ButtonPlaylistList.Rect.X;
|
||||
if (_ButtonPlaylistList.Rect.Y < _CompleteRect.Y)
|
||||
_CompleteRect.Y = _ButtonPlaylistList.Rect.Y;
|
||||
if (_ButtonPlaylistList.Rect.W + _ButtonPlaylistList.Rect.X > _CompleteRect.W + _CompleteRect.X)
|
||||
_CompleteRect.W = _ButtonPlaylistList.Rect.W + _ButtonPlaylistList.Rect.X - _CompleteRect.X;
|
||||
if (_ButtonPlaylistList.Rect.Y + _ButtonPlaylistList.Rect.H > _CompleteRect.Y + _CompleteRect.H)
|
||||
_CompleteRect.H = _ButtonPlaylistList.Rect.H + _ButtonPlaylistList.Rect.Y - _CompleteRect.Y;
|
||||
}
|
||||
|
||||
#region ThemeEdit
|
||||
|
||||
Reference in new issue
Block a user