diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt b/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt index 5979fa0..9654e04 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/ConfigScreen.kt @@ -5,6 +5,7 @@ import fr.username404.snowygui.gui.elements.ClickBox import fr.username404.snowygui.gui.elements.ClickBox.Companion.sortAlphabetically import fr.username404.snowygui.gui.feature.* import fr.username404.snowygui.utils.FontUtil +import me.shedaniel.clothconfig2.gui.entries.StringListListEntry import net.minecraft.client.gui.GuiGraphics import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.Component @@ -74,7 +75,9 @@ val SnowyConfigScreen: Screen = object: Screen(translationComponent) { }.build()).addEntry(startStrList( Category.MACROS.box.name, macrosButtons.getTitleCommand() - ).setInsertInFront(false).setDefaultValue(Configuration.foundMacros.getTitleCommand()).setCellErrorSupplier { cell -> + ).setCreateNewInstance { + entry -> StringListListEntry.StringListCell("ExampleMacro: say hello", entry) + }.setInsertInFront(false).setDefaultValue(Configuration.foundMacros.getTitleCommand()).setCellErrorSupplier { cell -> with(cell.split(":")) { supplyComponent( when {