public HistoryView() { InitializeComponent(); var imageStyles = new StateStyles { Normal = new Styles { StrokeWidth = 2, StrokeColor = Color.FromArgb(unchecked ((int)0xff69696C)) }, Disabled = new Styles { StrokeWidth = 2, StrokeColor = Color.FromArgb(unchecked ((int)0xffBCBCC0)) } }; GoBackButton.Image = VectorIcons.GoBackIcon; GoBackButton.ImageStyles = imageStyles; GoForwardButton.Image = VectorIcons.GoForwardIcon; GoForwardButton.ImageStyles = imageStyles; GoUpButton.Image = VectorIcons.ArrowUpIcon; GoUpButton.ImageStyles = new StateStyles { Normal = new Styles { StrokeColor = imageStyles.Normal.StrokeColor, StrokeWidth = 2, LineJoin = LineJoin.Bevel } }; }
protected UnityComponent(RectTransform existing, UnityUGUIContext context) { Context = context; GameObject = existing.gameObject; RectTransform = existing; StateStyles = new StateStyles(this); Style = new NodeStyle(DefaultStyle, StateStyles); Layout = new YogaNode(DefaultLayout); }
public EditorComponent(T element, EditorContext context, string tag) { Tag = tag; Context = context; Element = element; Element.userData = Data; StateStyles = new StateStyles(this); Style = new NodeStyle(StateStyles); Layout = new YogaNode(); }
EditorComponent(EditorContext context) { Context = context; StateStyles = new StateStyles(this); ComputedStyle = new NodeStyle(StateStyles); Layout = new YogaNode(); Style.changed += StyleChanged; Data.changed += StyleChanged; Deferreds.Add(Context.Dispatcher.OnEveryUpdate(() => { if (markedStyleResolve) { ResolveStyle(markedStyleResolveRecursive); } })); }
public UnityComponent(UnityUGUIContext context, string tag) { Tag = tag; Context = context; GameObject = new GameObject(); RectTransform = GameObject.AddComponent <RectTransform>(); RectTransform.anchorMin = Vector2.up; RectTransform.anchorMax = Vector2.up; RectTransform.pivot = Vector2.up; StateStyles = new StateStyles(this); Style = new NodeStyle(DefaultStyle, StateStyles); Layout = new YogaNode(DefaultLayout); Flex = GameObject.AddComponent <FlexElement>(); Flex.Layout = Layout; Flex.Style = Style; Flex.Component = this; }