diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-08-12 01:32:26 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-08-12 01:32:26 +0200 |
| commit | f9686df919a6b80e7c788ec66f25dd8296e95c41 (patch) | |
| tree | 5c1f313c5e9cd77954129fcf06165fe31580c7ea /src/main/kotlin/features/inventory/storageoverlay | |
| parent | 6d0c39c46fe090cf4394fda61bfe6de50799cfc6 (diff) | |
| parent | 98a080099683f9354ec4e02e47ff39b30caa8590 (diff) | |
| download | Firmament-f9686df919a6b80e7c788ec66f25dd8296e95c41.tar.gz Firmament-f9686df919a6b80e7c788ec66f25dd8296e95c41.tar.bz2 Firmament-f9686df919a6b80e7c788ec66f25dd8296e95c41.zip | |
refactor: merge 1.21.5 changes back into 1.21.7
Diffstat (limited to 'src/main/kotlin/features/inventory/storageoverlay')
| -rw-r--r-- | src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt | 17 |
1 files changed, 16 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() + ) } } |
