public static void DrawDeity(CosmicEntity entity, Rect rect3, string spellDescription = null, float offset = 0f)
        {
            string entityLabel   = "";
            string entityDescrip = "";

            if (entity != null)
            {
                entityLabel   = entity.LabelCap;
                entityDescrip = entity.def.description;
            }

            Rect secondBox = rect3;

            secondBox.x     += rect3.x + 10f + 30f + offset;
            secondBox.xMax  += 125f;
            secondBox.height = ITab_AltarSacrificesCardUtility.ButtonSize;
            Text.Font        = GameFont.Medium;
            Widgets.Label(secondBox, entityLabel);
            Text.Font = GameFont.Small;
            Rect secondBoxUnder = secondBox;

            secondBoxUnder.y     += ITab_AltarSacrificesCardUtility.ButtonSize + ITab_AltarSacrificesCardUtility.SpacingOffset;
            secondBoxUnder.width -= 15f;
            secondBoxUnder.height = ITab_AltarSacrificesCardUtility.ButtonSize;
            Widgets.Label(secondBoxUnder, entityDescrip);
            ITab_AltarCardUtility.DrawTier(entity, new Vector2(secondBoxUnder.x, secondBoxUnder.y + 70f));
            Rect secondBoxUnder2 = secondBoxUnder;

            secondBoxUnder2.y     += ITab_AltarSacrificesCardUtility.ButtonSize * 2 + (ITab_AltarSacrificesCardUtility.SpacingOffset * 2);
            secondBoxUnder2.height = 250f;
            if (spellDescription != null)
            {
                Widgets.Label(secondBoxUnder2, spellDescription);
            }
        }
Beispiel #2
0
        public static void DrawTempleCard(Rect rect, Building_SacrificialAltar altar)
        {
            GUI.BeginGroup(rect);
            var rect3 = new Rect(2f, 0f, ITab_AltarSacrificesCardUtility.ColumnSize,
                                 ITab_AltarSacrificesCardUtility.ButtonSize);

            Widgets.Label(rect3, "Deity".Translate() + ": ");
            rect3.xMin = rect3.center.x - 15f;
            var label2 = ITab_AltarCardUtility.DeityLabel(altar, ITab_AltarCardUtility.DeityType.SacrificeDeity);

            if (Widgets.ButtonText(rect3, label2, true, false))
            {
                ITab_AltarCardUtility.OpenDeitySelectMenu(altar, ITab_AltarCardUtility.DeityType.SacrificeDeity);
            }

            TooltipHandler.TipRegion(rect3, "DeityDesc".Translate());

            ITab_AltarCardUtility.DrawDeity(altar.tempCurrentSacrificeDeity, rect3, SpellDescription(altar));

            var rect4 = rect3;

            rect4.y    += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
            rect4.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            rect4.x    -= rect3.x;
            rect4.x    += 2f;
            Widgets.Label(rect4, "Executioner".Translate() + ": ");
            rect4.xMin = rect4.center.x - 15f;
            var label3 = ITab_AltarCardUtility.ExecutionerLabel(altar);

            if (Widgets.ButtonText(rect4, label3, true, false))
            {
                ITab_AltarCardUtility.OpenActorSelectMenu(altar, ITab_AltarCardUtility.ActorType.executioner);
            }

            TooltipHandler.TipRegion(rect4, "ExecutionerDesc".Translate());

            var rect5 = rect4;

            rect5.y    += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
            rect5.x    -= rect4.x;
            rect5.x    += 2f;
            rect5.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            Widgets.Label(rect5, "Sacrifice".Translate() + ": ");
            rect5.xMin = rect5.center.x - 15f;
            var label4 = ITab_AltarCardUtility.SacrificeLabel(altar);

            if (Widgets.ButtonText(rect5, label4, true, false))
            {
                ITab_AltarCardUtility.OpenActorSelectMenu(altar, ITab_AltarCardUtility.ActorType.prisoner);
            }

            TooltipHandler.TipRegion(rect5, "SacrificeDesc".Translate());

            var rect6 = rect5;

            rect6.y    += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
            rect6.x    -= rect5.x;
            rect6.x    += 2f;
            rect6.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            rect6.yMax += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
            Widgets.Label(rect6, "Cults_Spell".Translate() + ": ");
            rect6.xMin = rect6.center.x - 15f;
            var label5 = SpellLabel(altar);

            if (Widgets.ButtonText(rect6, label5, true, false))
            {
                OpenSpellSelectMenu(altar);
            }

            TooltipHandler.TipRegion(rect6, "Cults_SpellDesc".Translate());

            GUI.EndGroup();
        }
