public ReligionInfoCategory(string label, string description, IEnumerable <ReligionInfoEntry> entries)
 {
     this.Label       = label;
     descriptionEntry = new ReligionInfoEntry("ReligionInfo_Description".Translate(), "", description);
     infoEntries      = new List <ReligionInfoEntry>();
     infoEntries.Add(descriptionEntry);
     infoEntries.AddRange(entries);
 }
 public Dialog_ReligionInfo(Religion religion)
 {
     this.religion   = religion;
     this.forcePause = true;
     //this.doCloseButton = true;
     this.doCloseX = true;
     this.absorbInputAroundWindow = true;
     this.closeOnClickedOutside   = true;
     this.soundAppear             = SoundDefOf.InfoCard_Open;
     this.soundClose      = SoundDefOf.InfoCard_Close;
     scrollPosition       = new Vector2();
     secondScrollPosition = new Vector2();
     //cachedEntries.Clear();
     selected = null;
 }
        private void DrawEntry(Rect rect, ref float curY, ReligionInfoEntry entry)
        {
            if (entry == null)
            {
                return;
            }

            Rect rect1 = new Rect(0.0f, curY, rect.width, Verse.Text.CalcHeight(entry.Value, rect.width));

            Widgets.Label(rect1, entry.Label);
            Widgets.Label(new Rect(0.0f + 240f, curY, rect.width, rect1.height), entry.Value);
            curY += 24f;
            if (Mouse.IsOver(rect1))
            {
                Widgets.DrawHighlight(rect1);
                selected = entry;
            }
        }
 public void Add(ReligionInfoEntry religionInfoEntry)
 {
     infoEntries.Add(religionInfoEntry);
 }
 public ReligionInfoCategory(string label, string description)
 {
     this.Label       = label;
     descriptionEntry = new ReligionInfoEntry("ReligionInfo_Description".Translate(), "", description);
     infoEntries      = new List <ReligionInfoEntry>();
 }