aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-04-11 21:47:51 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-04-11 21:47:51 +0800
commit41998600e53f941554c8d73790180c13a2e5663c (patch)
treef068c4e7c0f5a5f32a4d614b5f75bd4704c9e888 /src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
parent6c783c00640143c810c81486e0c49003b297221f (diff)
downloadRoughlyEnoughItems-41998600e53f941554c8d73790180c13a2e5663c.tar.gz
RoughlyEnoughItems-41998600e53f941554c8d73790180c13a2e5663c.tar.bz2
RoughlyEnoughItems-41998600e53f941554c8d73790180c13a2e5663c.zip
2.7.2
Diffstat (limited to 'src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java')
-rw-r--r--src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java b/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
index 1c17f94b2..f74e2d34a 100644
--- a/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
+++ b/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
@@ -2,12 +2,13 @@ package me.shedaniel.rei.utils;
import me.shedaniel.cloth.api.ConfigScreenBuilder;
import me.shedaniel.cloth.gui.entries.BooleanListEntry;
-import me.shedaniel.cloth.gui.entries.IntegerListEntry;
+import me.shedaniel.cloth.gui.entries.IntegerSliderEntry;
import me.shedaniel.cloth.gui.entries.StringListEntry;
import me.shedaniel.rei.RoughlyEnoughItemsCore;
import me.shedaniel.rei.gui.config.ItemListOrderingEntry;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.Screen;
+import net.minecraft.client.resource.language.I18n;
import net.minecraft.util.Pair;
import java.io.IOException;
@@ -26,8 +27,13 @@ public class ClothScreenRegistry {
ConfigScreenBuilder.CategoryBuilder appearance = builder.addCategory("text.rei.config.appearance");
appearance.addOption(new BooleanListEntry("text.rei.config.side_search_box", RoughlyEnoughItemsCore.getConfigManager().getConfig().sideSearchField, "text.cloth-config.reset_value", () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().sideSearchField = bool));
appearance.addOption(new ItemListOrderingEntry("text.rei.config.list_ordering", new Pair<>(RoughlyEnoughItemsCore.getConfigManager().getConfig().itemListOrdering, RoughlyEnoughItemsCore.getConfigManager().getConfig().isAscending)));
- appearance.addOption(new BooleanListEntry("text.rei.config.mirror_rei", RoughlyEnoughItemsCore.getConfigManager().getConfig().mirrorItemPanel, "text.cloth-config.reset_value", () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().mirrorItemPanel = bool));
- appearance.addOption(new IntegerListEntry("text.rei.config.max_recipes_per_page", RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage, "text.cloth-config.reset_value", () -> 3, i -> RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage = i).setMinimum(2).setMaximum(99));
+ appearance.addOption(new BooleanListEntry("text.rei.config.item_list_position", RoughlyEnoughItemsCore.getConfigManager().getConfig().mirrorItemPanel, "text.cloth-config.reset_value", () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().mirrorItemPanel = bool) {
+ @Override
+ public String getYesNoText(boolean bool) {
+ return I18n.translate(bool ? "text.rei.config.item_list_position.left" : "text.rei.config.item_list_position.right");
+ }
+ });
+ appearance.addOption(new IntegerSliderEntry("text.rei.config.max_recipes_per_page", 2, 99, RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage, "text.cloth-config.reset_value", () -> 3, i -> RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage = i));
ConfigScreenBuilder.CategoryBuilder modules = builder.addCategory("text.rei.config.modules");
modules.addOption(new BooleanListEntry("text.rei.config.enable_craftable_only", RoughlyEnoughItemsCore.getConfigManager().getConfig().enableCraftableOnlyButton, "text.cloth-config.reset_value", () -> true, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().enableCraftableOnlyButton = bool));
modules.addOption(new BooleanListEntry("text.rei.config.enable_util_buttons", RoughlyEnoughItemsCore.getConfigManager().getConfig().showUtilsButtons, "text.cloth-config.reset_value", () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().showUtilsButtons = bool));