Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into komadoc-develop
This commit is contained in:
commit
e7c2606e8e
7 files changed
+125
-56
No files matched your search
@@ -300,11 +300,6 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
public void ProcessMouseMove(int x, int y)
|
||||
{
|
||||
Selected = CHelper.IsInBounds(Rect, x, y);
|
||||
}
|
||||
|
||||
public void UnloadSkin()
|
||||
{
|
||||
if (!ThemeLoaded)
|
||||
@@ -318,6 +313,7 @@ namespace VocaluxeLib.Menu
|
||||
return;
|
||||
Text = new CText(_Theme.Text, _PartyModeID);
|
||||
Text.LoadSkin();
|
||||
Text.Selected = Selected;
|
||||
|
||||
if (_Theme.SelText.HasValue)
|
||||
{
|
||||
|
||||
@@ -91,6 +91,15 @@ namespace VocaluxeLib.Menu
|
||||
private void _SetSelected(int newSelection)
|
||||
{
|
||||
IMenuElement el = _GetElement(_Selection);
|
||||
if (newSelection == _Selection)
|
||||
{
|
||||
// Don't change current selection
|
||||
if (el == null)
|
||||
_Selection = -1;
|
||||
else if (!el.Selected)
|
||||
el.Selected = true;
|
||||
return;
|
||||
}
|
||||
if (el != null)
|
||||
el.Selected = false;
|
||||
_Selection = newSelection;
|
||||
|
||||
@@ -169,15 +169,16 @@ namespace VocaluxeLib.Menu
|
||||
private readonly CStatic _StaticPlaylistHeader;
|
||||
private readonly CStatic _StaticPlaylistFooter;
|
||||
|
||||
private bool _Selected;
|
||||
public SRectF Rect
|
||||
{
|
||||
get { return MaxRect; }
|
||||
}
|
||||
public SRectF MaxRect { get; set; }
|
||||
private bool _Selectable = true;
|
||||
public bool Selectable
|
||||
{
|
||||
get { return Visible; }
|
||||
get { return Visible && _Selectable; }
|
||||
set { _Selectable = value; }
|
||||
}
|
||||
public bool Visible
|
||||
{
|
||||
@@ -185,6 +186,7 @@ namespace VocaluxeLib.Menu
|
||||
set { _Active = value; }
|
||||
}
|
||||
public bool Highlighted { get; set; }
|
||||
private bool _Selected;
|
||||
public bool Selected
|
||||
{
|
||||
get { return _Selected; }
|
||||
@@ -204,6 +206,8 @@ namespace VocaluxeLib.Menu
|
||||
_ChangeOrderElement = null;
|
||||
_EditMode = EEditMode.None;
|
||||
}
|
||||
else if (_CurrentPlaylistElement == -1 && _PlaylistElements.Count > 0)
|
||||
_SelectElement(_PlaylistElements[0].SelectSlide);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,7 +424,7 @@ namespace VocaluxeLib.Menu
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
{
|
||||
if (!Selected)
|
||||
return true;
|
||||
return false;
|
||||
//Active EditMode ignores other input!
|
||||
if (_EditMode == EEditMode.PlaylistName)
|
||||
{
|
||||
@@ -446,6 +450,8 @@ namespace VocaluxeLib.Menu
|
||||
if (!String.IsNullOrEmpty(_ButtonPlaylistName.Text.Text))
|
||||
_ButtonPlaylistName.Text.Text = _ButtonPlaylistName.Text.Text.Remove(_ButtonPlaylistName.Text.Text.Length - 1);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -453,10 +459,10 @@ namespace VocaluxeLib.Menu
|
||||
if (_CurrentPlaylistElement == -1 || _PlaylistElementContents.Count == 0)
|
||||
{
|
||||
//no song is selected
|
||||
base.HandleInput(keyEvent);
|
||||
bool handled = base.HandleInput(keyEvent);
|
||||
_CurrentPlaylistElement = _GetSelectedElementNr();
|
||||
|
||||
if (_CurrentPlaylistElement != -1)
|
||||
if (_CurrentPlaylistElement != -1 || handled)
|
||||
return true;
|
||||
}
|
||||
else if (_CurrentPlaylistElement != -1)
|
||||
@@ -669,6 +675,8 @@ namespace VocaluxeLib.Menu
|
||||
UpdatePlaylist();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -720,6 +728,8 @@ namespace VocaluxeLib.Menu
|
||||
case Keys.PageUp:
|
||||
_SetSelectionToFirstEntry();
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1039,7 +1049,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
en.Cover.LoadSkin();
|
||||
en.Cover.Y += Rect.Y + (i * _Theme.EntryHeight);
|
||||
en.Cover.X += Rect.X;
|
||||
en.Cover.X += Rect.X;
|
||||
|
||||
en.Text1 = new CText(_Text1);
|
||||
en.Text1.X += Rect.X;
|
||||
|
||||
Reference in new issue
Block a user