void SetStyle() { var inherited = m_Container.IsComponentInherited <T>(); var overridden = m_Container.IsComponentOverridden <T>(); var optional = m_IsOptional; if (inherited || optional) { AddToClassList(ClassNames.Inherited); } else { RemoveFromClassList(ClassNames.Inherited); } if (overridden) { AddToClassList(ClassNames.Overridden); } else { RemoveFromClassList(ClassNames.Overridden); } m_AddButton.style.display = optional ? DisplayStyle.Flex : DisplayStyle.None; m_RemoveButton.style.display = (overridden || (!inherited && !optional)) ? DisplayStyle.Flex : DisplayStyle.None; }
void SetBorderColor() { if (m_Container.IsComponentInherited <T>()) { AddToClassList(ClassNames.Inherited); m_RemoveButton.style.display = DisplayStyle.None; } else { RemoveFromClassList(ClassNames.Inherited); } if (m_Container.IsComponentOverridden <T>()) { AddToClassList(ClassNames.Overridden); m_RemoveButton.style.display = DisplayStyle.Flex; } else { RemoveFromClassList(ClassNames.Overridden); } }