Config UI
Sometimes you need to construct the config screen yourself for things like a command, to do so you should use ResourcefulConfigScreen.make this will return a builder for creating the screen allowing you to provide a parent screen to go back to when closed, a query to automatically search, and a term collector which will allow you to take the strings an option has and provide extra terms such as providing alternative words for the same thing, by default we provide alternative words for things like color/colour meaning if you search either it will show no matter what spelling is used. Additionally a mod may wanna render a custom widget instead of a default one they can use ResourcefulConfigUI.registerElementRenderer with an Identifier and a factory, you can then reference the same identifier in your config option. With the above and buttons you may want to display widgets fitting the current config theme, to do so we recommend you use the various Widgets provided in ResourcefulConfigUI such as button there are also other widgets like selects and draggables that can be found in ResourcefulConfigOptionUI. In addition to those individual widgets we also provide a method for opening a modal in the Resourceful Config style you can do this by calling ResourcefulConfigUI.openModel(title, constructor) a constructor can be anything it just needs to take x,y,width,height and return an AbstractWidget, you can use an the provide container method in ResourcefulConfigUI to allow for multiple elements to be used in the modals.
Last updated