Skip to content

Commit 54287ae

Browse files
committed
Only show balloon language config when Talk Balloons is enabled
1 parent dd8c37b commit 54287ae

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/main/kotlin/xyz/bluspring/unitytranslate/client/gui/UTConfigScreen.kt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -439,15 +439,17 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
439439

440440
y += 30
441441

442-
addRenderableWidget(Button.builder(Component.translatable("unitytranslate.set_balloon_language")) {
443-
Minecraft.getInstance().setScreen(LanguageSelectScreen(this@UTConfigSubScreen, LanguageSelectType.BALLOON))
444-
}
445-
.pos(this.width / 2 - (Button.DEFAULT_WIDTH / 2), y)
446-
.build()
447-
.apply {
448-
(this as ScrollableWidget).updateInitialPosition()
442+
if (UnityTranslate.instance.proxy.isModLoaded("talk_balloons")) {
443+
addRenderableWidget(Button.builder(Component.translatable("unitytranslate.set_balloon_language")) {
444+
Minecraft.getInstance().setScreen(LanguageSelectScreen(this@UTConfigSubScreen, LanguageSelectType.BALLOON))
449445
}
450-
)
446+
.pos(this.width / 2 - (Button.DEFAULT_WIDTH / 2), y)
447+
.build()
448+
.apply {
449+
(this as ScrollableWidget).updateInitialPosition()
450+
}
451+
)
452+
}
451453

452454
y += 30
453455
}

0 commit comments

Comments
 (0)