feat: Option to choose the colour of the selected Storage Page

This commit is contained in:
jani270
2025-07-04 20:03:33 +02:00
committed by Linnea Gräf
parent 918ee6ab5b
commit 8225bde82b
3 changed files with 15 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package moe.nea.firmament.features.inventory.storageoverlay
import io.github.notenoughupdates.moulconfig.ChromaColour
import java.util.SortedMap
import kotlinx.serialization.serializer
import net.minecraft.client.gui.screen.ingame.GenericContainerScreen
@@ -28,6 +29,15 @@ object StorageOverlay : FirmamentFeature {
object TConfig : ManagedConfig(identifier, Category.INVENTORY) {
val alwaysReplace by toggle("always-replace") { true }
val outlineActiveStoragePage by toggle("outline-active-page") { false }
val outlineActiveStoragePageColour by colour("outline-active-page-colour") {
ChromaColour.fromRGB(
255,
255,
0,
0,
255
)
}
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 }

View File

@@ -499,7 +499,7 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
y + 3 + textRenderer.fontHeight,
PAGE_WIDTH,
inv.rows * SLOT_SIZE + 4,
0xFFFF00FF.toInt()
StorageOverlay.TConfig.outlineActiveStoragePageColour.getEffectiveColourRGB()
)
context.drawText(
textRenderer, Text.literal(name), x + 6, y + 3,

View File

@@ -131,6 +131,8 @@
"firmament.config.etherwarp-overlay": "Etherwarp Overlay",
"firmament.config.etherwarp-overlay.cube": "Cube",
"firmament.config.etherwarp-overlay.cube.description": "Displays a full cube on the block",
"firmament.config.etherwarp-overlay.cube-colour": "Cube Color",
"firmament.config.etherwarp-overlay.cube-colour.description": "Choose the colour of the etherwarp target block.",
"firmament.config.etherwarp-overlay.etherwarp-overlay": "Etherwarp Overlay",
"firmament.config.etherwarp-overlay.etherwarp-overlay.description": "Display an overlay that tells you what block you will warp to.",
"firmament.config.etherwarp-overlay.wireframe": "Outline",
@@ -356,6 +358,8 @@
"firmament.config.storage-overlay.margin.description": "Margin inside of the storage overview.",
"firmament.config.storage-overlay.outline-active-page": "Outline Active Page",
"firmament.config.storage-overlay.outline-active-page.description": "Put a border around the selected storage page in the storage overlay.",
"firmament.config.storage-overlay.outline-active-page-colour": "Outline Colour",
"firmament.config.storage-overlay.outline-active-page-colour.description": "Change the colour of the border around your selected storage page.",
"firmament.config.storage-overlay.padding": "Padding",
"firmament.config.storage-overlay.padding.description": "Padding inside of the storage overview.",
"firmament.config.storage-overlay.rows": "Columns",