Can I use your config code in my mod?
Closed this issue · 2 comments
I'm making a mod that uses nested lists in its configuration system, similar to AutoReconnect; but I have no idea how to make a config screen for that myself.
Can I use your config code in my mod?
If/when my mod is released, due credit will be given
Sure, no problem, I mean it's mostly code from cloth config I'm using, little to no contribution or effort from my side putting that together to make my config. Only problem with nested lists (or in my case list of objects, but list of lists might work similarly), was to figure out how it's possible at all, so I looked into the code, the hierarchy of all the widgets and eventually found the MultiElementListEntry
which does exactly what I was looking for and eventually I got it to work too.
Be warned tho, it's marked with @Internal
so it's actually not meant for production use and I already found an issue related to it which is that dropdowns don't work inside them. Quite unfortunate for me, since it would've been very useful for me, because many users have been struggling with what to enter for the name in the AutoMessages part and being able to select from a given list would've been so useful, but sadly it doesn't work :') Other than that it seems to work fine tho the way I'm currently using it.
Is that mod you're talking about on your github? I could take a look at it and maybe we can toss around some ideas on how to design the config, I'd be happy to help :)
Sure, no problem, I mean it's mostly code from cloth config I'm using, little to no contribution or effort from my side putting that together to make my config. Only problem with nested lists (or in my case list of objects, but list of lists might work similarly), was to figure out how it's possible at all, so I looked into the code, the hierarchy of all the widgets and eventually found the
MultiElementListEntry
which does exactly what I was looking for and eventually I got it to work too. Be warned tho, it's marked with@Internal
so it's actually not meant for production use and I already found an issue related to it which is that dropdowns don't work inside them. Quite unfortunate for me, since it would've been very useful for me, because many users have been struggling with what to enter for the name in the AutoMessages part and being able to select from a given list would've been so useful, but sadly it doesn't work :') Other than that it seems to work fine tho the way I'm currently using it. Is that mod you're talking about on your github? I could take a look at it and maybe we can toss around some ideas on how to design the config, I'd be happy to help :)
It's not on my GitHub currently, but I'll let you know when it is :)
Thank you so much