Beispiel #3
0
        public static void DrawTempleCard(Rect rect, Building_SacrificialAltar altar)
        {
            GUI.BeginGroup(rect);

            if (CultTracker.Get.PlayerCult != null)
            {
                var cultLabelWidth = Text.CalcSize(CultTracker.Get.PlayerCult.name).x + 15;

                //Headings
                _ = new Rect(rect);
                var rect1 = rect.ContractedBy(14f);
                rect1.height = 30f;

                //Unnamed Temple
                Text.Font = GameFont.Medium;
                Widgets.Label(rect1, altar.RoomName);
                Text.Font = GameFont.Small;

                //Rename Icon
                ITab_AltarCardUtility.DrawRename(altar);
                var rect2 = new Rect(rect1)
                {
                    yMin   = rect1.yMax + 10,
                    height = 25f,
                    width  = cultLabelWidth + 5
                };

                //Esoteric Order of Dagon
                Widgets.Label(rect2, CultTracker.Get.PlayerCult.name);
                if (Mouse.IsOver(rect2))
                {
                    Widgets.DrawHighlight(rect2);
                }

                if (Mouse.IsOver(rect2) && Event.current.type == EventType.MouseDown)
                {
                    Find.WindowStack.Add(new Dialog_RenameCult(altar.Map));
                }

                Widgets.DrawLineHorizontal(rect2.x - 10, rect2.yMax, rect.width - 15f);
                //---------------------------------------------------------------------

                var rectMain = new Rect(0 + 15f, 0 + 30f, TempleCardSize.x,
                                        ITab_AltarSacrificesCardUtility.ButtonSize * 1.15f);

                //Deity -> Cthulhu
                var rect4 = rectMain;
                rect4.yMin   = rectMain.yMax + 5f;
                rect4.y      = rectMain.yMax + 20f;
                rect4.x     += 5f;
                rect4.width  = ITab_AltarSacrificesCardUtility.ColumnSize;
                rect4.height = ITab_AltarSacrificesCardUtility.ButtonSize;
                Widgets.Label(rect4, "Deity".Translate() + ": ");
                rect4.xMin = rect4.center.x;
                var label4 = DeityLabel(altar);
                if (Widgets.ButtonText(rect4, label4, true, false))
                {
                    OpenDeitySelectMenu(altar);
                }

                TooltipHandler.TipRegion(rect4, "DeityDesc".Translate());

                //Cthulhu - He who waits dreaming.
                ITab_AltarCardUtility.DrawDeity(altar.tempCurrentWorshipDeity, rect4, null, -30f);

                //Preacher
                var rect5 = rect4;
                rect5.y += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
                //rect5.y = rect4.yMax + 30f;
                rect5.x    -= rect4.x - 5;
                rect5.x    += 15f;
                rect5.width = ITab_AltarSacrificesCardUtility.ColumnSize;
                Widgets.Label(rect5, "Preacher".Translate() + ": ");
                rect5.xMin = rect5.center.x;
                var label2 = PreacherLabel(altar);
                if (Widgets.ButtonText(rect5, label2, true, false))
                {
                    OpenPreacherSelectMenu(altar);
                }

                TooltipHandler.TipRegion(rect5, "PreacherDesc".Translate());

                var rect6 = rect5;
                rect6.y     += ITab_AltarSacrificesCardUtility.ButtonSize + ITab_AltarSacrificesCardUtility.SpacingOffset;
                rect6.height = ITab_AltarSacrificesCardUtility.ButtonSize * 2;
                rect6.width  = ITab_AltarSacrificesCardUtility.ColumnSize;
                rect6.x     -= rect5.x - 5;
                rect6.x     += 15f;
                if (altar.tempCurrentWorshipDeity != null)
                {
                    Widgets.Label(rect6.BottomHalf(), "Cults_SeasonDays".Translate());

                    Text.Font = GameFont.Tiny;
                    //Text.Anchor = TextAnchor.LowerLeft;
                    var num       = 15f;
                    var num2      = 270f;
                    var hourWidth = 20.833334f;
                    for (var day = 0; day <= 14; day++)
                    {
                        var rect9 = new Rect(num + 4f, num2 + 0f, hourWidth, 20f);
                        Widgets.Label(rect9, (day + 1).ToString());
                        var rect10 = new Rect(num, num2 + 20f, hourWidth, 30f);
                        rect10 = rect10.ContractedBy(1f);
                        var texture = TimeAssignmentDefOf.Anything.ColorTexture;
                        switch (altar.seasonSchedule[day])
                        {
                        case 1:
                            texture = SolidColorMaterials.NewSolidColorTexture(Color.red);
                            break;

                        case 2:
                            texture = SolidColorMaterials.NewSolidColorTexture(Color.blue);
                            break;

                        case 3:
                            texture = SolidColorMaterials.NewSolidColorTexture(Color.magenta);
                            break;
                        }

                        GUI.DrawTexture(rect10, texture);
                        if (Mouse.IsOver(rect10))
                        {
                            Widgets.DrawBox(rect10, 2);
                            //if (Input.GetMouseButton(0))
                            if (Widgets.ButtonInvisible(rect10))
                            {
                                altar.seasonSchedule[day] = (altar.seasonSchedule[day] % 4) + 1;
                                SoundDefOf.Designate_DragStandard_Changed.PlayOneShotOnCamera();
                                //p.timetable.SetAssignment(hour, this.selectedAssignment);
                            }
                        }

                        num += hourWidth;
                    }

                    num2 += 60f;
                    var rect11 = new Rect(15f, num2 + 3, hourWidth / 2, hourWidth / 2);
                    rect11 = rect11.ContractedBy(1f);
                    GUI.DrawTexture(rect11, TimeAssignmentDefOf.Anything.ColorTexture);
                    var rect12 = new Rect(15f + hourWidth, num2, 150f, (hourWidth / 2) + 6);
                    Widgets.Label(rect12, "NoSermonLabel".Translate());

                    var rect13 = new Rect(15f + 170f, num2 + 3, hourWidth / 2, hourWidth / 2);
                    rect13 = rect13.ContractedBy(1f);
                    GUI.DrawTexture(rect13, SolidColorMaterials.NewSolidColorTexture(Color.magenta));
                    var rect14 = new Rect(15f + hourWidth + 170f, num2, 150f, (hourWidth / 2) + 6);
                    Widgets.Label(rect14, "BothSermonLabel".Translate());

                    num2 += 30f;
                    var rect15 = new Rect(15f, num2 + 3, hourWidth / 2, hourWidth / 2);
                    rect15 = rect15.ContractedBy(1f);
                    GUI.DrawTexture(rect15, SolidColorMaterials.NewSolidColorTexture(Color.red));
                    var rect16 = new Rect(15f + hourWidth, num2, 150f, (hourWidth / 2) + 6);
                    Widgets.Label(rect16, "MorningSermonLabel".Translate());

                    var rect17 = new Rect(15f + 170f, num2 + 3, hourWidth / 2, hourWidth / 2);
                    rect17 = rect17.ContractedBy(1f);
                    GUI.DrawTexture(rect17, SolidColorMaterials.NewSolidColorTexture(Color.blue));
                    var rect18 = new Rect(15f + hourWidth + 170f, num2, 150f, (hourWidth / 2) + 6);
                    Widgets.Label(rect18, "EveningSermonLabel".Translate());

                    num2 += 35f;
                    var rect19 = new Rect(15f, num2, 150f, (hourWidth / 2) + 6);
                    Widgets.Label(rect19, "Cults_SermonStartLabel".Translate());

                    var dist        = 5f;
                    var button3     = new Rect(rect6.x + dist, rect6.y + 215f, 140f, 30f);
                    var morningHour = altar.morningHour + ":00h";
                    if (Widgets.ButtonText(button3, "Cults_MorningSermonStart".Translate() + morningHour, true, false))
                    {
                        listHours(altar, true);
                    }

                    var button4     = new Rect(rect6.x + dist + 150f, rect6.y + 215f, 140f, 30f);
                    var eveningHour = altar.eveningHour + ":00h";
                    if (Widgets.ButtonText(button4, "Cults_EveningSermonStart".Translate() + eveningHour, true, false))
                    {
                        listHours(altar, false);
                    }
                }

                // Old code with only morning/evening setting

                //Widgets.CheckboxLabeled(rect6.BottomHalf(), "MorningSermons".Translate(), ref altar.OptionMorning, disabled);
                //if (Mouse.IsOver(rect6) && Event.current.type == EventType.MouseDown && !disabled)
                //{
                //    altar.TryChangeWorshipValues(Building_SacrificialAltar.ChangeWorshipType.MorningWorship, altar.OptionMorning);
                //}
                //Rect rect7 = rect6;
                //rect7.y += ITab_AltarSacrificesCardUtility.ButtonSize + ITab_AltarSacrificesCardUtility.SpacingOffset;
                //rect7.height = ITab_AltarSacrificesCardUtility.ButtonSize;
                //Widgets.CheckboxLabeled(rect7.TopHalf(), "EveningSermons".Translate(), ref altar.OptionEvening, disabled);
                //if (Mouse.IsOver(rect7) && Event.current.type == EventType.MouseDown && !disabled)
                //{
                //    altar.TryChangeWorshipValues(Building_SacrificialAltar.ChangeWorshipType.EveningWorship, altar.OptionEvening);
                //}

                //TooltipHandler.TipRegion(rect6, "MorningSermonsDesc".Translate());
                //TooltipHandler.TipRegion(rect7, "EveningSermonsDesc".Translate());
            }
            else
            {
                var newRect = new Rect(rect);
                newRect        = newRect.ContractedBy(14f);
                newRect.height = 30f;

                Text.Font = GameFont.Medium;
                Widgets.Label(newRect, "Cults_NoPlayerCultAvailable".Translate());
                Text.Font = GameFont.Small;
            }

            GUI.EndGroup();
        }
