protected void FillCard(Rect cardRect)
 {
     if (tab == InfoCardTab.Stats)
     {
         if (thing != null)
         {
             Thing         innerThing    = thing;
             MinifiedThing minifiedThing = thing as MinifiedThing;
             if (minifiedThing != null)
             {
                 innerThing = minifiedThing.InnerThing;
             }
             StatsReportUtility.DrawStatsReport(cardRect, innerThing);
         }
         else if (titleDef != null)
         {
             StatsReportUtility.DrawStatsReport(cardRect, titleDef, faction);
         }
         else if (faction != null)
         {
             StatsReportUtility.DrawStatsReport(cardRect, faction);
         }
         else if (worldObject != null)
         {
             StatsReportUtility.DrawStatsReport(cardRect, worldObject);
         }
         else if (def is AbilityDef)
         {
             StatsReportUtility.DrawStatsReport(cardRect, (AbilityDef)def);
         }
         else
         {
             StatsReportUtility.DrawStatsReport(cardRect, def, stuff);
         }
     }
     else if (tab == InfoCardTab.Character)
     {
         CharacterCardUtility.DrawCharacterCard(cardRect, (Pawn)thing);
     }
     else if (tab == InfoCardTab.Health)
     {
         cardRect.yMin += 8f;
         HealthCardUtility.DrawPawnHealthCard(cardRect, (Pawn)thing, allowOperations: false, showBloodLoss: false, null);
     }
     else if (tab == InfoCardTab.Records)
     {
         RecordsCardUtility.DrawRecordsCard(cardRect, (Pawn)thing);
     }
     else if (tab == InfoCardTab.Permits)
     {
         PermitsCardUtility.DrawRecordsCard(cardRect, (Pawn)thing);
     }
     if (executeAfterFillCardOnce != null)
     {
         executeAfterFillCardOnce();
         executeAfterFillCardOnce = null;
     }
 }
        private void FillCard(Rect cardRect)
        {
            switch (this.tab)
            {
            case InfoCardTab.Stats:
                this.DrawStatsWorker(cardRect);
                break;

            case InfoCardTab.Health:
                cardRect.yMin += 8f;
                HealthCardUtility.DrawPawnHealthCard(cardRect, (Pawn)this.thing, false, false, null);
                break;

            case InfoCardTab.Records:
                RecordsCardUtility.DrawRecordsCard(cardRect, (Pawn)this.thing);
                break;
            }
        }
Exemple #3
0
 protected void FillCard(Rect cardRect)
 {
     if (this.tab == Dialog_InfoCard.InfoCardTab.Stats)
     {
         if (this.thing != null)
         {
             Thing         innerThing    = this.thing;
             MinifiedThing minifiedThing = this.thing as MinifiedThing;
             if (minifiedThing != null)
             {
                 innerThing = minifiedThing.InnerThing;
             }
             StatsReportUtility.DrawStatsReport(cardRect, innerThing);
         }
         else if (this.worldObject != null)
         {
             StatsReportUtility.DrawStatsReport(cardRect, this.worldObject);
         }
         else
         {
             StatsReportUtility.DrawStatsReport(cardRect, this.def, this.stuff);
         }
     }
     else if (this.tab == Dialog_InfoCard.InfoCardTab.Character)
     {
         CharacterCardUtility.DrawCharacterCard(cardRect, (Pawn)this.thing, null, default(Rect));
     }
     else if (this.tab == Dialog_InfoCard.InfoCardTab.Health)
     {
         cardRect.yMin += 8f;
         HealthCardUtility.DrawPawnHealthCard(cardRect, (Pawn)this.thing, false, false, null);
     }
     else if (this.tab == Dialog_InfoCard.InfoCardTab.Records)
     {
         RecordsCardUtility.DrawRecordsCard(cardRect, (Pawn)this.thing);
     }
 }
Exemple #4
0
 protected void FillCard(Rect cardRect)
 {
     if (tab == InfoCardTab.Stats)
     {
         if (thing != null)
         {
             Thing         innerThing    = thing;
             MinifiedThing minifiedThing = thing as MinifiedThing;
             if (minifiedThing != null)
             {
                 innerThing = minifiedThing.InnerThing;
             }
             StatsReportUtility.DrawStatsReport(cardRect, innerThing);
         }
         else if (worldObject != null)
         {
             StatsReportUtility.DrawStatsReport(cardRect, worldObject);
         }
         else
         {
             StatsReportUtility.DrawStatsReport(cardRect, def, stuff);
         }
     }
     else if (tab == InfoCardTab.Character)
     {
         CharacterCardUtility.DrawCharacterCard(cardRect, (Pawn)thing);
     }
     else if (tab == InfoCardTab.Health)
     {
         cardRect.yMin += 8f;
         HealthCardUtility.DrawPawnHealthCard(cardRect, (Pawn)thing, allowOperations: false, showBloodLoss: false, null);
     }
     else if (tab == InfoCardTab.Records)
     {
         RecordsCardUtility.DrawRecordsCard(cardRect, (Pawn)thing);
     }
 }