Skip to content

Commit

Permalink
Give the shape button a width to work around Noxcrew/sheeplib#16
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyydotp committed Nov 2, 2023
1 parent 0d329fa commit ca991a5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/kotlin/me/lucyydotp/camera/CameraDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class CameraDialog private constructor(x: Int, y: Int) : Dialog(x, y), Th
val widget = StringWidget(
Component.translatable(name, current),
Minecraft.getInstance().font,
).atBottom(0).also { it.width = TEXT_WIDTH }
).atBottom(0).also { it.width = TEXT_WIDTH }
SliderWidget(SLIDER_WIDTH, min, max, this@CameraDialog, current) {
onSet(it)
widget.message = Component.translatable(name, it)
Expand All @@ -77,11 +77,13 @@ public class CameraDialog private constructor(x: Int, y: Int) : Dialog(x, y), Th
) { CameraMod.fogFalloff = it / 100f }

ToggleButton.enum<FogShape>(
"screenshot-settings-mod.fog.shape",
Component.translatable("screenshot-settings-mod.fog.shape"),
"screenshot-settings-mod.fog.shape",
Component.translatable("screenshot-settings-mod.fog.shape"),
this@CameraDialog,
) {
CameraMod.fogShape = it
}.atBottom(0, 2)
// https://github.com/Noxcrew/sheeplib/issues/16
.width = SLIDER_WIDTH
}
}

0 comments on commit ca991a5

Please sign in to comment.