diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2025-07-04 20:03:33 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-07-04 21:40:31 +0200 |
commit | 8225bde82baecbb39f123f3507874c7adbe1c2fe (patch) | |
tree | 70a8194b66718a5b01ce9261d147c020b3fe9588 | |
parent | 918ee6ab5bc62f926edd34ac209a48ddeb71ae12 (diff) | |
download | Firmament-8225bde82baecbb39f123f3507874c7adbe1c2fe.tar.gz Firmament-8225bde82baecbb39f123f3507874c7adbe1c2fe.tar.bz2 Firmament-8225bde82baecbb39f123f3507874c7adbe1c2fe.zip |
feat: Option to choose the colour of the selected Storage Page
-rw-r--r-- | src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt | 10 | ||||
-rw-r--r-- | src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt | 2 | ||||
-rw-r--r-- | translations/en_us.json | 4 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt index ec62aa6..548552c 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt @@ -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 } diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt index 84d0f2b..460a949 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt @@ -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, diff --git a/translations/en_us.json b/translations/en_us.json index 3431259..faf68e8 100644 --- a/translations/en_us.json +++ b/translations/en_us.json @@ -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", |