Skip to content

Commit

Permalink
fix: fix textfield popup for checkbox task creation not rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed May 14, 2024
1 parent 56bf74b commit 22e5340
Showing 1 changed file with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
}
Expand All @@ -96,15 +89,15 @@ public static void setTaskGuiProviders() {
StringConfig c = new StringConfig(null);
c.setValue("");

EditStringConfigOverlay<String> overlay = new EditStringConfigOverlay<>(panel, c, accepted -> {
EditStringConfigOverlay<String> 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);
});

Expand Down

0 comments on commit 22e5340

Please sign in to comment.