Skip to content

Fix Advanced Module offset reset on parameter refresh#126

Open
havokentity wants to merge 1 commit into
Tayx94:masterfrom
havokentity:fix/advanced-module-offset
Open

Fix Advanced Module offset reset on parameter refresh#126
havokentity wants to merge 1 commit into
Tayx94:masterfrom
havokentity:fix/advanced-module-offset

Conversation

@havokentity
Copy link
Copy Markdown

@havokentity havokentity commented Apr 17, 2026

Summary

  • m_advancedModuleOffset was only applied via the AdvancedModulePosition setter. Three other call sites passed Vector2.zero, wiping the configured X/Y offset on state toggles, focus changes, and parameter refreshes — so the Advanced Module would appear at the correct position on boot but snap back to the corner origin on any internal event.
  • Added a public AdvancedModuleOffset getter on GraphyManager (the field was private with no accessor) and replaced the three hardcoded Vector2.zero arguments with the serialized offset.

Changes

  • Runtime/GraphyManager.cs — add AdvancedModuleOffset getter; fix SetModulePosition(ModuleType.ADVANCED, …).
  • Runtime/Advanced/G_AdvancedData.cs — fix UpdateParameters() and RefreshParameters().

Test plan

  • Set m_advancedModuleOffset to a non-zero value in the inspector.
  • Enter Play mode — verify the Advanced Module renders at the configured offset.
  • Toggle module state (F1 by default) — position retained.
  • Change module mode via SetModuleMode from a script — position retained.
  • Alt-tab out and back (focus loss / gain) — position retained.
  • Confirm FPS / RAM / Audio offsets (driven by m_graphModuleOffset) continue to behave correctly — their code path was not touched.

The serialized m_advancedModuleOffset was only applied via the
AdvancedModulePosition setter. Three other call sites passed
Vector2.zero, so any internal event (state toggles, focus changes,
parameter refreshes) would wipe the configured X/Y offset and snap
the Advanced Module back to the corner origin.

- Add public AdvancedModuleOffset getter on GraphyManager.
- Replace Vector2.zero with the serialized offset in:
    * GraphyManager.SetModulePosition(ModuleType.ADVANCED, ...)
    * G_AdvancedData.UpdateParameters()
    * G_AdvancedData.RefreshParameters()
@havokentity havokentity force-pushed the fix/advanced-module-offset branch from aaddeba to 90f2e76 Compare April 17, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant