Add per-controller-type body silhouette to GCKControllerView#3
Draft
Add per-controller-type body silhouette to GCKControllerView#3
Conversation
Agent-Logs-Url: https://github.com/0xWDG/GameControllerKit/sessions/8cef3c0f-6404-4084-b806-c430b9f7c5b0 Co-authored-by: 0xWDG <1290461+0xWDG@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement improved GCKControllerView for dynamic controller UI
Improve GCKControllerView to adapt UI dynamically by controller type
Apr 1, 2026
Agent-Logs-Url: https://github.com/0xWDG/GameControllerKit/sessions/ac62bbc3-44a3-4341-9a9a-6b226ff4b2e1 Co-authored-by: 0xWDG <1290461+0xWDG@users.noreply.github.com>
Copilot
AI
changed the title
Improve GCKControllerView to adapt UI dynamically by controller type
Add per-controller-type body silhouette to GCKControllerView
Apr 1, 2026
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.
GCKControllerViewshowed no visual representation of the physical controller form factor. This PR adds SwiftUIShape-based silhouettes that render the appropriate controller outline based on the connected type.New:
GCKControllerShape.swiftGCKPlayStationControllerShape— bezier path outline for DualSense/DualShock (wide flat top, symmetrical bottom grips, arch gap between them)GCKXboxControllerShape— similar structure with a gently arched top and rounder grips matching Xbox proportionsGCKSiriRemoteShape— tall pill (roundedRectpath)GCKControllerShapeView— public composite view; switches onGCKControllerType?, renders the matching stroked shape, falls back to thegamecontrollerSF Symbol for generic/unknown controllersAll shapes are designed in a normalised coordinate space (e.g. 200×130) and scale to any
CGRect, withColor.primarystroke for automatic light/dark mode support.Updated:
GCKControllerView.swiftEmbeds
GCKControllerShapeViewbetween the controller type label and the shoulder buttons:Because
controllerTypeis@Publishedon the@EnvironmentObject, the silhouette updates reactively on connect/disconnect without additional wiring.Also fixed a pre-existing typo in
GCKControllerType.description:"Genric"→"Generic".