Fixed crash on names-screen.
This commit is contained in:
1 parent
34a299bde5
commit
148e92a416
1 file changed
+3
-4
@@ -360,7 +360,10 @@ namespace Vocaluxe.Menu
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_Offset * _Tiles.Count + _actualSelection < VisibleProfiles.Count)
|
||||||
Selection = VisibleProfiles[_Offset * _Tiles.Count + _actualSelection];
|
Selection = VisibleProfiles[_Offset * _Tiles.Count + _actualSelection];
|
||||||
|
else
|
||||||
|
Selection = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void KeyboardSelection(bool active, int player)
|
public void KeyboardSelection(bool active, int player)
|
||||||
@@ -408,9 +411,6 @@ namespace Vocaluxe.Menu
|
|||||||
if (offset < 0)
|
if (offset < 0)
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
if ( _Tiles.Count * (offset + 1) - VisibleProfiles.Count < _Tiles.Count)
|
|
||||||
{
|
|
||||||
|
|
||||||
for (int i = 0; i < _Tiles.Count; i++)
|
for (int i = 0; i < _Tiles.Count; i++)
|
||||||
{
|
{
|
||||||
if ((i + offset * _Tiles.Count) < VisibleProfiles.Count)
|
if ((i + offset * _Tiles.Count) < VisibleProfiles.Count)
|
||||||
@@ -430,7 +430,6 @@ namespace Vocaluxe.Menu
|
|||||||
}
|
}
|
||||||
_Offset = offset;
|
_Offset = offset;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public bool isOverTile(MouseEvent mevent)
|
public bool isOverTile(MouseEvent mevent)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user