private void DrawPortraitArea(Rect rect)
        {
            Widgets.DrawMenuSection(rect);
            rect = rect.ContractedBy(17f);
            GUI.DrawTexture(new Rect(rect.center.x - PawnPortraitSize.x / 2f, rect.yMin - 24f, PawnPortraitSize.x, PawnPortraitSize.y), PortraitsCache.Get(curPawn, PawnPortraitSize));
            Rect rect2 = rect;

            rect2.width = 500f;
            CharacterCardUtility.DrawCharacterCard(rect2, curPawn, RandomizeCurPawn, rect);
            Rect rect3 = rect;

            rect3.yMin  += 100f;
            rect3.xMin   = rect2.xMax + 5f;
            rect3.height = 200f;
            Text.Font    = GameFont.Medium;
            Widgets.Label(rect3, "Health".Translate());
            Text.Font   = GameFont.Small;
            rect3.yMin += 35f;
            HealthCardUtility.DrawHediffListing(rect3, curPawn, showBloodLoss: true);
            Rect rect4 = new Rect(rect3.x, rect3.yMax, rect3.width, 200f);

            Text.Font = GameFont.Medium;
            Widgets.Label(rect4, "Relations".Translate());
            Text.Font   = GameFont.Small;
            rect4.yMin += 35f;
            SocialCardUtility.DrawRelationsAndOpinions(rect4, curPawn);
        }
        private void DrawPortraitArea(Rect rect)
        {
            Widgets.DrawMenuSection(rect);
            rect = rect.ContractedBy(17f);
            GUI.DrawTexture(new Rect(rect.center.x - Page_ConfigureStartingPawns.PawnPortraitSize.x / 2f, rect.yMin - 20f, Page_ConfigureStartingPawns.PawnPortraitSize.x, Page_ConfigureStartingPawns.PawnPortraitSize.y), PortraitsCache.Get(this.curPawn, Page_ConfigureStartingPawns.PawnPortraitSize, default(Vector3), 1f));
            Rect rect2 = rect;

            rect2.width = 500f;
            CharacterCardUtility.DrawCharacterCard(rect2, this.curPawn, new Action(this.RandomizeCurPawn), rect);
            Rect rect3 = rect;

            rect3.yMin  += 100f;
            rect3.xMin   = rect2.xMax + 5f;
            rect3.height = 200f;
            Text.Font    = GameFont.Medium;
            Widgets.Label(rect3, "Health".Translate());
            Text.Font   = GameFont.Small;
            rect3.yMin += 35f;
            HealthCardUtility.DrawHediffListing(rect3, this.curPawn, true);
            Rect rect4 = new Rect(rect3.x, rect3.yMax, rect3.width, 200f);

            Text.Font = GameFont.Medium;
            Widgets.Label(rect4, "Relations".Translate());
            Text.Font   = GameFont.Small;
            rect4.yMin += 35f;
            SocialCardUtility.DrawRelationsAndOpinions(rect4, this.curPawn);
        }
示例#3
0
        public static void DrawPawnHealthCard(Rect outRect, Pawn pawn, bool allowOperations, bool showBloodLoss, Thing thingForMedBills)
        {
            if (pawn.Dead && allowOperations)
            {
                Log.Error("Called DrawPawnHealthCard with a dead pawn and allowOperations=true. Operations are disallowed on corpses.");
                allowOperations = false;
            }
            outRect = outRect.Rounded();
            Rect rect  = new Rect(outRect.x, outRect.y, (float)(outRect.width * 0.375), outRect.height).Rounded();
            Rect rect2 = new Rect(rect.xMax, outRect.y, outRect.width - rect.width, outRect.height);

            rect.yMin += 11f;
            HealthCardUtility.DrawHealthSummary(rect, pawn, allowOperations, thingForMedBills);
            HealthCardUtility.DrawHediffListing(rect2.ContractedBy(10f), pawn, showBloodLoss);
        }
示例#4
0
        private void DrawPortraitArea(Rect rect)
        {
            Widgets.DrawMenuSection(rect);
            rect = rect.ContractedBy(17f);
            Vector2 center            = rect.center;
            float   x                 = center.x;
            Vector2 pawnPortraitSize  = Page_ConfigureStartingPawns.PawnPortraitSize;
            double  x2                = x - pawnPortraitSize.x / 2.0;
            double  y                 = rect.yMin - 20.0;
            Vector2 pawnPortraitSize2 = Page_ConfigureStartingPawns.PawnPortraitSize;
            float   x3                = pawnPortraitSize2.x;
            Vector2 pawnPortraitSize3 = Page_ConfigureStartingPawns.PawnPortraitSize;

            GUI.DrawTexture(new Rect((float)x2, (float)y, x3, pawnPortraitSize3.y), PortraitsCache.Get(this.curPawn, Page_ConfigureStartingPawns.PawnPortraitSize, default(Vector3), 1f));
            Rect rect2 = rect;

            rect2.width = 500f;
            CharacterCardUtility.DrawCharacterCard(rect2, this.curPawn, this.RandomizeCurPawn, rect);
            Rect rect3 = rect;

            rect3.yMin  += 100f;
            rect3.xMin   = (float)(rect2.xMax + 5.0);
            rect3.height = 200f;
            Text.Font    = GameFont.Medium;
            Widgets.Label(rect3, "Health".Translate());
            Text.Font   = GameFont.Small;
            rect3.yMin += 35f;
            HealthCardUtility.DrawHediffListing(rect3, this.curPawn, true);
            Rect rect4 = new Rect(rect3.x, rect3.yMax, rect3.width, 200f);

            Text.Font = GameFont.Medium;
            Widgets.Label(rect4, "Relations".Translate());
            Text.Font   = GameFont.Small;
            rect4.yMin += 35f;
            SocialCardUtility.DrawRelationsAndOpinions(rect4, this.curPawn);
        }