DrawBitMaskField() публичный статический Метод

Bitmap Mask Field for editor.
public static DrawBitMaskField ( Rect aPosition, int aMask, System aType, GUIContent aLabel ) : int
aPosition Rect
aMask int
aType System
aLabel GUIContent
Результат int
    public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
    {
        BitMaskAttribute typeAttr = attribute as BitMaskAttribute;

        label.text    = label.text;
        prop.intValue = EditorExtension.DrawBitMaskField(position, prop.intValue, typeAttr.propType, label);
    }
Пример #2
0
    public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
    {
        var typeAttr = attribute as BitMaskAttribute;

        // Add the actual int value behind the field name
        label.text    = label.text + "(" + prop.intValue + ")";
        prop.intValue = EditorExtension.DrawBitMaskField(position, prop.intValue, typeAttr.propType, label);
    }
Пример #3
0
    public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
    {
        var typeAttr = attribute as EliasBitMaskAttribute;

        // Add the actual int value behind the field name
        label.text = label.text + "(" + prop.intValue + ")";
        EditorGUI.BeginChangeCheck();
        int newValue = EditorExtension.DrawBitMaskField(position, prop.intValue, typeAttr.propType, label);

        if (EditorGUI.EndChangeCheck())
        {
            prop.intValue = newValue;
        }
    }
Пример #4
0
    public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
    {
        var typeAttr = attribute as BitMaskAttribute;

        // Add the actual int value behind the field name
        label.text = label.text + " (" + prop.intValue + ")";
        if (prop.hasMultipleDifferentValues == true)
        {
            GUILayout.Label("-");
        }
        else
        {
            prop.intValue = EditorExtension.DrawBitMaskField(position, prop.intValue, typeAttr.propType, label);
        }
    }
Пример #5
0
 public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
 {
     label.text    = label.text;
     prop.intValue = EditorExtension.DrawBitMaskField(position, prop.intValue, fieldInfo.FieldType, label);
 }