Rename runtime menu tab surface model

This commit is contained in:
Meta Vens 2026-06-28 15:41:29 +01:00
commit b09c2ca32c
3 changed files with 18 additions and 15 deletions

View file

@ -4718,10 +4718,10 @@ static void RequireRuntimeMenuTabsUseEveSurface(string root)
"HandleTabSurfaceCommand(",
"AetheriaEveUnitySurfaceHost.RenderRuntime(",
"AetheriaEveUnitySurfaceHost.Hide(_tabSurfaceDocument)",
"AetheriaRuntimeMenuTabsSurfaceBuilder.Build(ProjectTabSurface())",
"ProjectTabSurface(",
"AetheriaRuntimeMenuTabsSurfaceBuilder.Project(",
"new AetheriaRuntimeMenuTabProjectionOption(",
"AetheriaRuntimeMenuTabsSurfaceBuilder.Build(ComposeTabSurface())",
"ComposeTabSurface(",
"AetheriaRuntimeMenuTabsSurfaceBuilder.Compose(",
"new AetheriaRuntimeMenuTabModelOption(",
"ResolveVisibleTabs(",
"SetObservedEntityIndex(AetheriaUnityObservedEntityIndex observedEntityIndex)",
"AetheriaRuntimeObservedDockingState",
@ -4782,6 +4782,9 @@ static void RequireRuntimeMenuTabsUseEveSurface(string root)
"new EveUiToolkitSurfaceLowerer()",
"string.Equals(request.Command, AetheriaRuntimeMenuTabsSurfaceBuilder.CommandFor(",
"ProjectTabSurfaceState(",
"ProjectTabSurface(",
"AetheriaRuntimeMenuTabsSurfaceBuilder.Project(",
"new AetheriaRuntimeMenuTabProjectionOption(",
"new AetheriaRuntimeMenuTabSurfaceEntry(",
"private static string TabKey("
};
@ -4808,9 +4811,9 @@ static void RequireRuntimeMenuTabsUseEveSurface(string root)
var requiredProjectionBuilderSymbols = new[]
{
"public sealed class AetheriaRuntimeMenuTabProjectionOption",
"public sealed class AetheriaRuntimeMenuTabModelOption",
"public static string NormalizeTabKey(string tabKey)",
"public static AetheriaRuntimeMenuTabsSurfaceState Project(",
"public static AetheriaRuntimeMenuTabsSurfaceState Compose(",
"public int Order { get; }",
".OrderBy(tab => tab.Order)",
"new AetheriaRuntimeMenuTabSurfaceEntry(",

View file

@ -112,7 +112,7 @@ public class MenuPanel : MonoBehaviour
transform,
_tabSurfaceDocument,
"Aetheria Runtime Menu Tabs Surface",
AetheriaRuntimeMenuTabsSurfaceBuilder.Build(ProjectTabSurface()),
AetheriaRuntimeMenuTabsSurfaceBuilder.Build(ComposeTabSurface()),
HandleTabSurfaceCommand,
_tabSurfaceChrome);
}
@ -146,13 +146,13 @@ public class MenuPanel : MonoBehaviour
AetheriaEveUnitySurfaceHost.Hide(_tabSurfaceDocument);
}
private AetheriaRuntimeMenuTabsSurfaceState ProjectTabSurface()
private AetheriaRuntimeMenuTabsSurfaceState ComposeTabSurface()
{
var visibleTabs = ResolveVisibleTabs();
return AetheriaRuntimeMenuTabsSurfaceBuilder.Project(
return AetheriaRuntimeMenuTabsSurfaceBuilder.Compose(
ToRuntimeTabKey(CurrentTab),
visibleTabs
.Select(tabBinding => new AetheriaRuntimeMenuTabProjectionOption(
.Select(tabBinding => new AetheriaRuntimeMenuTabModelOption(
ToRuntimeTabKey(tabBinding.Tab),
GetTabLabel(tabBinding),
(int)tabBinding.Tab))

View file

@ -36,9 +36,9 @@ namespace GameCult.Aetheria.State.Verse
public string UpdatedAtUtc { get; }
}
public sealed class AetheriaRuntimeMenuTabProjectionOption
public sealed class AetheriaRuntimeMenuTabModelOption
{
public AetheriaRuntimeMenuTabProjectionOption(string key, string label, int order)
public AetheriaRuntimeMenuTabModelOption(string key, string label, int order)
{
Key = key ?? "";
Label = label ?? "";
@ -66,15 +66,15 @@ namespace GameCult.Aetheria.State.Verse
return $"aetheria.runtime_menu.tab.{NormalizeTabKey(tabKey)}";
}
public static AetheriaRuntimeMenuTabsSurfaceState Project(
public static AetheriaRuntimeMenuTabsSurfaceState Compose(
string currentTabKey,
IEnumerable<AetheriaRuntimeMenuTabProjectionOption> visibleTabs,
IEnumerable<AetheriaRuntimeMenuTabModelOption> visibleTabs,
string updatedAtUtc)
{
var normalizedCurrent = NormalizeTabKey(currentTabKey);
return new AetheriaRuntimeMenuTabsSurfaceState(
normalizedCurrent,
(visibleTabs ?? Array.Empty<AetheriaRuntimeMenuTabProjectionOption>())
(visibleTabs ?? Array.Empty<AetheriaRuntimeMenuTabModelOption>())
.Where(tab => tab != null)
.OrderBy(tab => tab.Order)
.ThenBy(tab => NormalizeTabKey(tab.Key), StringComparer.Ordinal)