Ejemplo n.º 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();
     }
 }
Ejemplo n.º 2
0
        public override void DoWindowContents(Rect inRect)
        {
            bool flag = false;

            if (Event.current.type == EventType.KeyDown && (Event.current.keyCode == KeyCode.Return || Event.current.keyCode == KeyCode.Escape))
            {
                flag = true;
                Event.current.Use();
            }
            Rect windowRect = inRect.ContractedBy(17f);
            Rect mainRect   = new Rect(windowRect.x, windowRect.y, windowRect.width, windowRect.height - 20f);
            Rect okRect     = new Rect(inRect.width / 3, mainRect.yMax + 10f, inRect.width / 3f, 30f);

            PsycheCardUtility.DrawPsycheMenuCard(mainRect, pawn);
            if (Widgets.ButtonText(okRect, "CloseButton".Translate(), true, false, true) || flag)
            {
                this.Close(true);
            }
        }
Ejemplo n.º 3
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();
     }
 }
Ejemplo n.º 4
0
 protected override void FillTab()
 {
     PsycheCardUtility.DrawPsycheCard(new Rect(0f, 0f, this.size.x, this.size.y), this.PawnToShowInfoAbout);
 }