Version 2.1.0.0

DrawerPriority struct

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public struct DrawerPriority : IEquatable<DrawerPriority>, IComparable<DrawerPriority>

DrawerPriority is used in conjunction with DrawerPriorityAttribute to specify the priority of any given drawer. It consists of 3 components: Super, Wrapper, Value, where Super is the most significant component, and Standard is the least significant component.

Constructors

DrawerPriority(DrawerPriorityLevel)
Initializes a new instance of the DrawerPriority struct.
public DrawerPriority(DrawerPriorityLevel priority)
Parameters
DrawerPriorityLevel priority

The priority.

DrawerPriority(Double, Double, Double)
Initializes a new instance of the DrawerPriority struct.
public DrawerPriority(double super = 0, double wrapper = 0, double value = 0)
Parameters
System.Double super

The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. These drawers typically don't draw the property itself, and calls CallNextDrawer.

System.Double wrapper

The wrapper priority. Mostly used by drawers used to decorate properties.

System.Double value

The value priority. Mostly used by OdinValueDrawer<T>s and OdinAttributeDrawer<TAttribute, TValue>s.

Fields

AttributePriority
The attribute priority. Mostly used by OdinAttributeDrawer<TAttribute, TValue>s.
public static readonly DrawerPriority AttributePriority
AutoPriority
Auto priority is defined by setting all of the components to zero. If no DrawerPriorityAttribute is defined on a drawer, it will default to AutoPriority.
public static readonly DrawerPriority AutoPriority
Super
The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. These drawers typically don't draw the property itself, and calls CallNextDrawer.
public double Super
SuperPriority
The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. These drawers typically don't draw the property itself, and calls CallNextDrawer.
public static readonly DrawerPriority SuperPriority
Value
The value priority. Mostly used by OdinValueDrawer<T>s and OdinAttributeDrawer<TAttribute, TValue>s.
public double Value
ValuePriority
The standard priority. Mostly used by OdinValueDrawer<T>s.
public static readonly DrawerPriority ValuePriority
Wrapper
The wrapper priority. Mostly used by drawers used to decorate properties.
public double Wrapper
WrapperPriority
The wrapper priority. Mostly used by drawers used to decorate properties.
public static readonly DrawerPriority WrapperPriority

Methods

CompareTo(DrawerPriority)
Compares to.
public int CompareTo(DrawerPriority other)
Parameters
DrawerPriority other

The other.

Returns
System.Int32

Equals(DrawerPriority)
Equals the specified other.
public bool Equals(DrawerPriority other)
Parameters
DrawerPriority other

The other.

Returns
System.Boolean

Equals(Object)
Determines whether the specified System.Object, is equal to this instance.
public override bool Equals(object obj)
Parameters
System.Object obj

The System.Object to compare with this instance.

Returns
System.Boolean

true if the specified System.Object is equal to this instance; otherwise, false.

GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

GetPriorityLevel()
Gets the priority level.
public DrawerPriorityLevel GetPriorityLevel()
ToString()
Returns a System.String that represents this instance.
public override string ToString()
Returns
System.String

A System.String that represents this instance.

ToString(String)
Returns a System.String that represents this instance.
public string ToString(string format)
Parameters
System.String format

The format.

Returns
System.String

A System.String that represents this instance.

Operators

Addition(DrawerPriority, DrawerPriority)
Implements the operator +.
public static DrawerPriority operator +(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
DrawerPriority

The result of the operator.

Equality(DrawerPriority, DrawerPriority)
Implements the operator ==.
public static bool operator ==(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
System.Boolean

The result of the operator.

GreaterThan(DrawerPriority, DrawerPriority)
Implements the operator >.
public static bool operator>(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
System.Boolean

The result of the operator.

GreaterThanOrEqual(DrawerPriority, DrawerPriority)
Implements the operator >=.
public static bool operator >=(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
System.Boolean

The result of the operator.

Inequality(DrawerPriority, DrawerPriority)
Implements the operator !=.
public static bool operator !=(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
System.Boolean

The result of the operator.

LessThan(DrawerPriority, DrawerPriority)
Implements the operator <.
public static bool operator <(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
System.Boolean

The result of the operator.

LessThanOrEqual(DrawerPriority, DrawerPriority)
Implements the operator <=.
public static bool operator <=(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
System.Boolean

The result of the operator.

Subtraction(DrawerPriority, DrawerPriority)
Implements the operator -.
public static DrawerPriority operator -(DrawerPriority lhs, DrawerPriority rhs)
Parameters
DrawerPriority lhs

The LHS.

DrawerPriority rhs

The RHS.

Returns
DrawerPriority

The result of the operator.