protected override void ApplyStyle(SliderStyleData style) { StyleUtils.Apply(style, slider); StyleUtils.Apply(style.background, background); StyleUtils.Apply(style.fill, fill); StyleUtils.Apply(style.handle, handle); }
protected override void ApplyStyle(InputFieldStyleData style) { StyleUtils.Apply(style, inputField); StyleUtils.Apply(style.background, background); StyleUtils.Apply(style.text, text); StyleUtils.Apply(style.placeholder, placeholder); }
protected override void ApplyStyle(ToggleStyleData style) { StyleUtils.Apply(style, toggle); StyleUtils.Apply(style.background, background); StyleUtils.Apply(style.checkmarkBackground, checkmarkBackground); StyleUtils.Apply(style.checkmark, checkmark); StyleUtils.Apply(style.text, text); }
private static bool EnumerateStyle(ElementStyle asset, object overrides, ElementStyle[] inherits, Func <ElementStyle, object, bool> enumerator) { var visitedObjectsSet = StyleUtils.GetPooledHashSet(); try { bool EnumerateRecursive(ElementStyle innerAsset, object innerOverrides, ElementStyle[] innerInherits) { if (!visitedObjectsSet.Add(innerAsset)) { return(false); } if (innerOverrides != null && enumerator(innerAsset, innerOverrides)) { return(true); } if (innerInherits == null) { return(false); } for (var i = innerInherits.Length - 1; i >= 0; i--) { var style = innerInherits[i]; if (!style) { continue; } if (EnumerateRecursive(style, style.Overrides, style.Inherits)) { return(true); } } return(false); } return(EnumerateRecursive(asset, overrides, inherits)); } finally { StyleUtils.ReturnHashSet(visitedObjectsSet); } }
protected override void ApplyStyle(ScrollRectStyleData style) { StyleUtils.Apply(style, scrollView); StyleUtils.Apply(style.background, background); if (horizontalScrollbar) { horizontalScrollbar.ApplyStyleFromParent(style.scrollBar); } if (verticalScrollbar) { verticalScrollbar.ApplyStyleFromParent(style.scrollBar); } }
protected override void ApplyStyle(DropdownStyleData style) { StyleUtils.Apply(style, dropdown); StyleUtils.Apply(style.background, background); StyleUtils.Apply(style.arrow, arrow); StyleUtils.Apply(style.text, text); if (dropdownBackground) { dropdownBackground.ApplyStyleFromParent(style.dropdownBackground); } if (dropdownItem) { dropdownItem.ApplyStyleFromParent(style.dropdownItem); } }
protected override void ApplyStyle(ImageStyleData style) { StyleUtils.Apply(style, image); }
protected override void ApplyStyle(ScrollbarStyleData style) { StyleUtils.Apply(style, scrollbar); StyleUtils.Apply(style.background, background); StyleUtils.Apply(style.handle, handle); }
protected override void ApplyStyle(ButtonStyleData style) { StyleUtils.Apply(style, button); StyleUtils.Apply(style.background, background); StyleUtils.Apply(style.text, text); }
protected override void ApplyStyle(TextStyleData style) { StyleUtils.Apply(style, text); }