// Token: 0x0600008B RID: 139 RVA: 0x00004D34 File Offset: 0x00002F34 public void DoAllowedAreaSelectors(Rect rect, Building_Bell b, Func <Area, string> getLabel) { bool flag = Find.CurrentMap == null; if (!flag) { Area[] areas = ITab_BellManager.GetAreas().ToArray <Area>(); int num = areas.Length + 1; float num2 = rect.width / (float)num; Text.WordWrap = false; Text.Font = GameFont.Tiny; Rect rect2 = new Rect(rect.x, rect.y, num2, rect.height); ITab_BellManager.DoAreaSelector(rect2, b, null, getLabel); int num3 = 1; foreach (Area a in areas) { bool flag2 = a == this.SelectBell.Map.areaManager.Home; if (!flag2) { float num4 = (float)num3 * num2; Rect rect3 = new Rect(rect.x + num4, rect.y, num2, rect.height); ITab_BellManager.DoAreaSelector(rect3, b, a, getLabel); num3++; } } Text.WordWrap = true; Text.Font = GameFont.Small; } }
// Token: 0x06000083 RID: 131 RVA: 0x00004A54 File Offset: 0x00002C54 private void FillTabLeaderboard(Rect rect) { ITab_BellManager.listingStandard.Begin(rect); float widthOffset = GUI.skin.label.CalcSize(new GUIContent("Winners")).x / 2f; ITab_BellManager.centeredText("Winners", new Vector2(rect.xMax / 2f - widthOffset, 10f), 0, 0); Widgets.DrawLineHorizontal(rect.x - 0f, 35f, rect.width - 15f); if (SelectBell.winners.Count == 0) { widthOffset = GUI.skin.label.CalcSize(new GUIContent("No winners yet")).x / 2f; ITab_BellManager.centeredText("No winners yet", new Vector2(rect.xMax / 2f - widthOffset, 135f), 0, 0); } else { float heightOffset = 40f; float lineHeight = 25f; var g = SelectBell.winners.GroupBy(i => i).OrderByDescending(group => group.Count()); foreach (var grp in g) { string currentWinner = $"{grp.Key} { grp.Count()} time"; if (grp.Count() > 1) { currentWinner += "s"; } widthOffset = GUI.skin.label.CalcSize(new GUIContent(currentWinner)).x / 2f; Rect row = new Rect(rect.xMax / 2f - widthOffset, heightOffset, rect.xMax, lineHeight); Widgets.Label(row, currentWinner); heightOffset = heightOffset + lineHeight; } } ITab_BellManager.listingStandard.End(); }
// Token: 0x06000085 RID: 133 RVA: 0x00004B3C File Offset: 0x00002D3C private static void LabelWithTooltip(string label, string tooltip, bool centered = false) { Rect rect = ITab_BellManager.listingStandard.GetRect(Text.CalcHeight(label, ITab_BellManager.listingStandard.ColumnWidth)); Vector2 offset = default(Vector2); if (centered) { offset.x = rect.xMax / 2f - GUI.skin.label.CalcSize(new GUIContent(label)).x / 2f; } Rect rectText = rect; rectText.x = offset.x; Widgets.Label(rectText, label); ITab_BellManager.DoTooltip(rect, tooltip); }
// Token: 0x06000082 RID: 130 RVA: 0x000047BC File Offset: 0x000029BC private void FillTabManager(Rect rect) { ITab_BellManager.listingStandard.Begin(rect); float offset0 = GUI.skin.label.CalcSize(new GUIContent("Welcome_to_the_arena!")).x / 2f; ITab_BellManager.centeredText("Welcome to the arena!", new Vector2(rect.xMax / 2f - offset0 - 2f, 10f), 100, 0); Widgets.DrawLineHorizontal(rect.x - 10f, 35f, rect.width - 15f); string label0 = ITab_BellManager.FighterLabel(this.SelectBell, 0); ITab_BellManager.DrawButton(delegate { ITab_BellManagerUtility.OpenActor1SelectMenu(this.SelectBell); }, label0, new Vector2(rect.xMax - ITab_BellManager.buttonSize.x - 100f, 75f), "Fighter #2", true); string label = ITab_BellManager.FighterLabel(this.SelectBell, 1); ITab_BellManager.DrawButton(delegate { ITab_BellManagerUtility.OpenActor2SelectMenu(this.SelectBell); }, label, new Vector2(rect.xMin + 100f, 75f), "Fighter #1", true); float offset = GUI.skin.label.CalcSize(new GUIContent("Vs.")).x / 2f; ITab_BellManager.centeredText("Vs.", new Vector2(rect.xMax / 2f - offset, 75f), 0, 0); bool flag = this.SelectBell.currentState == Building_Bell.State.rest; if (flag) { ITab_BellManager.DrawButton(delegate { this.SelectBell.brawl(); }, "Brawl!", new Vector2(rect.xMax / 2f - ITab_BellManager.buttonSize.x / 2f, 135f), "Let the brawl begin!", true); } else { bool flag2 = this.SelectBell.currentState == Building_Bell.State.preparation || this.SelectBell.currentState == Building_Bell.State.scheduled; if (flag2) { ITab_BellManager.DrawButton(delegate { this.SelectBell.TryCancelBrawl(""); }, "Cancel", new Vector2(rect.xMax / 2f - ITab_BellManager.buttonSize.x / 2f, 135f), "Cancel the brawl", true); } else { bool flag3 = this.SelectBell.currentState == Building_Bell.State.fight; if (flag3) { ITab_BellManager.DrawButton(delegate { this.SelectBell.endBrawl(null, true); }, "Suspend the brawl", new Vector2(rect.xMax / 2f - ITab_BellManager.buttonSize.x / 2f, 135f), "Suspend the brawl", true); } } } string currentChoice = "No killing!"; if (SelectBell.toDeath) { currentChoice = "To the Death!"; } ITab_BellManager.DrawButton(delegate { ITab_BellManagerUtility.OpenFightTypeMenu(this.SelectBell); }, currentChoice, new Vector2(rect.xMin + 100f, 195f), "Win condition", true); currentChoice = "For Glory!"; if (SelectBell.winnerGetsFreedom) { currentChoice = "For Freedom!"; } offset = GUI.skin.label.CalcSize(new GUIContent("Rules")).x / 2f; ITab_BellManager.centeredText("Rules", new Vector2(rect.xMax / 2f - offset, 185f), 0, 0); ITab_BellManager.DrawButton(delegate { ITab_BellManagerUtility.OpenRewardTypeMenu(this.SelectBell); }, currentChoice, new Vector2(rect.xMax - ITab_BellManager.buttonSize.x - 100f, 195f), "Winner reward", true); ITab_BellManager.listingStandard.Gap(); ITab_BellManager.listingStandard.End(); }
// Token: 0x06000084 RID: 132 RVA: 0x00004AE4 File Offset: 0x00002CE4 private void FillTabArea(Rect rect) { ITab_BellManager.LabelWithTooltip("Fighting Area", "Area in which prisoners will fight. Enclosed spaces recommended.", true); this.DoAreaRestriction(ITab_BellManager.listingStandard, this.SelectBell.Map.areaManager.Home, new Action <Area>(this.SetAreaRestriction), new Func <Area, string>(AreaUtility.AreaAllowedLabel_Area)); }