Build inventory dropdown model directly

This commit is contained in:
Meta Vens 2026-06-29 05:44:24 +01:00
commit 80cda5245b
3 changed files with 34 additions and 22 deletions

View file

@ -215,13 +215,13 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
private void RenderDropdownSurface()
{
_dropdownSurfaceModel = ComposeDropdownSurface();
_dropdownSurfaceModel = BuildDropdownSurfaceModel();
_dropdownSurfaceDocument = AetheriaEveUnitySurfaceHost.RenderRuntime(
transform,
_dropdownSurfaceDocument,
"Aetheria Inventory Dropdown Surface",
AetheriaRuntimeInventoryDropdownSurfaceBuilder.Build(_dropdownSurfaceModel.State),
_dropdownSurfaceModel.Document,
HandleDropdownSurfaceCommand,
_dropdownSurfaceChrome);
}
@ -299,7 +299,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
AetheriaEveUnitySurfaceHost.Hide(_dropdownSurfaceDocument);
}
private AetheriaRuntimeInventoryDropdownSurfaceModel ComposeDropdownSurface()
private AetheriaRuntimeInventoryDropdownSurfaceModel BuildDropdownSurfaceModel()
{
var stationRefit = ResolveStationRefit();
_dropdownStationRefitEntities = (stationRefit?.AvailableEntities ?? Array.Empty<AetheriaRuntimeStationRefitEntityOption>())
@ -328,7 +328,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
.ToArray();
var hasDockingBay = TryResolveCurrentDockingBayRow(out var currentDockingBay);
return AetheriaRuntimeInventoryDropdownSurfaceBuilder.Compose(
return AetheriaRuntimeInventoryDropdownSurfaceBuilder.Build(
Title?.text ?? "None",
entityOptions,
hasDockingBay,