Skip to content

Support dynamic frame size#43

Draft
fwcd wants to merge 6 commits intomainfrom
dynamic-frame-size
Draft

Support dynamic frame size#43
fwcd wants to merge 6 commits intomainfrom
dynamic-frame-size

Conversation

@fwcd
Copy link
Owner

@fwcd fwcd commented Apr 26, 2022

Updating the window resize currently scales the entire HUD, sometimes pushing GUI elements out of the window's bounds. The PR aims to fix this by no longer assuming a constant (logical) frame size and adding the appropriate handlers for dynamically updating the HUD nodes' positions (and sizes).

  • Add FrameSizeDependent protocol for adoption by components responsible for managing a (HUD) entity's position and size
  • Update HUD elements with components implementing FrameSizeDependent:
    • Debug HUD
    • Crosshair HUD
    • Hotbar HUD
    • Pause HUD (in progress, slightly trickier due to requiring a resize of the background overlay, which is not entirely straightforward without recreating the SKShapeNode)
    • Achievement HUD
    • Control Pad HUD (iOS only)

@fwcd fwcd added the enhancement New feature or request label Apr 26, 2022
@fwcd fwcd changed the title WIP: Support dynamic frame size Support dynamic frame size Jul 13, 2022
@fwcd fwcd marked this pull request as draft July 13, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant