From 22e5340c9e0fa95909de59d731790192016c725f Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Tue, 14 May 2024 15:40:00 +0100 Subject: [PATCH] fix: fix textfield popup for checkbox task creation not rendering --- .../ftb/mods/ftbquests/client/GuiProviders.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/dev/ftb/mods/ftbquests/client/GuiProviders.java b/common/src/main/java/dev/ftb/mods/ftbquests/client/GuiProviders.java index 1a2fa080..0d9abbc0 100644 --- a/common/src/main/java/dev/ftb/mods/ftbquests/client/GuiProviders.java +++ b/common/src/main/java/dev/ftb/mods/ftbquests/client/GuiProviders.java @@ -67,14 +67,7 @@ public static TaskType.GuiProvider defaultTaskGuiProvider(TaskType.Provider prov overlay.setExtraZlevel(300); panel.getGui().pushModalPanel(overlay); } else { - ConfigGroup group = new ConfigGroup(FTBQuestsAPI.MOD_ID, accepted -> { - if (accepted) { - callback.accept(task); - } - panel.run(); - }); - task.fillConfigGroup(task.createSubGroup(group)); - new EditConfigScreen(group).openGui(); + openSetupGui(panel.getGui(), callback, task); } }; } @@ -96,15 +89,15 @@ public static void setTaskGuiProviders() { StringConfig c = new StringConfig(null); c.setValue(""); - EditStringConfigOverlay overlay = new EditStringConfigOverlay<>(panel, c, accepted -> { + EditStringConfigOverlay overlay = new EditStringConfigOverlay<>(panel.getGui(), c, accepted -> { if (accepted) { CheckmarkTask checkmarkTask = new CheckmarkTask(0L, quest); checkmarkTask.setRawTitle(c.getValue()); callback.accept(checkmarkTask); } panel.run(); - }, TaskTypes.CHECKMARK.getDisplayName()) - .atPosition(panel.width / 3, panel.height + 5); + }, TaskTypes.CHECKMARK.getDisplayName()).atMousePosition(); + overlay.setExtraZlevel(300); panel.getGui().pushModalPanel(overlay); });