Пример #1
0
        public bool IsVisible(Rect area, Rect region, Vector2 scroll)
        {
            bool fixedX  = area.AddX(-scroll.x).Overlaps(region);
            bool fixedY  = area.AddY(-scroll.y).Overlaps(region);
            bool fixedXY = area.AddXY(-scroll).Overlaps(region);
            bool normal  = area.Overlaps(region);

            return(normal || fixedX || fixedY || fixedXY);
        }
Пример #2
0
        public override void Draw()
        {
            var window = StateWindow.Get();
            var title  = new GUIContent((string)this.target.As <StateTable>().gameObject.name);
            var style  = Style.Get("title");

            if (window.target.advanced)
            {
                title.text += window.tableIndex == 1 ? " <b>End</b>" : " <b>Start</b>";
            }
            style.fixedWidth = Screen.width - 24;
            Rect next = GUILayoutUtility.GetRect(title, style);

            title.ToLabel().DrawLabel(next.AddXY(window.scroll), style);
            this.CheckClicked();
        }