diff options
author | Lulonaut <lulonaut@tutanota.de> | 2023-02-04 14:46:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-04 14:46:16 +0100 |
commit | d0f024a0cd2525bc4a79308c4f7275ea2a308ab2 (patch) | |
tree | eacd08706c28a4ffe0cd5222bae8958a75fc77c8 /src/main | |
parent | 2cdedc4e5db57564d05c50230c52e8e887d2d8b5 (diff) | |
download | NotEnoughUpdates-d0f024a0cd2525bc4a79308c4f7275ea2a308ab2.tar.gz NotEnoughUpdates-d0f024a0cd2525bc4a79308c4f7275ea2a308ab2.tar.bz2 NotEnoughUpdates-d0f024a0cd2525bc4a79308c4f7275ea2a308ab2.zip |
Custom default font color in storage overlay (#579)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java | 7 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/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. * @@ -155,6 +155,26 @@ public class StorageGUI { @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", desc = "Support for scrolling tooltips for users with small monitors\n" + "This will prevent the menu from scrolling while holding the key, allowing you to scroll tooltips" |