diff options
-rw-r--r-- | src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt | 17 | ||||
-rw-r--r-- | translations/en_us.json | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt index 988a7c8..f59b293 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt @@ -48,6 +48,15 @@ object StorageOverlay : FirmamentFeature { val margin by integer("margin", 1, 60) { 20 } val itemsBlockScrolling by toggle("block-item-scrolling") { true } val highlightSearchResults by toggle("highlight-search-results") { true } + val highlightSearchResultsColour by colour("highlight-search-results-colour") { + ChromaColour.fromRGB( + 0, + 176, + 0, + 0, + 255 + ) + } } @Subscribe @@ -60,7 +69,13 @@ object StorageOverlay : FirmamentFeature { val stack = event.slot.stack ?: return val search = storageOverlayScreen.searchText.get().takeIf { it.isNotBlank() } ?: return if (storageOverlayScreen.matchesSearch(stack, search)) { - event.context.fill(event.slot.x, event.slot.y, event.slot.x + 16, event.slot.y + 16, 0xFF00B000.toInt()) + event.context.fill( + event.slot.x, + event.slot.y, + event.slot.x + 16, + event.slot.y + 16, + TConfig.highlightSearchResultsColour.getEffectiveColourRGB() + ) } } diff --git a/translations/en_us.json b/translations/en_us.json index e50864e..7e015a2 100644 --- a/translations/en_us.json +++ b/translations/en_us.json @@ -364,6 +364,8 @@ "firmament.config.storage-overlay.height": "Storage Height", "firmament.config.storage-overlay.height.description": "The height of the scrollable storage panel.", "firmament.config.storage-overlay.highlight-search-results": "Highlight Search Results", + "firmament.config.storage-overlay.highlight-search-results-colour": "Highlight Search Colour", + "firmament.config.storage-overlay.highlight-search-results-colour.description": "Change the colour of the highlighted search result.", "firmament.config.storage-overlay.highlight-search-results.description": "Highlight the search results in the ender chest overlay.", "firmament.config.storage-overlay.inverse-scroll": "Invert Scroll", "firmament.config.storage-overlay.inverse-scroll.description": "Invert the mouse wheel scrolling in Firmament's storage overlay.", |