cloth-config
cloth-config copied to clipboard
Suggestion: Text input improvements
Quite a few mods use specialized strings (like identifiers) in some way in their configuration, but the current string text fields are a bit lacking for that use. A few improvements could be made to make that easier for both the developer and the user.
- String validation: being able to supply a regular expression or a set of valid strings could help a lot with preventing invalid input.
- Suggestions: if a set of valid strings is supplied, the text field could list suggestions based on what the user started typing.
- String sets: when building a string list, Cloth should offer the option of using a Set instead to prevent duplicate values.
Helper methods could also be offered for the special case of Identifier configs. A method could take a Registry and configure all the above based on the registered values.
- String Validation: It is already doable in fields except lists, I will extends more support for lists
- Suggestions: This one is a tricky one, as this could potentially be hard to understand by the user. Implementing the text field like a combobox might be a better solution
- String Sets: Absolutely doable
String Validation & Suggestions (Dropdown Menus) are now done
Are keyshortcut inputs currently supported? I couldn't find any relatable method call inside of ConfigEntryBuilder.
Can you elaborate? What do you mean by key shortcuts?
Like the ones under the Control settings. Where you left click the button and press a key on your keyboard.
They are done in v2.5.1
Wow, awesome!
This is a message that was created a long time ago.