From 585942259da52ebfce4492572abc7c7468eca163 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 21:07:15 +0200 Subject: [PATCH] Scenario picker attempt 2: body heading instead of a second giant title, small left group labels, chrome Launch in the accent, tight Seed/Ambient block, capped brief, visible scrollbar track Co-Authored-By: Claude Sonnet 5.5 --- .../Scripts/Editor/ScenarioPickerCapture.cs | 3 +- Assets/Scripts/Editor/ScenarioPickerVerify.cs | 14 +- Assets/Scripts/UI/MainMenu.cs | 2 +- Assets/Scripts/UI/ScenarioPicker.cs | 122 ++++++++++++++++-- 4 files changed, 122 insertions(+), 19 deletions(-) diff --git a/Assets/Scripts/Editor/ScenarioPickerCapture.cs b/Assets/Scripts/Editor/ScenarioPickerCapture.cs index 12ec94142..b39dd7a1b 100644 --- a/Assets/Scripts/Editor/ScenarioPickerCapture.cs +++ b/Assets/Scripts/Editor/ScenarioPickerCapture.cs @@ -56,7 +56,7 @@ public static class ScenarioPickerCapture var (menu, list, detail) = Build(); menu.Dialog.gameObject.SetActive(false); list.Title.text = MainMenu.TitleSubtitle("new game", "scenarios"); - ScenarioPicker.Show(list, detail, AllGroups(), _ => { }, () => { }); + ScenarioPicker.Show(list, detail, AllGroups(), _ => { }, () => { }, menu.Dialog.Confirm); list.RefreshValues(); detail.RefreshValues(); @@ -80,6 +80,7 @@ public static class ScenarioPickerCapture foreach (var text in list.transform.GetComponentsInChildren()) text.ForceMeshUpdate(); Canvas.ForceUpdateCanvases(); + list.Content.GetComponentInParent().onValueChanged.Invoke(Vector2.zero); camera.Render(); var previous = RenderTexture.active; diff --git a/Assets/Scripts/Editor/ScenarioPickerVerify.cs b/Assets/Scripts/Editor/ScenarioPickerVerify.cs index 1a08b7aba..3d9acb75e 100644 --- a/Assets/Scripts/Editor/ScenarioPickerVerify.cs +++ b/Assets/Scripts/Editor/ScenarioPickerVerify.cs @@ -68,7 +68,7 @@ public static class ScenarioPickerVerify private static Screen Build(bool oneGroup = false) { - var (_, list, detail) = ScenarioPickerCapture.Build(); + var (menu, list, detail) = ScenarioPickerCapture.Build(); // Build opens the scene afresh, which destroys the previous EventSystem. var events = new GameObject("verify EventSystem").AddComponent(); // Edit mode never calls OnEnable, which is what registers an EventSystem as current. @@ -83,11 +83,11 @@ public static class ScenarioPickerVerify var groups = oneGroup ? new List<(string label, Scenario[] scenarios)> { ("modes", screen.A) } : new List<(string label, Scenario[] scenarios)> { ("modes", screen.A), ("development", screen.B), ("test arenas", screen.C) }; - screen.Picker = ScenarioPicker.Show(list, detail, groups, screen.Launched.Add, () => screen.Backs++); + screen.Picker = ScenarioPicker.Show(list, detail, groups, screen.Launched.Add, () => screen.Backs++, menu.Dialog.Confirm); var buttons = list.GetComponentsInChildren(false).Where(button => !button.transform.IsChildOf(detail.transform)).Select(button => button.Button).ToArray(); screen.Rows = buttons.Take(buttons.Length - 1).ToArray(); screen.Back = buttons.Last(); - screen.Launch = detail.GetComponentsInChildren(false).Single().Button; + screen.Launch = detail.GetComponentsInChildren