using System; using Robust.Client.Interfaces.Graphics; namespace Robust.Client.UserInterface { public partial class Control { private CursorShape _cursorShape; private ICursor? _customCursor; /// /// Default common cursor shapes available in the UI. /// public enum CursorShape { Arrow, IBeam, Crosshair, Hand, HResize, VResize, /// /// Special cursor shape indicating that is set and being used. /// Custom, } /// /// The shape the cursor will get when being over this control. /// public CursorShape DefaultCursorShape { get => _cursorShape; set { if (value == CursorShape.Custom) { throw new ArgumentException( "Cannot set to CursorShape.Custom directly. Set CustomCursorShape instead."); } _cursorShape = value; _customCursor = null; UserInterfaceManagerInternal.CursorChanged(this); } } /// /// Custom cursor shape to use. /// public ICursor? CustomCursorShape { get => _customCursor; set { _customCursor = value; _cursorShape = value == null ? CursorShape.Arrow : CursorShape.Custom; UserInterfaceManagerInternal.CursorChanged(this); } } } }