Пример #1
0
 public static void DrawPsycheCard(Rect rect, Pawn pawn)
 {
     if (PsycheHelper.PsychologyEnabled(pawn))
     {
         GUI.BeginGroup(rect);
         Text.Font = GameFont.Small;
         Rect rect2 = new Rect(20f, 20f, rect.width - 20f, rect.height - 20f);
         Rect rect3 = rect2.ContractedBy(10f);
         Rect rect4 = rect3;
         Rect rect5 = rect3;
         rect4.width *= 0.6f;
         rect5.x      = rect4.xMax + 17f;
         rect5.xMax   = rect3.xMax;
         GUI.color    = new Color(1f, 1f, 1f, 0.5f);
         Widgets.DrawLineVertical(rect4.xMax, 0f, rect.height);
         GUI.color = Color.white;
         if (Prefs.DevMode)
         {
             Rect rect6 = new Rect(0f, 5f, rect3.width, 22f);
             PsycheCardUtility.DrawDebugOptions(rect6, pawn);
         }
         PsycheCardUtility.DrawPersonalityNodes(rect4, pawn);
         PsycheCardUtility.DrawSexuality(rect5, pawn, true);
         GUI.EndGroup();
     }
 }
Пример #2
0
 public static void DrawPsycheMenuCard(Rect rect, Pawn pawn)
 {
     if (PsycheHelper.PsychologyEnabled(pawn))
     {
         GUI.BeginGroup(rect);
         Text.Font = GameFont.Small;
         Rect rect2 = new Rect(10f, 10f, rect.width - 10f, rect.height - 10f);
         Rect rect4 = rect2;
         Rect rect5 = rect2;
         rect4.width *= 0.6f;
         rect4.xMin  -= 20f;
         rect5.x      = rect4.xMax + 17f;
         rect5.xMax   = rect.xMax;
         GUI.color    = new Color(1f, 1f, 1f, 0.5f);
         Widgets.DrawLineVertical(rect4.xMax, 0f, rect.height);
         GUI.color = Color.white;
         PsycheCardUtility.DrawPersonalityNodes(rect4, pawn);
         PsycheCardUtility.DrawSexuality(rect5, pawn, false);
         GUI.EndGroup();
     }
 }