using System;
using UnityEngine;
namespace UnityEditor.U2D.Path.GUIFramework
{
///
/// Represents the default implementation of a control.
///
public abstract class DefaultControl : Control
{
///
/// Default kPickDistance == 5.0f
///
public static readonly float kPickDistance = 5f;
///
/// Initializes and returns an instance of DefaultControl
///
/// The name of the default control.
public DefaultControl(string name) : base(name)
{
}
///
/// Overrides the Control.OnBeginLayout function.
///
///
/// Sets the LayoutData.distance to DefaultControl.kPickDistance.
///
/// The layout data.
/// The current state of the custom editor.
/// Returns the modified layout data.
protected override LayoutData OnBeginLayout(LayoutData data, IGUIState guiState)
{
data.distance = kPickDistance;
return data;
}
}
}