BepInEx.ConfigurationManager icon indicating copy to clipboard operation
BepInEx.ConfigurationManager copied to clipboard

Validate values on lost focus instead of immediately / Typing in floats is difficult and using - characters can throw up errors.

Open krypto5863 opened this issue 4 years ago • 3 comments

ConfigurationManager seems to really dislike it when you try to type in 0 after values higher than 0 in a decimal position. It also seems to really dislike typing in zeros before them in whole number places. Makes the configurations kinda wonky to use.

Also, trying to type a - sign anywhere but the start of the number throws up a good chunk of red in the console.

Hope this is fixed, configmanager is really handy for development...

krypto5863 avatar Dec 30 '20 02:12 krypto5863

This is because the input is validated after every key press to make development easier. I didn't bother to improve it since most of the time the slider is used (you need to specify value range to make it show up though). To fix this the input would have to be validated after focus is lost.

ManlyMarco avatar Dec 31 '20 19:12 ManlyMarco

So after pressing enter or clicking another box? I'd personally prefer this implementation. Apply changes when changes are complete and all that.

krypto5863 avatar Dec 31 '20 20:12 krypto5863

I was also looking to see if this was an option - right now all string configs kind of need a debounce timer added to them to prevent them from firing off with every letter the user types into the config. It would be very useful if there were two separate events similar to html's change event and input event so you would have the option of both/either live events and/or a single final event.

Californ1a avatar Apr 16 '24 19:04 Californ1a