Beispiel #4
0
        public static void DrawTempleCard(Rect rect, Building_SacrificialAltar altar)
        {
            GUI.BeginGroup(rect);

            if (CultTracker.Get.PlayerCult != null)
            {
                float cultLabelWidth = Text.CalcSize(CultTracker.Get.PlayerCult.name).x + 15;

                //Headings
                Rect rect1 = new Rect(rect);
                rect1        = rect.ContractedBy(14f);
                rect1.height = 30f;

                //Unnamed Temple
                Text.Font = GameFont.Medium;
                Widgets.Label(rect1, altar.RoomName);
                Text.Font = GameFont.Small;

                //Rename Icon
                ITab_AltarCardUtility.DrawRename(altar);
                Rect rect2 = new Rect(rect1);
                rect2.yMin   = rect1.yMax + 10;
                rect2.height = 25f;
                rect2.width  = cultLabelWidth + 5;

                //Esoteric Order of Dagon
                Widgets.Label(rect2, CultTracker.Get.PlayerCult.name);
                if (Mouse.IsOver(rect2))
                {
                    Widgets.DrawHighlight(rect2);
                }
                if (Mouse.IsOver(rect2) && Event.current.type == EventType.MouseDown)
                {
                    Find.WindowStack.Add(new Dialog_RenameCult(altar.Map));
                }
                Widgets.DrawLineHorizontal(rect2.x - 10, rect2.yMax, rect.width - 15f);
                //---------------------------------------------------------------------

                Rect rectMain = new Rect(0 + 15f, 0 + 30f, TempleCardSize.x, ITab_AltarSacrificesCardUtility.ButtonSize * 1.15f);

                //Deity -> Cthulhu
                Rect rect4 = rectMain;
                rect4.yMin   = rectMain.yMax + 5f;
                rect4.y      = rectMain.yMax + 20f;
                rect4.x     += 5f;
                rect4.width  = ITab_AltarSacrificesCardUtility.ColumnSize;
                rect4.height = ITab_AltarSacrificesCardUtility.ButtonSize;
                Widgets.Label(rect4, "Deity".Translate() + ": ");
                rect4.xMin = rect4.center.x;
                string label4 = DeityLabel(altar);
                if (Widgets.ButtonText(rect4, label4, true, false, true))
                {
                    ITab_AltarWorshipCardUtility.OpenDeitySelectMenu(altar);
                }
                TooltipHandler.TipRegion(rect4, "DeityDesc".Translate());

                //Cthulhu - He who waits dreaming.
                ITab_AltarCardUtility.DrawDeity(altar.tempCurrentWorshipDeity, rect4, null, -30f);

                //Preacher
                Rect rect5 = rect4;
                rect5.y += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
                //rect5.y = rect4.yMax + 30f;
                rect5.x    -= (rect4.x - 5);
                rect5.x    += 15f;
                rect5.width = ITab_AltarSacrificesCardUtility.ColumnSize;
                Widgets.Label(rect5, "Preacher".Translate() + ": ");
                rect5.xMin = rect5.center.x;
                string label2 = PreacherLabel(altar);
                if (Widgets.ButtonText(rect5, label2, true, false, true))
                {
                    ITab_AltarWorshipCardUtility.OpenPreacherSelectMenu(altar);
                }
                TooltipHandler.TipRegion(rect5, "PreacherDesc".Translate());

                Rect rect6 = rect5;
                rect6.y     += ITab_AltarSacrificesCardUtility.ButtonSize + ITab_AltarSacrificesCardUtility.SpacingOffset;
                rect6.height = ITab_AltarSacrificesCardUtility.ButtonSize;
                rect6.width  = ITab_AltarSacrificesCardUtility.ColumnSize;
                rect6.x     -= (rect5.x - 5);
                rect6.x     += 15f;
                bool disabled = (altar.tempCurrentWorshipDeity == null);
                Widgets.CheckboxLabeled(rect6.BottomHalf(), "MorningSermons".Translate(), ref altar.OptionMorning, disabled);
                if (Mouse.IsOver(rect6) && Event.current.type == EventType.MouseDown && !disabled)
                {
                    altar.TryChangeWorshipValues(Building_SacrificialAltar.ChangeWorshipType.MorningWorship, altar.OptionMorning);
                }
                Rect rect7 = rect6;
                rect7.y     += ITab_AltarSacrificesCardUtility.ButtonSize + ITab_AltarSacrificesCardUtility.SpacingOffset;
                rect7.height = ITab_AltarSacrificesCardUtility.ButtonSize;
                Widgets.CheckboxLabeled(rect7.TopHalf(), "EveningSermons".Translate(), ref altar.OptionEvening, disabled);
                if (Mouse.IsOver(rect7) && Event.current.type == EventType.MouseDown && !disabled)
                {
                    altar.TryChangeWorshipValues(Building_SacrificialAltar.ChangeWorshipType.EveningWorship, altar.OptionEvening);
                }

                TooltipHandler.TipRegion(rect6, "MorningSermonsDesc".Translate());
                TooltipHandler.TipRegion(rect7, "EveningSermonsDesc".Translate());
            }
            else
            {
                Rect newRect = new Rect(rect);
                newRect        = newRect.ContractedBy(14f);
                newRect.height = 30f;

                Text.Font = GameFont.Medium;
                Widgets.Label(newRect, "Cults_NoPlayerCultAvailable".Translate());
                Text.Font = GameFont.Small;
            }

            GUI.EndGroup();
        }
        public static void DrawTempleCard(Rect rect, Building_SacrificialAltar altar)
        {
            GUI.BeginGroup(rect);
            var rect3 = new Rect(2f, 0f, ITab_AltarSacrificesCardUtility.ColumnSize,
                                 ITab_AltarSacrificesCardUtility.ButtonSize);

            Widgets.Label(rect3, "Deity".Translate() + ": ");
            rect3.xMin = rect3.center.x - 15f;
            var label2 = DeityLabel(altar);

            if (Widgets.ButtonText(rect3, label2, true, false))
            {
                ITab_AltarCardUtility.OpenDeitySelectMenu(altar, ITab_AltarCardUtility.DeityType.OfferingDeity);
            }

            TooltipHandler.TipRegion(rect3, "DeityDesc".Translate());

            ITab_AltarCardUtility.DrawDeity(altar.tempCurrentOfferingDeity, rect3);

            var rect4 = rect3;

            rect4.y    += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
            rect4.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            rect4.x    -= rect3.x - 2;
            Widgets.Label(rect4, "Offerer".Translate() + ": ");
            rect4.xMin = rect4.center.x - 15f;
            var label3 = OffererLabel(altar);

            if (Widgets.ButtonText(rect4, label3, true, false))
            {
                ITab_AltarCardUtility.OpenActorSelectMenu(altar, ITab_AltarCardUtility.ActorType.offerer);
            }

            TooltipHandler.TipRegion(rect4, "OffererDesc".Translate());

            var rect5 = rect4;

            rect5.y += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
            rect5.x -= rect4.x - 2;
            //rect5.x += 2f;
            rect5.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            Widgets.Label(rect5, "Offering".Translate() + ": ");
            rect5.xMin = rect5.center.x - 15f;
            var label4 = OfferingLabel(altar);

            if (Widgets.ButtonText(rect5, label4, true, false))
            {
                OpenOfferingSelectMenu(altar);
            }

            TooltipHandler.TipRegion(rect5, "OfferingDesc".Translate());

            var rect6 = rect5;

            rect6.y += ITab_AltarSacrificesCardUtility.ButtonSize + 15f;
            rect6.x -= rect5.x - 2;
            //rect5.x += 2f;
            rect6.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            Widgets.Label(rect6, "Amount".Translate() + ": ");
            rect6.xMin = rect6.center.x - 15f;
            var label5 = AmountLabel(altar);

            if (Widgets.ButtonText(rect6, label5, true, false))
            {
                OpenAmountSelectMenu(altar);
            }

            TooltipHandler.TipRegion(rect6, "AmountDesc".Translate());


            //Rect rect3 = new Rect(2f, 0, 210f, 25f);
            //Widgets.Label(rect3, "Deity".Translate() + ": ");
            //rect3.xMin = rect3.center.x - 15f;
            //string label2 = DeityLabel(altar);
            //if (Widgets.ButtonText(rect3, label2, true, false, true))
            //{
            //    ITab_AltarHumanSacrificeCardUtility.OpenDeitySelectMenu(altar);
            //}

            //Rect secondBox = rect3;
            //secondBox.x += rect3.x + 10f + 30f;

            //secondBox.xMax += 125f;
            //secondBox.height = 35f;
            //Text.Font = GameFont.Medium;
            //Widgets.Label(secondBox, DeityLabel(altar));
            //Text.Font = GameFont.Small;
            //ITab_CardUtility.DrawTier(altar.tempCurrentSacrificeDeity, new Vector2(secondBox.x, secondBox.y + 30f));
            //Rect secondBoxUnder = secondBox;
            //secondBoxUnder.y += 40f;
            //secondBoxUnder.width -= 15f;
            //secondBoxUnder.height = 70f;
            //Widgets.Label(secondBoxUnder, DeityDescription(altar));
            //Rect secondBoxUnder2 = secondBoxUnder;
            //secondBoxUnder2.y += 70;
            //secondBoxUnder2.height = 250f;
            //Widgets.Label(secondBoxUnder2, SpellDescription(altar));

            //Rect rect5 = rect3;
            //rect5.y += 35f;
            ////rect5.x -= (rect3.x - 5);
            //rect5.x -= 2f;
            //rect5.width = 210f;
            //Widgets.Label(rect5, "Offering".Translate() + ": ");
            //rect5.xMin = rect5.center.x - 15f;
            //string label4 = SacrificeLabel(altar);
            //if (Widgets.ButtonText(rect5, label4, true, false, true))
            //{
            //    ITab_AltarHumanSacrificeCardUtility.OpenSacrificeSelectMenu(altar);
            //}

            GUI.EndGroup();
        }
