// copypasta from ArchitectCategoryTab.DoInfoBox except different ID and no shadow. internal static void DoInfoBox(Rect infoRect, Designator designator) { Find.WindowStack.ImmediateWindow(32521, infoRect, WindowLayer.GameUI, delegate { if (designator != null) { Rect position = infoRect.AtZero().ContractedBy(7f); GUI.BeginGroup(position); Rect rect = new Rect(0f, 0f, position.width, 999f); Text.Font = GameFont.Small; Widgets.Label(rect, designator.LabelCap); float num = 24f; designator.DrawPanelReadout(ref num, position.width); Rect rect2 = new Rect(0f, num, position.width, position.height - num); string desc = designator.Desc; GenText.SetTextSizeToFit(desc, rect2); Widgets.Label(rect2, desc); GUI.EndGroup(); } }, true, false, 0f); }
protected void DoInfoBox(Rect infoRect, Designator designator) { Find.WindowStack.ImmediateWindow(32520, infoRect, WindowLayer.GameUI, delegate { if (designator != null) { Rect position = infoRect.AtZero().ContractedBy(7f); GUI.BeginGroup(position); Rect rect = new Rect(0f, 0f, position.width - designator.PanelReadoutTitleExtraRightMargin, 999f); Text.Font = GameFont.Small; Widgets.Label(rect, designator.LabelCap); float curY = Mathf.Max(24f, Text.CalcHeight(designator.LabelCap, rect.width)); designator.DrawPanelReadout(ref curY, position.width); Rect rect2 = new Rect(0f, curY, position.width, position.height - curY); string desc = designator.Desc; GenText.SetTextSizeToFit(desc, rect2); Widgets.Label(rect2, desc); GUI.EndGroup(); } }); }
public override void DrawPanelReadout(ref float curY, float width) { activeDesignator.DrawPanelReadout(ref curY, width); }