Cheos137 / ArmorpointsPlusplus

A light-weight mod overhauling vanilla ui components
https://modrinth.com/mod/armorpoints
MIT License
2 stars 2 forks source link

[Feature Request]: use value 'auto' instead of enabling/disabling custom text locations #86

Open Cheos137 opened 8 months ago

Cheos137 commented 8 months ago

Is there an existing issue for this?

Are you using the latest version currently available?

Description

use a (default) special value 'auto' in various config settings to indicate the typically used value instead of having a toggle to enable/disable x/y overrides for text components

Solution

implement custom state values for some configs (null might be viable if we use objects only and don't rely on primitives -- else either magic values or a stateful config value adapter (might be difficult to implement unless we switch everything to be primitive string internally which would mess quite a lot with our json5 system on fabric... otherwise this would need bi-type value adapters which could be possible))

Alternatives

remain on using the toggle

Additional Context

this feature would be preferable to the current implementation specifically in 3.2 where custom ui configs provided by resourcepacks should be able to specify their own default component locations, thus making it a lot more intuitive to rely on a special value 'auto' instead of toggling an override. this option would make the entire config feel more fluent, too.

Cheos137 commented 8 months ago

relates to #70