aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-09-06 02:35:06 +0200
committernea <nea@nea.moe>2023-09-06 02:35:06 +0200
commit12292270511d5d37e9c21307fb1e09d400ae1ff4 (patch)
tree5ec91508b0b088f560c142291e1b1a9d7c281d21 /src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt
parentd29f886e25d7376c6942e7dbe6c305f601e2768d (diff)
downloadfirmament-12292270511d5d37e9c21307fb1e09d400ae1ff4.tar.gz
firmament-12292270511d5d37e9c21307fb1e09d400ae1ff4.tar.bz2
firmament-12292270511d5d37e9c21307fb1e09d400ae1ff4.zip
Add ability to remove item groupings
Item groups prevent batch rendering from being effective, thereby reducing performance.
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt b/src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt
index 8e05632..d2c4d69 100644
--- a/src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt
+++ b/src/main/kotlin/moe/nea/firmament/gui/config/ManagedConfig.kt
@@ -158,6 +158,7 @@ abstract class ManagedConfig(override val name: String) : ManagedConfigElement()
it.add(WButton(Text.literal("←")).also {
it.setOnClick {
if (parent != null) {
+ save()
setScreenLater(parent)
} else {
AllConfigsGui.showAllGuis()
@@ -182,6 +183,7 @@ abstract class ManagedConfig(override val name: String) : ManagedConfigElement()
override fun close() {
latestGuiAppender = null
+ save()
MC.screen = parent
}
}