using System.Reflection;

namespace CM3D2.MultipleMaids.Plugin
{
    public class CustomGizmo : GizmoRender
    {
        private static FieldInfo is_drag_ = MultipleMaids.GetFieldInfo<GizmoRender>("is_drag_");
        public static bool IsDrag
        {
            get => (bool)is_drag_.GetValue(null);
            set => is_drag_.SetValue(null, value);
        }
        public new bool Visible
        {
            get => base.Visible;
            set
            {
                if (value == base.Visible) return;
                if (IsDrag) IsDrag = false;
                base.Visible = value;
            }
        }
    }
}
