feat: Add height setting to storage overlay
This commit is contained in:
@@ -28,6 +28,7 @@ object StorageOverlay : FirmamentFeature {
|
||||
object TConfig : ManagedConfig(identifier, Category.INVENTORY) {
|
||||
val alwaysReplace by toggle("always-replace") { true }
|
||||
val columns by integer("rows", 1, 10) { 3 }
|
||||
val height by integer("height", 80, 3000) { 3 * 18 * 6 }
|
||||
val scrollSpeed by integer("scroll-speed", 1, 50) { 10 }
|
||||
val inverseScroll by toggle("inverse-scroll") { false }
|
||||
val padding by integer("padding", 1, 20) { 5 }
|
||||
|
||||
@@ -50,7 +50,9 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
|
||||
val innerScrollPanelWidth = PAGE_WIDTH * pageWidthCount + (pageWidthCount - 1) * PADDING
|
||||
val overviewWidth = innerScrollPanelWidth + 3 * PADDING + SCROLL_BAR_WIDTH
|
||||
val x = width / 2 - overviewWidth / 2
|
||||
val overviewHeight = minOf(3 * 18 * 6, height - PLAYER_HEIGHT - minOf(80, height / 10))
|
||||
val overviewHeight = minOf(
|
||||
height - PLAYER_HEIGHT - minOf(80, height / 10),
|
||||
StorageOverlay.TConfig.height)
|
||||
val innerScrollPanelHeight = overviewHeight - PADDING * 2
|
||||
val y = height / 2 - (overviewHeight + PLAYER_HEIGHT) / 2
|
||||
val playerX = width / 2 - PLAYER_WIDTH / 2
|
||||
|
||||
Reference in New Issue
Block a user