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();
        }
Esempio n. 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();
        }
Esempio n. 3
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();
        }