use of org.moon.moonfix.config.widgets.ConfigListWidget in project Moonfix by Kingdom-of-Moon.
the class ConfigScreen method init.
@Override
protected void init() {
super.init();
this.addDrawableChild(new ButtonWidget(this.width / 2 - 154, this.height - 29, 150, 20, new TranslatableText("gui.cancel"), (buttonWidgetx) -> {
ConfigManager.discardConfig();
this.client.setScreen(parentScreen);
}));
this.addDrawableChild(new ButtonWidget(this.width / 2 + 4, this.height - 29, 150, 20, new TranslatableText("gui.done"), (buttonWidgetx) -> {
ConfigManager.applyConfig();
ConfigManager.saveConfig();
this.client.setScreen(parentScreen);
}));
this.configListWidget = new ConfigListWidget(this, this.client);
this.addSelectableChild(this.configListWidget);
// generate configs...
configListWidget.addEntries(Config.values());
}
Aggregations