Infohazard.Core 1.4.1
Infohazard Core Utility Library
Loading...
Searching...
No Matches
Infohazard.Core.ConditionalDrawAttribute Class Reference

Attribute draws a property when a given condition is true. More...

Public Member Functions

 ConditionalDrawAttribute (string boolCondition)
 ConditionalAttribute that requires a serialized boolean field to be true. More...
 
 ConditionalDrawAttribute (string condition, object value, bool isEqual=true)
 ConditionalAttribute that requires a serialized field named condition to be equal or not equal to value. More...
 

Properties

string Condition [get]
 The serialized field to check. More...
 
object Value [get]
 The value to compare the Condition field to. More...
 
bool IsEqual [get]
 Whether the value of the condition field should be equal to the given value in order to draw. More...
 

Detailed Description

Attribute draws a property when a given condition is true.

Constructor & Destructor Documentation

◆ ConditionalDrawAttribute() [1/2]

Infohazard.Core.ConditionalDrawAttribute.ConditionalDrawAttribute ( string  boolCondition)

ConditionalAttribute that requires a serialized boolean field to be true.

Parameters
boolConditionThe name of a boolean field.

◆ ConditionalDrawAttribute() [2/2]

Infohazard.Core.ConditionalDrawAttribute.ConditionalDrawAttribute ( string  condition,
object  value,
bool  isEqual = true 
)

ConditionalAttribute that requires a serialized field named condition to be equal or not equal to value.

Parameters
conditionThe name of a field.
valueThe value to compare to.
isEqualWhether to check for equality or inequality.

Property Documentation

◆ Condition

string Infohazard.Core.ConditionalDrawAttribute.Condition
get

The serialized field to check.

◆ IsEqual

bool Infohazard.Core.ConditionalDrawAttribute.IsEqual
get

Whether the value of the condition field should be equal to the given value in order to draw.

◆ Value

object Infohazard.Core.ConditionalDrawAttribute.Value
get

The value to compare the Condition field to.


The documentation for this class was generated from the following file: