r2mods/ilspy_dump/ror2_csproj/RoR2/ConditionalHideAttribute.cs

28 lines
707 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using System;
using UnityEngine;
namespace RoR2;
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]
public class ConditionalHideAttribute : PropertyAttribute
{
public enum DisablingType
{
ReadOnly = 2,
DontDraw
}
public string comparedPropertyName { get; private set; }
public object comparedValue { get; private set; }
public DisablingType disablingType { get; private set; }
public ConditionalHideAttribute(string comparedPropertyName, object comparedValue, DisablingType disablingType = DisablingType.DontDraw)
{
this.comparedPropertyName = comparedPropertyName;
this.comparedValue = comparedValue;
this.disablingType = disablingType;
}
}