Skip to content

Fullscreen UI overhaul: single windowed workspace with live pawn preview#60

Open
feldoh wants to merge 1 commit into
mainfrom
claude/thirsty-blackwell-de481b
Open

Fullscreen UI overhaul: single windowed workspace with live pawn preview#60
feldoh wants to merge 1 commit into
mainfrom
claude/thirsty-blackwell-de481b

Conversation

@feldoh

@feldoh feldoh commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the old four-window cascade (Dialog_FactionLoadout → PresetUI → FactionEditUI → PawnKindEditUI) — where every navigation step opened, dragged, or closed another floating window — with a single fullscreen, paused workspace navigated by top tabs and a clickable breadcrumb. Addresses user feedback that the UI involves too much "dragging windows around, expanding, and scrolling."

Screens

One Dialog_TotalControl window hosts a TotalControlController that dispatches to three screens:

  • Faction View — home: global settings + preset management + faction list
  • Faction Edit — two panels: pawnkind list │ faction settings (tech level, xenotypes, spawn groups, module UI)
  • Pawn Edit — three columns: live pawn portrait │ vertical category nav │ option content

Tabs form a context hierarchy (Faction Edit enabled once a faction is selected, Pawn Edit once a pawnkind is selected); selecting a row auto-advances, and the breadcrumb navigates back. Esc steps back one screen, closing only from Home.

Live pawn preview

Pawn Edit renders a big portrait via PortraitsCache.Get, generated through the real generation pipeline so the always-active apparel/weapon/hediff patches apply edits exactly as they would for a raid. Auto-refreshes (debounced) when inline options change, plus a manual Regenerate button and rotate / headgear / clothes toggles. Throwaway preview pawns are disposed with the same save-safe pattern as the old FactionEditUI.DestroyPawns (RemoveAndDiscardPawnViaGC / PassToWorld(Discard)) on teardown and before each regeneration.

Notable internals

  • Reuses the existing Tab/DrawOverride system unchanged in Pawn Edit; the vertical category nav replaces the cramped 5-per-row tab buttons, and each category now has its own scroll position (fixes the previous shared-scroll bug).
  • TCEditContext.CurrentFaction (a small static) replaces the hidden Find.WindowStack.WindowOfType<FactionEditUI>() lookup in SpecificGearDrawer — the one spot that could silently regress material/tech-level resolution once the old window was gone.
  • BaselinerDefName moved from FactionEditUI to FactionEdit.
  • Both entry points (mod-settings button and the in-game options-page link) now open Dialog_TotalControl.
  • The four old window classes and ModCore.SettingsDialog are removed.

Backwards compatibility

  • No preset/settings XML changes — old presets load unchanged.
  • Module AddTabs / AddFactionUI contracts preserved (called exactly as before).

Build / testing

  • Compiles cleanly in Debug and Release (0 warnings/errors), csharpier-clean.
  • No remaining references to the removed classes in the main assembly or the Compatibility modules.
  • ⚠️ In-game verification still pending. Suggested pass: open from settings/options → Faction View → Faction Edit → Pawn Edit; confirm per-category scroll is independent, Apparel/Weapon material pickers resolve the correct tech level, the portrait updates on edit and on Regenerate, and no preview pawn remains in WorldPawns after closing.

🤖 Generated with Claude Code

Replace the four-window cascade (Dialog_FactionLoadout -> PresetUI ->
FactionEditUI -> PawnKindEditUI) with a single fullscreen, paused
Dialog_TotalControl driven by a TotalControlController that dispatches to
three screens via a top tab strip and a clickable breadcrumb:

- Faction View  - global settings + preset management + faction list
- Faction Edit  - two panels: pawnkind list | faction settings
- Pawn Edit     - three columns: live portrait | category nav | options

Pawn Edit reuses the existing Tab/DrawOverride system unchanged and fixes
the old shared-scroll bug with a per-category scroll position.

Live preview (PreviewPawnController + PawnPreviewWidget) renders the pawn
via PortraitsCache, generated through the real pipeline so it matches raid
output. It auto-refreshes (debounced) on edits, has rotate/regenerate/
headgear/clothes controls, and disposes throwaway pawns safely so they can
never leak into the save.

Other changes:
- TCEditContext.CurrentFaction replaces the hidden WindowOfType<FactionEditUI>()
  lookup in SpecificGearDrawer (the one place that could silently regress).
- BaselinerDefName moved from FactionEditUI to FactionEdit.
- Both entry points (mod-settings button, options-page link) now open
  Dialog_TotalControl.
- Removed the four old window classes and ModCore.SettingsDialog.

Data model and XML serialization are unchanged (old presets load as-is);
module AddTabs/AddFactionUI contracts preserved. Compiles clean in Debug and
Release. In-game verification still pending.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant