BepInEx / BepInEx.ConfigurationManager

Plugin configuration manager for BepInEx
https://www.patreon.com/ManlyMarco
GNU Lesser General Public License v3.0
227 stars 54 forks source link

ConfigEntry<Color> suggestion #76

Closed RTMecha closed 7 months ago

RTMecha commented 9 months ago

The ConfigEntry configs only use sliders. It would be nice if there was an inputfield for editing the color's hex code.

ManlyMarco commented 9 months ago

Any ideas on how to do the UI to allow both sliders and hex value edits?

RTMecha commented 8 months ago

image

Pretty much what I'm thinking

redseiko commented 8 months ago

Any ideas on how to do the UI to allow both sliders and hex value edits?

I created a Harmony plugin that mods ConfigurationManager to add some custom handing for the default drawers built in. https://github.com/redseiko/ComfyMods/blob/main/Configula/Config/Drawers/ColorSettingField.cs

image

Other changes in the mod include invalid float value handling and enabling wordWrap on string-type ConfigEntry text fields.

I'd be happy to see any of these incorporated into the official ConfigurationManager.

ManlyMarco commented 8 months ago

If you could make a PR with the changes then I would definitely merge it.

redseiko commented 8 months ago

Uh I'll give it a shot, it might take awhile since my scope was limited to Valheim modding.

Are there any guidelines/styling/etc to read and follow for PRs?

ManlyMarco commented 8 months ago

It shouldn't be all that different, it doesn't look like it would need to use anything game-specific from the screenshot.

Are there any guidelines/styling/etc to read and follow for PRs?

Not really, just the usual. Try to follow the current code style and avoid changing more than necessary.