changed name selection behavior
This commit is contained in:
1 parent
cae4e441e1
commit
71f24fb38a
5 files changed
+211
-105
No files matched your search
@@ -481,7 +481,7 @@ namespace Vocaluxe.Menu
|
||||
float z = _Base.Settings.GetZFar();
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if ((_Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i)))
|
||||
if ((_Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
{
|
||||
if (_IsMouseOver(x, y, _Interactions[i]))
|
||||
{
|
||||
@@ -577,7 +577,7 @@ namespace Vocaluxe.Menu
|
||||
if (start > _Interactions.Count - 1)
|
||||
start = 0;
|
||||
|
||||
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start)))
|
||||
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start) && _IsEnabled(start)))
|
||||
found = true;
|
||||
} while (!found);
|
||||
_Selection = start;
|
||||
@@ -604,7 +604,7 @@ namespace Vocaluxe.Menu
|
||||
if (start < 0)
|
||||
start = _Interactions.Count - 1;
|
||||
|
||||
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start)))
|
||||
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start) && _IsEnabled(start)))
|
||||
found = true;
|
||||
} while (!found);
|
||||
_Selection = start;
|
||||
@@ -705,7 +705,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
|
||||
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i))
|
||||
{
|
||||
SRectF targetRect = _GetRect(i);
|
||||
float dist = _GetDistanceDirect(Key, actualRect, targetRect);
|
||||
@@ -722,7 +722,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
|
||||
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i))
|
||||
{
|
||||
SRectF targetRect = _GetRect(i);
|
||||
float dist = _GetDistance180(Key, actualRect, targetRect);
|
||||
@@ -758,7 +758,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
|
||||
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i))
|
||||
{
|
||||
SRectF targetRect = _GetRect(i);
|
||||
float dist = _GetDistance180(Key, actualRect, targetRect);
|
||||
@@ -1014,6 +1014,26 @@ namespace Vocaluxe.Menu
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool _IsEnabled(int interaction)
|
||||
{
|
||||
switch (_Interactions[interaction].Type)
|
||||
{
|
||||
case EType.TButton:
|
||||
return _Buttons[_Interactions[interaction].Num].Enabled;
|
||||
|
||||
case EType.TSelectSlide:
|
||||
return _SelectSlides[_Interactions[interaction].Num].Visible;
|
||||
|
||||
case EType.TStatic:
|
||||
return false; //_Statics[_Interactions[interaction].Num].Visible;
|
||||
|
||||
case EType.TText:
|
||||
return false; //_Texts[_Interactions[interaction].Num].Visible;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private SRectF _GetRect(int interaction)
|
||||
{
|
||||
SRectF Result = new SRectF();
|
||||
|
||||
Reference in new issue
Block a user