         SetEditable(SetValue(parent.children[1], value.GetBool(), sameValue), editable && sameValue);
     else if (type == VAR_INT)
     {
-        if (info.name.Contains("Mask", false))
+        if (bitSelectionAttrs.Find(info.name) > -1)
             SetEditable(SetValue(parent.GetChild("LineEdit", true), value.ToString(), sameValue), editable && sameValue);
         else if (info.enumNames is null || info.enumNames.empty)
             SetEditable(SetValue(parent.children[1], value.ToString(), sameValue), editable && sameValue);

{
    UIElement@ parent = CreateAttributeEditorParent(list, info.name, index, subIndex);

    // Check for masks
    if (info.name.Contains("Mask", false))
    {
        UIElement@ attrEdit = CreateAttributeBitSelector(parent, serializables, index, subIndex);
    }
    // Check for enums
    else if (info.enumNames is null || info.enumNames.empty)

void SetBitSelection(UIElement@ parent, int value)
{
    int mask = value;
    bool enabled = true;

    if (mask ==  -1)
        mask = MAX_BITMASK_VALUE;
    else if (mask > MAX_BITMASK_VALUE)
        enabled = false;

    for (int i = 0; i < MAX_BITMASK_BITS; i++)
    {
        CheckBox@ bitBox = parent.GetChild("BitSelect_" + String(i), true);
        bitBox.enabled = enabled;
        if (!enabled)
            bitBox.color = nonEditableBitSelectorColor;
        else
            bitBox.color = editableBitSelectorColor;

        if ((1 << i) & mask != 0)
            bitBox.checked = true;
