Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(layouts): override layout anchor points with user settings #108

Merged
merged 5 commits into from
Jan 12, 2024

Conversation

ceejbot
Copy link
Owner

@ceejbot ceejbot commented Jan 12, 2024

Players can now choose to override a layout's chosen anchor point
with their own preferred HUD location. This won't work well for
every layout, but players can decide that for themselves.

Added the new option to the settings struct and MCM config. It's an
enum that allows players to choose from the current list of anchor
names. Added new translation strings to support the config.

apply_settings() now refreshes the layout to pick up any
location changes.

Added a test to ensure that the setting is respected by the
anchor_point() function if set. This bottleneck ensures that
flattened layouts get the overridden location automatically.
To support the test, added a way to specific a refresh-from file
for the settings lazy static. The new convenience functions to
Layout that match on its variants are also there to support tests.

Players can now choose to override a layout's chosen anchor point
with their own preferred HUD location. This won't work well for
every layout, but players can decide that for themselves.

Added the new option to the settings struct and MCM config.
Added new translation strings to support the config.

Added a test to ensure that the setting is respected by the
anchor_point() function if set. This bottleneck ensures that
flattened layouts get the overridden location automatically.
To support the test, added a way to specific a refresh-from file
for the settings lazy static. The new convenience functions to
Layout that match on its variants are also there to support tests.

Next step is trying out the new menu option in the game and making
sure it looks right.
Tweaked UI text a bit.
Turn settings .ini ints into named anchors, not strings (doh).
Refresh the layout after a settings change to pick up any
anchor location changes.
@ceejbot ceejbot merged commit 901629d into latest Jan 12, 2024
1 check passed
@ceejbot ceejbot deleted the ceej/settings-for-anchor branch January 12, 2024 00:16
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.

None yet

1 participant