Repository navigation
Make primary-action target visibility protection opt-in - #328
Open
Guffawaffle wants to merge 6 commits into
Open
Guffawaffle wants to merge 6 commits into
Guffawaffle wants to merge 6 commits into
Conversation
netniV
requested changes
Oct 15, 2026
netniV
left a comment
Collaborator
There was a problem hiding this comment.
I feel I'm gonna get annoyed by this change as I've been using it like this for a long time to make sure something goes ;-)
Comment on lines
+1290
to
+1296
| template <typename T> bool IsObjectViewerShowing(T* widget) | ||
| { | ||
| auto* visibility = widget ? widget->_visibilityController : nullptr; | ||
| auto* parent = widget ? widget->Parent : nullptr; | ||
| return visibility && (visibility->_state == VisibilityState::Visible || visibility->_state == VisibilityState::Show) | ||
| && parent && parent->IsShowing; | ||
| } |
Collaborator
There was a problem hiding this comment.
I'm sure there's CanHideViewers() for this functonality?
|
|
||
| spdlog::info("have armada? {}, State {}", (armada_widget ? "Yes" : "No"), (int)armada_state); | ||
| if (armada_widget && (armada_state == VisibilityState::Visible || armada_state == VisibilityState::Show)) { | ||
| if (IsObjectViewerShowing(armada_widget)) { |
Collaborator
There was a problem hiding this comment.
The function doesn't work here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The primary-action shortcut can send a fleet to the last target's cached coordinates after its popup is dismissed. Some players also use this behavior to repeat a command.
Add
[control] primary_requires_visible_target = false. The default preserves existing commands and retry behavior. Set it totrueto require a visible target viewer and its parent, or an active visible Set Course control for movement, and cancel the pending retry on Escape. Secondary-only actions keep their existing checks, and Armada joining retains its existing visibility-state decision in both modes.Share the viewer visibility predicate with
CanHideViewers()and the hide helpers. Include the native star-viewer base binding and Boolean unboxing correction needed for the opt-in parent checks.Validation: Windows release build and local actual-source fixtures for both option modes, Armada joining, secondary actions, movement visibility, and boxed parent visibility. The corresponding downstream protection has prior gameplay coverage; this revised upstream artifact has not been separately game-tested. Windows and both macOS architecture builds are checked by CI.