Cloth Config
  • Introduction to Cloth Config
  • Frequently Asked Questions
  • Setup Cloth Config
    • Setup with Fabric
    • Setup with Forge
  • Using Cloth Config
    • Creating a Config Screen
    • Saving the Config
    • Creating a Config Category
    • Creating a Config Option
    • Building the Config Screen
  • Advanced
    • Creating a Dropdown Menu
    • ModMenu Integration
  • Auto Config
    • Introduction to Auto Config 1u
    • Setup with Gradle
    • Creating a Config Class
    • Registering the Config
    • Reading the Config
    • Generating a Cloth Config Screen
    • Annotations
    • Post-Validation
    • Partitioning the Config
    • Custom Gui Handlers
Powered by GitBook
On this page
  1. Using Cloth Config

Creating a Config Screen

PreviousSetup with ForgeNextSaving the Config

Last updated 4 years ago

Was this helpful?

CtrlK

Was this helpful?

Call ConfigBuilder.create() to create a new config builder, from there you can set the background, create new categories, disable smooth scrolling, etc.

The title will be automatically translated to the language the user selects, make sure you localize the language in the language file.

Parent Screen is the screen when the user clicks done or cancel, you should put the current screen as the parent screen.

ConfigBuilder builder = ConfigBuilder.create()
        .setParentScreen(parent)
        .setTitle(new TranslatableText("title.examplemod.config"));

You have to create a new config screen builder every single time you open the config menu.