Beispiel #6
0
        public static void DrawTempleCard(Rect rect, Building_SacrificialAltar altar)
        {
            GUI.BeginGroup(rect);
            Rect rect3 = new Rect(2f, 0f, ITab_AltarSacrificesCardUtility.ColumnSize, ITab_AltarSacrificesCardUtility.ButtonSize);

            Widgets.Label(rect3, "Deity".Translate() + ": ");
            rect3.xMin = rect3.center.x - 15f;
            string label2 = ITab_AltarCardUtility.DeityLabel(altar, ITab_AltarCardUtility.DeityType.SacrificeDeity);

            if (Widgets.ButtonText(rect3, label2, true, false, true))
            {
                ITab_AltarCardUtility.OpenDeitySelectMenu(altar, ITab_AltarCardUtility.DeityType.SacrificeDeity);
            }
            TooltipHandler.TipRegion(rect3, "DeityDesc".Translate());

            ITab_AltarCardUtility.DrawDeity(altar.tempCurrentSacrificeDeity, rect3);

            Rect rect4 = rect3;

            rect4.y    += ITab_AltarSacrificesCardUtility.ButtonSize + ITab_AltarSacrificesCardUtility.SpacingOffset;
            rect4.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            rect4.x    -= (rect3.x - 2);
            Widgets.Label(rect4, "Executioner".Translate() + ": ");
            rect4.xMin = rect4.center.x - 15f;
            string label3 = ITab_AltarCardUtility.ExecutionerLabel(altar);

            if (Widgets.ButtonText(rect4, label3, true, false, true))
            {
                ITab_AltarCardUtility.OpenActorSelectMenu(altar, ITab_AltarCardUtility.ActorType.executioner);
            }
            TooltipHandler.TipRegion(rect4, "ExecutionerDesc".Translate());

            Rect rect5 = rect4;

            rect5.y += ITab_AltarSacrificesCardUtility.ButtonSize + ITab_AltarSacrificesCardUtility.SpacingOffset;
            rect5.x -= (rect4.x - 2);
            //rect5.x += 2f;
            rect5.width = ITab_AltarSacrificesCardUtility.ColumnSize;
            Widgets.Label(rect5, "Sacrifice".Translate() + ": ");
            rect5.xMin = rect5.center.x - 15f;
            string label4 = ITab_AltarCardUtility.SacrificeLabel(altar);

            if (Widgets.ButtonText(rect5, label4, true, false, true))
            {
                ITab_AltarCardUtility.OpenActorSelectMenu(altar, ITab_AltarCardUtility.ActorType.animalSacrifice);
            }
            TooltipHandler.TipRegion(rect5, "SacrificeAnimalDesc".Translate());

            //Rect rect6 = rect5;
            //rect6.y += 35f;
            //rect6.x -= (rect5.x - 5);
            ////rect6.x += 2f;
            //rect6.width = 210f;
            //rect6.yMax += 35f;
            //Widgets.Label(rect6, "Cults_Spell".Translate() + ": ");
            //rect6.xMin = rect6.center.x - 15f;
            //string label5 = SpellLabel(altar);
            //if (Widgets.ButtonText(rect6, label5, true, false, true))
            //{
            //    ITab_AltarHumanSacrificeCardUtility.OpenSpellSelectMenu(altar);
            //}

            /*
             * Rect rect4 = rect3;
             * rect4.y += 35f;
             * rect4.width = 150f;
             * if (Widgets.ButtonText(rect4, "RenameTemple".Translate(), true, false, true))
             * {
             *  Find.WindowStack.Add(new Dialog_RenameTemple(altar));
             * }
             * Rect rectDebug1 = rect4;
             * rectDebug1.y += 25f;
             * if (DebugSettings.godMode)
             * {
             *  if (Widgets.ButtonText(rectDebug1, "ForceSermonDebug".Translate(), true, false, true))
             *  {
             *      SermonUtility.ForceSermon(altar);
             *  }
             *  Rect rectDebug2 = rectDebug1;
             *  rectDebug2.y += 25f;
             *  if (Widgets.ButtonText(rectDebug2, "ForceListenersDebug".Translate(), true, false, true))
             *  {
             *      TempleCardUtility.ForceListenersTest(altar);
             *  }
             * }
             *
             * Rect rect5 = rect4;
             * rect5.x = rect4.xMax + 5f;
             * rect5.width = 200f;
             * rect5.y -= 20f;
             * Widgets.CheckboxLabeled(rect5, "MorningSermons".Translate(), ref altar.OptionMorning, false);
             * Rect rect6 = rect5;
             * rect6.y += 20f;
             * Widgets.CheckboxLabeled(rect6, "EveningSermons".Translate(), ref altar.OptionEvening, false);
             *
             */
            GUI.EndGroup();
        }