diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-03-20 14:51:53 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-03-20 14:51:53 +0800 |
| commit | dae95200cbb2eb3b8851ca955ffd770e0892dedd (patch) | |
| tree | 250a40d22cb533accd27b2bac7a211af6f688485 /api/src/main/java/me | |
| parent | ecfc6aa3f7a1540c74f0b17f33642d2dfdfec45d (diff) | |
| download | RoughlyEnoughItems-dae95200cbb2eb3b8851ca955ffd770e0892dedd.tar.gz RoughlyEnoughItems-dae95200cbb2eb3b8851ca955ffd770e0892dedd.tar.bz2 RoughlyEnoughItems-dae95200cbb2eb3b8851ca955ffd770e0892dedd.zip | |
Implement search modes and make tooltip always enabled by default.
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'api/src/main/java/me')
| -rw-r--r-- | api/src/main/java/me/shedaniel/rei/api/config/ConfigObject.java | 6 | ||||
| -rw-r--r-- | api/src/main/java/me/shedaniel/rei/api/gui/config/SearchMode.java | 44 |
2 files changed, 50 insertions, 0 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/api/config/ConfigObject.java b/api/src/main/java/me/shedaniel/rei/api/config/ConfigObject.java index bc471d90f..32f967fd3 100644 --- a/api/src/main/java/me/shedaniel/rei/api/config/ConfigObject.java +++ b/api/src/main/java/me/shedaniel/rei/api/config/ConfigObject.java @@ -162,4 +162,10 @@ public interface ConfigObject { @ApiStatus.Experimental SyntaxHighlightingMode getSyntaxHighlightingMode(); + + SearchMode getTooltipSearchMode(); + + SearchMode getTagSearchMode(); + + SearchMode getModSearchMode(); } diff --git a/api/src/main/java/me/shedaniel/rei/api/gui/config/SearchMode.java b/api/src/main/java/me/shedaniel/rei/api/gui/config/SearchMode.java new file mode 100644 index 000000000..2f105bed5 --- /dev/null +++ b/api/src/main/java/me/shedaniel/rei/api/gui/config/SearchMode.java @@ -0,0 +1,44 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.api.gui.config; + +import me.shedaniel.clothconfig2.gui.entries.SelectionListEntry; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.resources.language.I18n; +import org.jetbrains.annotations.NotNull; + +import java.util.Locale; + +@Environment(EnvType.CLIENT) +public enum SearchMode implements SelectionListEntry.Translatable { + ALWAYS, + PREFIX, + NEVER; + + @Override + public @NotNull String getKey() { + return I18n.get("config.roughlyenoughitems.search_mode." + name().toLowerCase(Locale.ROOT)); + } +} |
