From d0f024a0cd2525bc4a79308c4f7275ea2a308ab2 Mon Sep 17 00:00:00 2001 From: Lulonaut Date: Sat, 4 Feb 2023 14:46:16 +0100 Subject: Custom default font color in storage overlay (#579) --- .../notenoughupdates/miscgui/StorageOverlay.java | 7 +++++-- .../options/seperateSections/StorageGUI.java | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java index 8878c284..5dd8bd9c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 NotEnoughUpdates contributors + * Copyright (C) 2022-2023 NotEnoughUpdates contributors * * This file is part of NotEnoughUpdates. * @@ -55,7 +55,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.ClientCommandHandler; import org.lwjgl.input.Keyboard; @@ -392,6 +391,10 @@ public class StorageOverlay extends GuiElement { searchTextColour = 0xa0a0a0; } + if (NotEnoughUpdates.INSTANCE.config.storageGUI.useCustomTextColour) { + textColour = ChromaColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.storageGUI.customTextColour); + } + long currentTime = System.currentTimeMillis(); if (lastMillis > 0) { long deltaTime = currentTime - lastMillis; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java index 08c48945..131ac669 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 NotEnoughUpdates contributors + * Copyright (C) 2022-2023 NotEnoughUpdates contributors * * This file is part of NotEnoughUpdates. * @@ -153,6 +153,26 @@ public class StorageGUI { @ConfigAccordionId(id = 1) public String selectedStorageColour = "0:255:255:223:0"; + @Expose + @ConfigOption( + name = "Custom Text Colour", + desc = "Use a custom default text colour.\nOverrides the colour set by the overlay style.\nCan be overridden by using colour codes in the page title.", + searchTags = "color" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 1) + public boolean useCustomTextColour = false; + + @Expose + @ConfigOption( + name = "Custom Text Colour", + desc = "Requires the above option to be set to true", + searchTags = "color" + ) + @ConfigEditorColour + @ConfigAccordionId(id = 1) + public String customTextColour = "0:255:144:144:144"; + @Expose @ConfigOption( name = "Scrollable Tooltips", -- cgit