using System; using System.Collections.Generic; using System.Globalization; using KernelPanic.Data; using KernelPanic.Meta; using UnityEngine; using UnityEngine.UIElements; namespace KernelPanic.UI { public static class RunHistoryView { public static VisualElement Build(IReadOnlyList entries, Action close) => Build(entries, close, null, null, null, null); public static VisualElement Build(IReadOnlyList entries, Action close, CardDatabase cards, PackageDatabase packages, Action loadBuild, Func unavailableReason) { var overlay = new VisualElement { name = "RunHistoryOverlay" }; overlay.AddToClassList("modal-overlay"); overlay.AddToClassList("modal-open"); var dialog = new VisualElement(); dialog.AddToClassList("root-credit-dialog"); dialog.AddToClassList("run-history-dialog"); dialog.style.width = Length.Percent(94); dialog.style.maxWidth = 760; dialog.style.maxHeight = Length.Percent(92); overlay.Add(dialog); dialog.Add(SoftwareCardView.Text($"RECENT RUNS / last {RunHistory.Capacity}", "section-title")); dialog.Add(new Label { name = "RunHistoryNotice", enableRichText = false }); dialog.Q