aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-06-23 01:32:02 +0200
committerLinnea Gräf <nea@nea.moe>2025-06-23 01:41:20 +0200
commit4515ce8367bcc628464001455c203a09a399cd16 (patch)
tree332fedf631d36b56eb159c92ce41f0638f014172 /src
parentc1b5fd7f8e36ed331ec1186e17ecfa574fc487f2 (diff)
downloadFirmament-4515ce8367bcc628464001455c203a09a399cd16.tar.gz
Firmament-4515ce8367bcc628464001455c203a09a399cd16.tar.bz2
Firmament-4515ce8367bcc628464001455c203a09a399cd16.zip
feat: Moved storage search to be next to inventory
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt18
-rw-r--r--src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.pngbin4766 -> 745 bytes
-rw-r--r--src/main/resources/resourcepacks/transparent_overlay/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.pngbin624 -> 768 bytes
3 files changed, 13 insertions, 5 deletions
diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
index f4dc458..f1cbea7 100644
--- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
+++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
@@ -54,9 +54,11 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
val MAIN_INVENTORY_Y = 9
val SCROLL_BAR_WIDTH = 8
val SCROLL_BAR_HEIGHT = 16
+ val CONTROL_X_INSET = 3
+ val CONTROL_Y_INSET = 5
val CONTROL_WIDTH = 70
- val CONTROL_BACKGROUND_WIDTH = CONTROL_WIDTH + PLAYER_Y_INSET
- val CONTROL_HEIGHT = 100
+ val CONTROL_BACKGROUND_WIDTH = CONTROL_WIDTH + CONTROL_X_INSET + 1
+ val CONTROL_HEIGHT = 50
}
var isExiting: Boolean = false
@@ -75,8 +77,8 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
val y = height / 2 - (overviewHeight + PLAYER_HEIGHT) / 2
val playerX = width / 2 - PLAYER_WIDTH / 2
val playerY = y + overviewHeight - PLAYER_Y_INSET
- val controlX = x - CONTROL_WIDTH
- val controlY = y + overviewHeight / 2 - CONTROL_HEIGHT / 2
+ val controlX = playerX - CONTROL_WIDTH + CONTROL_X_INSET
+ val controlY = playerY - CONTROL_Y_INSET
val totalWidth = overviewWidth
val totalHeight = overviewHeight - PLAYER_Y_INSET + PLAYER_HEIGHT
}
@@ -489,7 +491,13 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
val name = page.defaultName()
val pageHeight = inv.rows * SLOT_SIZE + 8 + textRenderer.fontHeight
if (slots != null && StorageOverlay.TConfig.outlineActiveStoragePage)
- context.drawBorder(x, y + 3 + textRenderer.fontHeight, PAGE_WIDTH, inv.rows * SLOT_SIZE + 4, 0xFFFF00FF.toInt())
+ context.drawBorder(
+ x,
+ y + 3 + textRenderer.fontHeight,
+ PAGE_WIDTH,
+ inv.rows * SLOT_SIZE + 4,
+ 0xFFFF00FF.toInt()
+ )
context.drawText(
textRenderer, Text.literal(name), x + 6, y + 3,
if (slots == null) 0xFFFFFFFF.toInt() else 0xFFFFFF00.toInt(), true
diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png
index 97dd0ea..c897840 100644
--- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png
+++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png
Binary files differ
diff --git a/src/main/resources/resourcepacks/transparent_overlay/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png b/src/main/resources/resourcepacks/transparent_overlay/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png
index d4852d8..10d41dd 100644
--- a/src/main/resources/resourcepacks/transparent_overlay/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png
+++ b/src/main/resources/resourcepacks/transparent_overlay/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png
Binary files differ