public override void DoWindowContents(Rect inRect)
        {
            Rect rect = new Rect(0f, 0f, inRect.width, 40f);

            Text.Font   = GameFont.Medium;
            Text.Anchor = TextAnchor.MiddleCenter;
            Widgets.Label(rect, "SplitCaravan".Translate());
            Text.Font   = GameFont.Small;
            Text.Anchor = TextAnchor.UpperLeft;
            Dialog_SplitCaravan.tabsList.Clear();
            Dialog_SplitCaravan.tabsList.Add(new TabRecord("PawnsTab".Translate(), delegate
            {
                this.tab = Dialog_SplitCaravan.Tab.Pawns;
            }, this.tab == Dialog_SplitCaravan.Tab.Pawns));
            Dialog_SplitCaravan.tabsList.Add(new TabRecord("ItemsTab".Translate(), delegate
            {
                this.tab = Dialog_SplitCaravan.Tab.Items;
            }, this.tab == Dialog_SplitCaravan.Tab.Items));
            inRect.yMin += 72f;
            Widgets.DrawMenuSection(inRect, true);
            TabDrawer.DrawTabs(inRect, Dialog_SplitCaravan.tabsList);
            inRect = inRect.ContractedBy(17f);
            GUI.BeginGroup(inRect);
            Rect rect2 = inRect.AtZero();
            Rect rect3 = rect2;

            rect3.y    += 32f;
            rect3.xMin += rect2.width - 515f;
            this.DrawMassAndFoodInfo(rect3);
            this.DoBottomButtons(rect2);
            Rect inRect2 = rect2;

            inRect2.yMax -= 59f;
            bool flag = false;

            Dialog_SplitCaravan.Tab tab = this.tab;
            if (tab != Dialog_SplitCaravan.Tab.Pawns)
            {
                if (tab == Dialog_SplitCaravan.Tab.Items)
                {
                    this.itemsTransfer.OnGUI(inRect2, out flag);
                }
            }
            else
            {
                this.pawnsTransfer.OnGUI(inRect2, out flag);
            }
            if (flag)
            {
                this.CountToTransferChanged();
            }
            GUI.EndGroup();
        }
Esempio n. 2
0
        public override void DoWindowContents(Rect inRect)
        {
            Rect rect = new Rect(0f, 0f, inRect.width, 35f);

            Text.Font   = GameFont.Medium;
            Text.Anchor = TextAnchor.MiddleCenter;
            Widgets.Label(rect, "SplitCaravan".Translate());
            Text.Font   = GameFont.Small;
            Text.Anchor = TextAnchor.UpperLeft;
            CaravanUIUtility.DrawCaravanInfo(new CaravanUIUtility.CaravanInfo(this.SourceMassUsage, this.SourceMassCapacity, this.cachedSourceMassCapacityExplanation, this.SourceTilesPerDay, this.cachedSourceTilesPerDayExplanation, this.SourceDaysWorthOfFood, this.SourceForagedFoodPerDay, this.cachedSourceForagedFoodPerDayExplanation, this.SourceVisibility, this.cachedSourceVisibilityExplanation, -1f, -1f, null), new CaravanUIUtility.CaravanInfo?(new CaravanUIUtility.CaravanInfo(this.DestMassUsage, this.DestMassCapacity, this.cachedDestMassCapacityExplanation, this.DestTilesPerDay, this.cachedDestTilesPerDayExplanation, this.DestDaysWorthOfFood, this.DestForagedFoodPerDay, this.cachedDestForagedFoodPerDayExplanation, this.DestVisibility, this.cachedDestVisibilityExplanation, -1f, -1f, null)), this.caravan.Tile, (!this.caravan.pather.Moving) ? null : new int?(this.TicksToArrive), -9999f, new Rect(12f, 35f, inRect.width - 24f, 40f), true, null, false);
            Dialog_SplitCaravan.tabsList.Clear();
            Dialog_SplitCaravan.tabsList.Add(new TabRecord("PawnsTab".Translate(), delegate
            {
                this.tab = Dialog_SplitCaravan.Tab.Pawns;
            }, this.tab == Dialog_SplitCaravan.Tab.Pawns));
            Dialog_SplitCaravan.tabsList.Add(new TabRecord("ItemsTab".Translate(), delegate
            {
                this.tab = Dialog_SplitCaravan.Tab.Items;
            }, this.tab == Dialog_SplitCaravan.Tab.Items));
            inRect.yMin += 119f;
            Widgets.DrawMenuSection(inRect);
            TabDrawer.DrawTabs(inRect, Dialog_SplitCaravan.tabsList, 200f);
            inRect = inRect.ContractedBy(17f);
            GUI.BeginGroup(inRect);
            Rect rect2 = inRect.AtZero();

            this.DoBottomButtons(rect2);
            Rect inRect2 = rect2;

            inRect2.yMax -= 59f;
            bool flag = false;

            Dialog_SplitCaravan.Tab tab = this.tab;
            if (tab != Dialog_SplitCaravan.Tab.Pawns)
            {
                if (tab == Dialog_SplitCaravan.Tab.Items)
                {
                    this.itemsTransfer.OnGUI(inRect2, out flag);
                }
            }
            else
            {
                this.pawnsTransfer.OnGUI(inRect2, out flag);
            }
            if (flag)
            {
                this.CountToTransferChanged();
            }
            GUI.EndGroup();
        }
Esempio n. 3
0
 private void <DoWindowContents> m__1()
 {
     this.tab = Dialog_SplitCaravan.Tab.Items;
 }
Esempio n. 4
0
 private void <DoWindowContents> m__0()
 {
     this.tab = Dialog_SplitCaravan.Tab.Pawns;
 }