-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
tech-debtCleanup, refactor, or restructuring of code/assetsCleanup, refactor, or restructuring of code/assetsuiUI menus, HUD, game over screen changes.UI menus, HUD, game over screen changes.
Milestone
Description
Why
TouchUIBindingsis a bindings class responsible for wiring UI elements to input events. It currently also contains a factory methodCreateCloseButtonthat constructs and styles a button GameObject at runtime.- Factory/construction logic does not belong in a bindings class. This violates single responsibility and makes
TouchUIBindingsharder to test and extend. - Flagged during the code audit of feat/android-touch-controls.
Proposed Change
- Extract
CreateCloseButtoninto a dedicatedCloseButtonFactory(or similar small utility) responsible solely for constructing the button GameObject TouchUIBindingscalls the factory rather than building the button inline- No behaviour change — this is a pure structural refactor
Acceptance Criteria
-
TouchUIBindingscontains no GameObject construction or styling logic - Close button construction lives in its own class with a clear, single responsibility
-
TouchUIBindingsTestspasses unchanged - Upgrade panel close button still appears and functions correctly in MainPrototype
Testing / Validation
- Manual:
- Open MainPrototype, open upgrade panel, confirm close button renders and dismisses the panel
- Automated:
- EditMode: TouchUIBindingsTests (must stay green)
- PlayMode: N/A
Context (Optional)
- Related: refactor(player): split PlayerController — extract repair sensor and weapon swap handler #143 (PlayerController refactor — similar single-responsibility cleanup pass)
- Flagged during audit of feat/android-touch-controls
- Milestone: P6 — Prototype Lock & Polish
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
tech-debtCleanup, refactor, or restructuring of code/assetsCleanup, refactor, or restructuring of code/assetsuiUI menus, HUD, game over screen changes.UI menus, HUD, game over screen changes.