Summary
Persist HUD element positions between sessions so player layout customizations are preserved across launches.
Background
HudDragManager (src/ui/hudDragManager.py) tracks per-element drag offsets at runtime, but these are never written to disk. On every launch the layout resets to defaults regardless of any repositioning the player did in the previous session.
Requirements
- In
HudDragManager, add save() and load() methods that read/write element offsets to config.yml using the existing Config.saveWindowSize() pattern (key-per-element, e.g. hudOffset_hotbar_x, hudOffset_hotbar_y)
- Call
hudDragManager.save() from Roam.quitApplication() alongside the existing config.saveWindowSize() call
- Call
hudDragManager.load() during world screen initialization, after HUD elements are registered with the drag manager
- If no saved offsets exist for an element, fall back to its default position (current behaviour)
- Saved offsets must be clamped through the existing
clampPosition() logic on load to handle resolution changes between sessions
Acceptance Criteria
Summary
Persist HUD element positions between sessions so player layout customizations are preserved across launches.
Background
HudDragManager(src/ui/hudDragManager.py) tracks per-element drag offsets at runtime, but these are never written to disk. On every launch the layout resets to defaults regardless of any repositioning the player did in the previous session.Requirements
HudDragManager, addsave()andload()methods that read/write element offsets toconfig.ymlusing the existingConfig.saveWindowSize()pattern (key-per-element, e.g.hudOffset_hotbar_x,hudOffset_hotbar_y)hudDragManager.save()fromRoam.quitApplication()alongside the existingconfig.saveWindowSize()callhudDragManager.load()during world screen initialization, after HUD elements are registered with the drag managerclampPosition()logic on load to handle resolution changes between sessionsAcceptance Criteria
config.ymlon game exit