- Removed unnecessary null-conditional operator
- Removed unnecessary Float2 allocation
This commit is contained in:
@@ -293,7 +293,7 @@ namespace FlaxEditor.GUI.Dialogs
|
||||
if (Root != null)
|
||||
{
|
||||
bool shiftDown = Root.GetKey(KeyboardKeys.Shift);
|
||||
Root?.Navigate(shiftDown ? NavDirection.Previous : NavDirection.Next);
|
||||
Root.Navigate(shiftDown ? NavDirection.Previous : NavDirection.Next);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -634,7 +634,7 @@ namespace FlaxEngine.GUI
|
||||
case NavDirection.Left: return new Float2(0, size.Y * 0.5f);
|
||||
case NavDirection.Right: return new Float2(size.X, size.Y * 0.5f);
|
||||
case NavDirection.Next: return Float2.Zero;
|
||||
case NavDirection.Previous: return new Float2(Size.X, Size.Y);
|
||||
case NavDirection.Previous: return size;
|
||||
default: return size * 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user