cloth-config icon indicating copy to clipboard operation
cloth-config copied to clipboard

Suggestion: Text input improvements

Open Pyrofab opened this issue 5 years ago • 8 comments

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.

Pyrofab avatar Aug 20 '19 18:08 Pyrofab

  • 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

shedaniel avatar Aug 20 '19 18:08 shedaniel

String Validation & Suggestions (Dropdown Menus) are now done

shedaniel avatar Oct 26 '19 05:10 shedaniel

Are keyshortcut inputs currently supported? I couldn't find any relatable method call inside of ConfigEntryBuilder.

mainrs avatar Dec 05 '19 20:12 mainrs

Can you elaborate? What do you mean by key shortcuts?

shedaniel avatar Dec 07 '19 05:12 shedaniel

Like the ones under the Control settings. Where you left click the button and press a key on your keyboard.

mainrs avatar Dec 07 '19 10:12 mainrs

They are done in v2.5.1

shedaniel avatar Dec 10 '19 12:12 shedaniel

Wow, awesome!

mainrs avatar Dec 10 '19 13:12 mainrs

This is a message that was created a long time ago.

renatocs81 avatar Apr 30 '24 08:04 renatocs81