Make the sector governor cell clickable (Enter assigns, Backspace unassigns) #1

Merged
alex19EP merged 1 commit from oasis1701/StellarisAccess:fix/sector-governor-enter into main 2026-11-17 11:41:38 +03:00
Contributor

On the Colonies and Sectors screen, a sector's governor cell only read its
text. Enter did nothing, so an empty governor slot could not be filled from
the keyboard.

  • Enter on the governor cell left-clicks the portrait's
    assign_character_button, which opens the leader picker for that sector.
  • Backspace right-clicks it, which unassigns the governor. Elsewhere on the
    screen Backspace still goes to the game.
  • The cell's value is live, so the new governor, or the empty slot, is
    spoken when it changes.
  • docs/testing-guide.md describes both keys, and deps_generated picks up
    the right-click call.

The click bindings were read from the Steam v4.5.4 listing. The
CEmpireViewSectorEntry constructor gives the card a left binding that calls
CAssignLeaderWidgetView::Show for the sector, and a right binding that posts
the same command type as CFleetViewEntry::OnUnassignLeader. Without the
PDB-backed project, addresses were mapped through
tools/addrgen/vt_matches_pdb.json. The code comment cites v4.5.2 addresses
for the named functions and Steam v4.5.4 addresses for the two lambdas.

Tested in game on Steam v4.5.4. Enter on an empty slot opened the picker
and the chosen leader became governor, and Backspace removed the governor.
just test passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EZNZEn1sFjjcuZcwAe9Mm9

On the Colonies and Sectors screen, a sector's governor cell only read its text. Enter did nothing, so an empty governor slot could not be filled from the keyboard. - Enter on the governor cell left-clicks the portrait's assign_character_button, which opens the leader picker for that sector. - Backspace right-clicks it, which unassigns the governor. Elsewhere on the screen Backspace still goes to the game. - The cell's value is live, so the new governor, or the empty slot, is spoken when it changes. - docs/testing-guide.md describes both keys, and deps_generated picks up the right-click call. The click bindings were read from the Steam v4.5.4 listing. The CEmpireViewSectorEntry constructor gives the card a left binding that calls CAssignLeaderWidgetView::Show for the sector, and a right binding that posts the same command type as CFleetViewEntry::OnUnassignLeader. Without the PDB-backed project, addresses were mapped through tools/addrgen/vt_matches_pdb.json. The code comment cites v4.5.2 addresses for the named functions and Steam v4.5.4 addresses for the two lambdas. Tested in game on Steam v4.5.4. Enter on an empty slot opened the picker and the chosen leader became governor, and Backspace removed the governor. just test passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EZNZEn1sFjjcuZcwAe9Mm9
On the Colonies and Sectors screen the governor cell only read its text,
so Enter did nothing and an empty governor slot could not be filled from
the keyboard. Enter now left-clicks the card's assign_character_button,
which opens the leader picker for that sector, and Backspace right-clicks
it, which unassigns the governor, as on the fleet panel's leader slot and
the planet view's governor card. The value is live, so the new governor
or the empty slot is heard when it changes. Backspace elsewhere on the
screen still reaches main_bottom's home_button.

The bindings were read on the Steam v4.5.4 listing, with addresses mapped
through vt_matches_pdb.json. The CEmpireViewSectorEntry ctor gives the
card a left binding that calls CAssignLeaderWidgetView::Show for the
sector (leader location 9) and a right binding that posts the same
command type as CFleetViewEntry::OnUnassignLeader. Gate colonies picks up
the right-click call (deps_generated). Verified in game on Steam v4.5.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZNZEn1sFjjcuZcwAe9Mm9
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alex19EP/StellarisAccess!1
No description provided.