using UnityEditor.EditorTools;
using UnityEngine;
namespace UnityEditor.Tilemaps
{
///
/// An `EditorTool` for handling Moves for a `GridSelection`.
///
public class GridSelectionMoveTool : GridSelectionTool
{
private static class Styles
{
public static GUIContent toolbarIcon = EditorGUIUtility.TrTextContentWithIcon("Move", "Shows a Gizmo in the Scene view for changing the offset for the Grid Selection", "MoveTool");
}
///
/// Toolbar icon for the `GridSelectionMoveTool`.
///
public override GUIContent toolbarIcon => Styles.toolbarIcon;
///
/// Handles the gizmo for managing Moves for the `GridSelectionMoveTool`.
///
/// Position of the `GridSelection` gizmo.
/// Rotation of the `GridSelection` gizmo.
/// Scale of the `GridSelection` gizmo.
public override void HandleTool(ref Vector3 position, ref Quaternion rotation, ref Vector3 scale)
{
position = Handles.PositionHandle(position, rotation);
}
}
}