Move options out of VisjectSurface.Input to a different place.
This commit is contained in:
@@ -18,18 +18,11 @@ namespace FlaxEditor.Surface
|
||||
/// </summary>
|
||||
public readonly InputActionsContainer InputActions;
|
||||
|
||||
/// <summary>
|
||||
/// Should grid snapping be enabled for these nodes?
|
||||
/// </summary>
|
||||
public bool GridSnappingEnabled = false;
|
||||
|
||||
private string _currentInputText = string.Empty;
|
||||
private Float2 _movingNodesDelta;
|
||||
private Float2 _gridRoundingDelta;
|
||||
private HashSet<SurfaceNode> _movingNodes;
|
||||
private readonly Stack<InputBracket> _inputBrackets = new Stack<InputBracket>();
|
||||
private readonly float _gridSize = 15f;
|
||||
|
||||
|
||||
private class InputBracket
|
||||
{
|
||||
@@ -254,10 +247,6 @@ namespace FlaxEditor.Surface
|
||||
if ((!GridSnappingEnabled || Math.Abs(delta.X) >= _gridSize || (Math.Abs(delta.Y) >= _gridSize))
|
||||
&& deltaLengthSquared > 0.01f)
|
||||
{
|
||||
// Move selected nodes
|
||||
Debug.Log("test " + delta.ToString() + ", " + _gridSize.ToString() + ", " + _targetScale.ToString());
|
||||
|
||||
// The change that occurred by rounding. Used to retain specific delta values if it doesn't snap on one axis but does on another.
|
||||
if (GridSnappingEnabled)
|
||||
{
|
||||
Float2 unroundedDelta = delta;
|
||||
|
||||
@@ -30,6 +30,12 @@ namespace FlaxEditor.Surface
|
||||
/// </summary>
|
||||
protected SurfaceRootControl _rootControl;
|
||||
|
||||
/// <summary>
|
||||
/// Is grid snapping enabled for this surface?
|
||||
/// </summary>
|
||||
public bool GridSnappingEnabled = false;
|
||||
|
||||
private readonly float _gridSize = 15f;
|
||||
private float _targetScale = 1.0f;
|
||||
private float _moveViewWithMouseDragSpeed = 1.0f;
|
||||
private bool _canEdit = true;
|
||||
|
||||
Reference in New Issue
Block a user