diff options
author | inglettronald <inglettronald@gmail.com> | 2023-06-12 20:51:33 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-06-12 20:51:33 -0500 |
commit | 2b93c22070564ed3ad31cd1862c65185b79c1a78 (patch) | |
tree | 89909715392a1af4567ec9cdb0584269786d7e5c /src/main/kotlin/com/dulkirfabric/config | |
parent | eea733bdab195e3a68d4f0d8264abddd5ab2ae59 (diff) | |
download | DulkirMod-Fabric-2b93c22070564ed3ad31cd1862c65185b79c1a78.tar.gz DulkirMod-Fabric-2b93c22070564ed3ad31cd1862c65185b79c1a78.tar.bz2 DulkirMod-Fabric-2b93c22070564ed3ad31cd1862c65185b79c1a78.zip |
Added a naive implementation of selected block outlines options
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/config')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt index 16fa366..fa4e66c 100644 --- a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt +++ b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt @@ -29,6 +29,7 @@ import net.minecraft.client.util.InputUtil.UNKNOWN_KEY import net.minecraft.text.LiteralTextContent import net.minecraft.text.MutableText import net.minecraft.text.Text +import net.minecraft.text.TextColor import net.minecraft.util.Formatting import net.minecraft.util.Identifier import java.io.File @@ -62,6 +63,19 @@ class DulkirConfig { general.addEntry( entryBuilder.mkToggle(Text.literal("Ignore Reverse Third Person"), configOptions::ignoreReverseThirdPerson) ) + general.addEntry( + entryBuilder.mkToggle(Text.literal("Custom Block outlines"), configOptions::customBlockOutlines) + ) + general.addEntry( + entryBuilder.startIntSlider(Text.literal("Line Thickness"), configOptions.blockOutlineThickness, 1, 5) + .setSaveConsumer { newValue -> configOptions.blockOutlineThickness = newValue } + .build() + ) + general.addEntry( + entryBuilder.startColorField(Text.literal("Outline Color"), TextColor.fromRgb(configOptions.blockOutlineColor)) + .setSaveConsumer { newValue -> configOptions.blockOutlineColor = newValue } + .build() + ) val shortcuts = builder.getOrCreateCategory(Text.literal("Shortcuts")) shortcuts.addEntry( @@ -92,7 +106,10 @@ class DulkirConfig { var inventoryScale: Int = 3, var macrosList: List<Macro> = listOf(Macro(UNKNOWN_KEY, "")), var ignoreReverseThirdPerson: Boolean = false, - var dynamicKey: InputUtil.Key = UNKNOWN_KEY + var dynamicKey: InputUtil.Key = UNKNOWN_KEY, + var customBlockOutlines: Boolean = false, + var blockOutlineThickness: Int = 3, + var blockOutlineColor: Int = 0xFFFFFF ) @Serializable |