Exemplo n.º 1
0
        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
                }
            };
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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);
                }
            }));
        }
Exemplo n.º 5
0
        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;
        }