protected override void DrawPawnRow( Rect rect, Pawn p ) { // sizes for stuff float heightOffset = ( rect.height - iconSize ) / 2; float widthOffset = ( 50 - iconSize ) / 2; GUI.BeginGroup( rect ); var curX = 175f; if ( p.training.IsCompleted( TrainableDefOf.Obedience ) ) { var rect2 = new Rect( curX, 0f, 90f, rect.height ); Rect rect3 = rect2.ContractedBy( 2f ); string label = p.playerSettings.master == null ? "NoneLower".Translate() : p.playerSettings.master.LabelShort; Text.Font = GameFont.Small; if ( Widgets.ButtonText( rect3, label ) ) { TrainableUtility.OpenMasterSelectMenu( p ); } } curX += 90f; if ( Widgets_PetFollow.PetFollowAvailable ) { Rect draftedRect = new Rect( curX, 0f, 25f, 30f ); Rect hunterRect = new Rect( curX + 25f, 0f, 25f, 30f ); curX += 50f; if ( p.CanFollow() ) { Rect draftedIconRect = new Rect( 0f, 0f, iconSize, iconSize ).CenteredOnYIn( draftedRect ).CenteredOnXIn( draftedRect ); Rect hunterIconRect = new Rect( 0f, 0f, iconSize, iconSize ).CenteredOnYIn( hunterRect ).CenteredOnXIn( hunterRect ); // handle drafted follow bool followDrafted = p.FollowsDrafted(); string draftedTip = followDrafted ? "Fluffy.PetFollow.FollowingDrafted".Translate() : "Fluffy.PetFollow.NotFollowingDrafted".Translate(); TooltipHandler.TipRegion( draftedRect, draftedTip ); if ( followDrafted ) GUI.DrawTexture( draftedIconRect, WorkBoxCheckTex ); if ( Mouse.IsOver( draftedRect ) ) Widgets.DrawHighlight( draftedIconRect ); if ( Widgets.ButtonInvisible( draftedRect ) ) { p.FollowsDrafted( !followDrafted ); if ( followDrafted ) SoundDefOf.CheckboxTurnedOff.PlayOneShotOnCamera(); else SoundDefOf.CheckboxTurnedOn.PlayOneShotOnCamera(); } // handle hunter follow bool followHunter = p.FollowsHunter(); string hunterTip = followHunter ? "Fluffy.PetFollow.FollowingHunter".Translate() : "Fluffy.PetFollow.NotFollowingHunter".Translate(); TooltipHandler.TipRegion( hunterRect, hunterTip ); if ( followHunter ) GUI.DrawTexture( hunterIconRect, WorkBoxCheckTex ); if ( Mouse.IsOver( hunterRect ) ) Widgets.DrawHighlight( hunterIconRect ); if ( Widgets.ButtonInvisible( hunterRect ) ) { p.FollowsHunter( !followHunter ); if ( followHunter ) SoundDefOf.CheckboxTurnedOff.PlayOneShotOnCamera(); else SoundDefOf.CheckboxTurnedOn.PlayOneShotOnCamera(); } } } var recta = new Rect( curX + widthOffset, heightOffset, iconSize, iconSize ); Texture2D labelSex = GenderTextures[(int) p.gender]; TipSignal tipSex = p.gender.ToString(); GUI.DrawTexture( recta, labelSex ); TooltipHandler.TipRegion( recta, tipSex ); curX += 50f; var rectb = new Rect( curX + widthOffset, heightOffset, iconSize, iconSize ); Texture2D labelAge = p.RaceProps.lifeStageAges.Count > 3 ? LifeStageTextures[3] : LifeStageTextures[p.ageTracker.CurLifeStageIndex]; TipSignal tipAge = p.ageTracker.CurLifeStage.LabelCap + ", " + p.ageTracker.AgeBiologicalYears; GUI.DrawTexture( rectb, labelAge ); TooltipHandler.TipRegion( rectb, tipAge ); curX += 50f; var pregnantRect = new Rect( curX + widthOffset, heightOffset, iconSize, iconSize ); if ( p.Pregnant() ) { GUI.DrawTexture( pregnantRect, PregnantTex ); TooltipHandler.TipRegion( pregnantRect, "Fluffy.Pregnant".Translate( p.NameStringShort )); } curX += 50f; var rectc = new Rect( curX, 0f, 50f, 30f ); var rectc1 = new Rect( curX + 17f, heightOffset, iconSize, iconSize ); bool slaughter = Find.DesignationManager.DesignationOn( p, DesignationDefOf.Slaughter ) != null; if ( slaughter ) { GUI.DrawTexture( rectc1, WorkBoxCheckTex ); TooltipHandler.TipRegion( rectc, "Fluffy.StopSlaughter".Translate() ); } else { TooltipHandler.TipRegion( rectc, "Fluffy.MarkSlaughter".Translate() ); } if ( Widgets.ButtonInvisible( rectc ) ) { if ( slaughter ) { Widgets_Animals.UnSlaughterAnimal( p ); SoundDefOf.CheckboxTurnedOff.PlayOneShotOnCamera(); } else { Widgets_Animals.SlaughterAnimal( p ); SoundDefOf.CheckboxTurnedOn.PlayOneShotOnCamera(); } } if ( Mouse.IsOver( rectc ) ) { GUI.DrawTexture( rectc1, TexUI.HighlightTex ); } curX += 50f; var trainingRect = new Rect( curX, 0f, 80f, 30f ); Widgets_Animals.DoTrainingRow( trainingRect, p ); curX += 90f; var rect4 = new Rect( curX, 0f, 350f, rect.height ); AreaAllowedGUI.DoAllowedAreaSelectors( rect4, p, AllowedAreaMode.Animal ); GUI.EndGroup(); }