Exemplo n.º 1
0
        public override void Draw(Rect inRect)
        {
            // We draw the top with tabs
            Rect tabsArea = inRect.TopPartPixels(TAB_HEIGHT);

            TabDrawer.DrawTabs(tabsArea, tabs.Select((e) => e.tab));

            // We draw the selected tab
            Rect        childArea           = inRect.BottomPartPixels(inRect.height - TAB_HEIGHT);
            Displayable selectedDisplayable = tabs[selectedTab].displayable;

            selectedDisplayable.Draw(childArea);
        }
Exemplo n.º 2
0
        public override void Draw(Rect inRect)
        {
            if (!IsFluidHeight())
            {
                inRect = inRect.TopPartPixels(height);
            }
            if (!IsFluidWidth())
            {
                inRect = inRect.LeftPartPixels(width);
            }

            child.Draw(inRect);
        }
Exemplo n.º 3
0
        // Token: 0x0600007D RID: 125 RVA: 0x00004244 File Offset: 0x00002444
        public override void Draw(Rect inRect)
        {
            var rect  = inRect.LeftPartPixels(inRect.width - 16f);
            var width = rect.width;
            var num   = child.CalcHeight(rect.width);

            if (num == -1f)
            {
                num = rect.height;
            }

            var rect2 = new Rect(0f, 0f, width, num);

            Widgets.BeginScrollView(inRect, ref scrollPosition, rect2);
            onScroll(scrollPosition);
            child.Draw(rect2);
            Widgets.EndScrollView();
        }
Exemplo n.º 4
0
        public override void Draw(Rect inRect)
        {
            Rect viewRect = inRect.LeftPartPixels(inRect.width - SCROLL_BAR_SIZE);

            // We calculate the overflowed size the children will take
            // Only supports y-overflow at the moment
            float widthChild  = viewRect.width;
            float heightChild = child.CalcHeight(viewRect.width);

            if (heightChild == -1)
            {
                // If the child is height-fluid, we attribute the available space
                heightChild = viewRect.height;
            }
            Rect childRect = new Rect(0, 0, widthChild, heightChild);

            Widgets.BeginScrollView(inRect, ref scrollPosition, childRect);
            onScroll(scrollPosition);

            child.Draw(childRect);

            Widgets.EndScrollView();
        }