Revert "Revert PartyNames-changes on develop-branch."

This reverts commit 43545ac47f.

Conflicts:
	VocaluxeLib/Menu/CNameSelection.cs
This commit is contained in:
Florian Küpper committed 2013-12-22 00:07:43 +01:00
1 parent 6009826e02
commit 77f2e17d47
24 files changed
+1351 -1112

No files matched your search

+24 -1
View File
@@ -104,6 +104,8 @@ namespace VocaluxeLib.Menu
public bool Visible = true;
public bool Highlighted;
public bool SelectionByHover;
private bool _ArrowLeftSelected;
private bool _ArrowRightSelected;
@@ -114,7 +116,7 @@ namespace VocaluxeLib.Menu
private readonly List<SRectF> _ValueBounds = new List<SRectF>();
public readonly bool WithTextures;
public bool WithTextures;
private int _Selection = -1;
public int Selection
@@ -654,6 +656,27 @@ namespace VocaluxeLib.Menu
{
_ArrowLeftSelected = CHelper.IsInBounds(RectArrowLeft, x, y) && _Selection > 0;
_ArrowRightSelected = CHelper.IsInBounds(RectArrowRight, x, y) && _Selection < _ValueNames.Count - 1;
if (SelectionByHover)
{
for (int i = 0; i < _ValueBounds.Count; i++)
{
if (CHelper.IsInBounds(_ValueBounds[i], x, y))
{
int offset = _Selection - _NumVisible / 2;
if (_ValueNames.Count - _NumVisible - offset < 0)
offset = _ValueNames.Count - _NumVisible;
if (offset < 0)
offset = 0;
Selection = i + offset;
_ValueBounds.Clear();
break;
}
}
}
}
public void ProcessMouseLBClick(int x, int y)