From 7689bdbb42ad10b2ad99e2bae55ddaceac15bca7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 3 Jun 2019 21:39:36 +0800 Subject: Dark Mode --- .../java/me/shedaniel/rei/api/RecipeCategory.java | 10 ++++++++-- .../java/me/shedaniel/rei/client/ConfigObject.java | 4 ++++ .../me/shedaniel/rei/gui/RecipeViewingScreen.java | 10 +++++++--- .../rei/gui/VillagerRecipeViewingScreen.java | 18 ++++++++++++------ .../me/shedaniel/rei/gui/widget/ButtonWidget.java | 4 +++- .../rei/gui/widget/ClickableLabelWidget.java | 6 +++--- .../me/shedaniel/rei/gui/widget/RecipeBaseWidget.java | 5 +++-- .../me/shedaniel/rei/gui/widget/SlotBaseWidget.java | 4 +++- .../java/me/shedaniel/rei/gui/widget/SlotWidget.java | 7 +++++-- .../java/me/shedaniel/rei/gui/widget/TabWidget.java | 4 +++- .../shedaniel/rei/plugin/DefaultBlastingCategory.java | 5 ++--- .../shedaniel/rei/plugin/DefaultBrewingCategory.java | 4 +--- .../shedaniel/rei/plugin/DefaultCampfireCategory.java | 4 +--- .../shedaniel/rei/plugin/DefaultCraftingCategory.java | 4 +--- .../java/me/shedaniel/rei/plugin/DefaultPlugin.java | 6 ++++++ .../shedaniel/rei/plugin/DefaultSmeltingCategory.java | 4 +--- .../shedaniel/rei/plugin/DefaultSmokingCategory.java | 4 +--- .../rei/plugin/DefaultStoneCuttingCategory.java | 4 +--- .../me/shedaniel/rei/utils/ClothScreenRegistry.java | 2 ++ .../assets/roughlyenoughitems/lang/en_us.json | 4 ++-- .../roughlyenoughitems/textures/gui/button_dark.png | Bin 0 -> 15750 bytes .../roughlyenoughitems/textures/gui/display_dark.png | Bin 0 -> 8722 bytes .../textures/gui/recipecontainer.png | Bin 7393 -> 7393 bytes .../textures/gui/recipecontainer_dark.png | Bin 0 -> 6756 bytes 24 files changed, 69 insertions(+), 44 deletions(-) create mode 100644 src/main/resources/assets/roughlyenoughitems/textures/gui/button_dark.png create mode 100644 src/main/resources/assets/roughlyenoughitems/textures/gui/display_dark.png create mode 100644 src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer_dark.png (limited to 'src/main') diff --git a/src/main/java/me/shedaniel/rei/api/RecipeCategory.java b/src/main/java/me/shedaniel/rei/api/RecipeCategory.java index 27a68eafd..9db9a349f 100644 --- a/src/main/java/me/shedaniel/rei/api/RecipeCategory.java +++ b/src/main/java/me/shedaniel/rei/api/RecipeCategory.java @@ -5,6 +5,7 @@ package me.shedaniel.rei.api; +import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.gui.RecipeViewingScreen; import me.shedaniel.rei.gui.renderables.RecipeRenderer; import me.shedaniel.rei.gui.widget.CategoryBaseWidget; @@ -87,8 +88,13 @@ public interface RecipeCategory { */ default void drawCategoryBackground(Rectangle bounds, int mouseX, int mouseY, float delta) { new CategoryBaseWidget(bounds).render(); - DrawableHelper.fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, RecipeViewingScreen.SUB_COLOR.getRGB()); - DrawableHelper.fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, RecipeViewingScreen.SUB_COLOR.getRGB()); + if (RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme) { + DrawableHelper.fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, 0xFF404040); + DrawableHelper.fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, 0xFF404040); + } else { + DrawableHelper.fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, 0xFF9E9E9E); + DrawableHelper.fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, 0xFF9E9E9E); + } } /** diff --git a/src/main/java/me/shedaniel/rei/client/ConfigObject.java b/src/main/java/me/shedaniel/rei/client/ConfigObject.java index 7b490bc52..d9dafa521 100644 --- a/src/main/java/me/shedaniel/rei/client/ConfigObject.java +++ b/src/main/java/me/shedaniel/rei/client/ConfigObject.java @@ -48,6 +48,10 @@ public class ConfigObject { public boolean lightGrayRecipeBorder = false; + public boolean villagerScreenPermanentScrollBar = false; + + public boolean darkTheme = false; + public RecipeScreenType screenType = RecipeScreenType.UNSET; @Comment( diff --git a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java index 8884fb380..e420ec1c6 100644 --- a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java @@ -36,7 +36,6 @@ import java.util.function.Supplier; public class RecipeViewingScreen extends Screen { public static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); - public static final Color SUB_COLOR = new Color(159, 159, 159); private static final int TABS_PER_PAGE = 5; private final List widgets; private final List tabs; @@ -344,8 +343,13 @@ public class RecipeViewingScreen extends Screen { selectedCategory.drawCategoryBackground(bounds, mouseX, mouseY, delta); else { new CategoryBaseWidget(bounds).render(); - fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, SUB_COLOR.getRGB()); - fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, SUB_COLOR.getRGB()); + if (RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme) { + fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, 0xFF404040); + fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, 0xFF404040); + } else { + fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, 0xFF9E9E9E); + fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, 0xFF9E9E9E); + } } tabs.stream().filter(tabWidget -> !tabWidget.isSelected()).forEach(tabWidget -> tabWidget.render(mouseX, mouseY, delta)); GuiLighting.disable(); diff --git a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java index 9233fbbfc..5a7601e06 100644 --- a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java @@ -10,6 +10,7 @@ import com.google.common.collect.Maps; import com.mojang.blaze3d.platform.GlStateManager; import com.zeitheron.hammercore.client.utils.Scissors; import me.shedaniel.cloth.api.ClientUtils; +import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.*; import me.shedaniel.rei.client.ScreenHelper; import me.shedaniel.rei.gui.renderables.RecipeRenderer; @@ -194,7 +195,7 @@ public class VillagerRecipeViewingScreen extends Screen { @Override public int getDefaultColor() { - return 4210752; + return RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? 0xFFBBBBBB : 4210752; } }); this.children.addAll(buttonWidgets); @@ -256,7 +257,11 @@ public class VillagerRecipeViewingScreen extends Screen { @Override public void render(int mouseX, int mouseY, float delta) { - if (scrollBarAlphaFutureTime > 0) { + if (RoughlyEnoughItemsCore.getConfigManager().getConfig().villagerScreenPermanentScrollBar) { + scrollBarAlphaFutureTime = System.currentTimeMillis(); + scrollBarAlphaFuture = 0; + scrollBarAlpha = 1; + } else if (scrollBarAlphaFutureTime > 0) { long l = System.currentTimeMillis() - scrollBarAlphaFutureTime; if (l > 300f) { if (scrollBarAlphaFutureTime == 0) { @@ -319,10 +324,11 @@ public class VillagerRecipeViewingScreen extends Screen { GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.shadeModel(7425); buffer.begin(7, VertexFormats.POSITION_COLOR); - buffer.vertex(scrollbarPositionMinX, minY + scrollBarHeight, 1000D).color(1f, 1f, 1f, scrollBarAlpha).next(); - buffer.vertex(scrollbarPositionMaxX, minY + scrollBarHeight, 1000D).color(1f, 1f, 1f, scrollBarAlpha).next(); - buffer.vertex(scrollbarPositionMaxX, minY, 1000D).color(1f, 1f, 1f, scrollBarAlpha).next(); - buffer.vertex(scrollbarPositionMinX, minY, 1000D).color(1f, 1f, 1f, scrollBarAlpha).next(); + float b = RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? 0.37f : 1f; + buffer.vertex(scrollbarPositionMinX, minY + scrollBarHeight, 1000D).color(b, b, b, scrollBarAlpha).next(); + buffer.vertex(scrollbarPositionMaxX, minY + scrollBarHeight, 1000D).color(b, b, b, scrollBarAlpha).next(); + buffer.vertex(scrollbarPositionMaxX, minY, 1000D).color(b, b, b, scrollBarAlpha).next(); + buffer.vertex(scrollbarPositionMinX, minY, 1000D).color(b, b, b, scrollBarAlpha).next(); tessellator.draw(); GlStateManager.shadeModel(7424); GlStateManager.disableBlend(); diff --git a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java index 28b03775c..28ed82e41 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java @@ -6,6 +6,7 @@ package me.shedaniel.rei.gui.widget; import com.mojang.blaze3d.platform.GlStateManager; +import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.client.ScreenHelper; import net.minecraft.client.gui.Element; import net.minecraft.client.sound.PositionedSoundInstance; @@ -22,6 +23,7 @@ import java.util.Optional; public abstract class ButtonWidget extends HighlightableWidget { public static final Identifier BUTTON_LOCATION = new Identifier("roughlyenoughitems", "textures/gui/button.png"); + public static final Identifier BUTTON_LOCATION_DARK = new Identifier("roughlyenoughitems", "textures/gui/button_dark.png"); public String text; public boolean enabled; public boolean focused; @@ -63,7 +65,7 @@ public abstract class ButtonWidget extends HighlightableWidget { @Override public void render(int mouseX, int mouseY, float delta) { int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; - minecraft.getTextureManager().bindTexture(BUTTON_LOCATION); + minecraft.getTextureManager().bindTexture(RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? BUTTON_LOCATION_DARK : BUTTON_LOCATION); GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); int textureOffset = this.getTextureId(isHovered(mouseX, mouseY)); GlStateManager.enableBlend(); diff --git a/src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java index c6c18f4bf..67d263fd9 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java @@ -5,6 +5,7 @@ package me.shedaniel.rei.gui.widget; +import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.client.ScreenHelper; import net.minecraft.ChatFormat; @@ -13,7 +14,6 @@ import java.util.Optional; public abstract class ClickableLabelWidget extends LabelWidget { - public static final int hoveredColor = (new Color(102, 255, 204)).getRGB(); public boolean focused; public boolean clickable; @@ -40,11 +40,11 @@ public abstract class ClickableLabelWidget extends LabelWidget { } public int getDefaultColor() { - return -1; + return RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? 0xFFBBBBBB : -1; } public int getHoveredColor() { - return hoveredColor; + return RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? -1 : 0xFF66FFCC; } @Override diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java index b21127cb6..41f9e042a 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java @@ -18,6 +18,7 @@ import java.util.List; public class RecipeBaseWidget extends HighlightableWidget { private static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); + private static final Identifier CHEST_GUI_TEXTURE_DARK = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer_dark.png"); private Rectangle bounds; @@ -47,7 +48,7 @@ public class RecipeBaseWidget extends HighlightableWidget { return; GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); - minecraft.getTextureManager().bindTexture(CHEST_GUI_TEXTURE); + minecraft.getTextureManager().bindTexture(RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? CHEST_GUI_TEXTURE_DARK : CHEST_GUI_TEXTURE); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; int textureOffset = getTextureOffset(); @@ -76,7 +77,7 @@ public class RecipeBaseWidget extends HighlightableWidget { } protected int getInnerColor() { - return -3750202; + return RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? 0xFF2E2E2E : -3750202; } protected int getTextureOffset() { diff --git a/src/main/java/me/shedaniel/rei/gui/widget/SlotBaseWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/SlotBaseWidget.java index 3e9ef5e17..d00098e65 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/SlotBaseWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/SlotBaseWidget.java @@ -5,6 +5,8 @@ package me.shedaniel.rei.gui.widget; +import me.shedaniel.rei.RoughlyEnoughItemsCore; + import java.awt.*; public class SlotBaseWidget extends RecipeBaseWidget { @@ -15,7 +17,7 @@ public class SlotBaseWidget extends RecipeBaseWidget { @Override public int getInnerColor() { - return -7631989; + return RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? 0xFF303030 : -7631989; } @Override diff --git a/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java index 7bcda080d..d6c42b385 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java @@ -31,6 +31,7 @@ import java.util.stream.Collectors; public class SlotWidget extends HighlightableWidget { private static final Identifier RECIPE_GUI = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); + private static final Identifier RECIPE_GUI_DARK = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer_dark.png"); private static final ItemStackRenderer TROPICAL_FISH_RENDERABLE = Renderable.fromItemStack(Items.TROPICAL_FISH.getDefaultStack()); private List renderers = new LinkedList<>(); private boolean drawBackground, showToolTips, clickToMoreRecipes, drawHighlightedBackground; @@ -99,8 +100,9 @@ public class SlotWidget extends HighlightableWidget { @Override public void render(int mouseX, int mouseY, float delta) { Renderer renderer = getCurrentRenderer(); + boolean darkTheme = RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme; if (drawBackground) { - minecraft.getTextureManager().bindTexture(RECIPE_GUI); + minecraft.getTextureManager().bindTexture(darkTheme ? RECIPE_GUI_DARK : RECIPE_GUI); blit(this.x - 1, this.y - 1, 0, 222, 18, 18); } boolean highlighted = isHighlighted(mouseX, mouseY); @@ -108,7 +110,8 @@ public class SlotWidget extends HighlightableWidget { GlStateManager.disableLighting(); GlStateManager.disableDepthTest(); GlStateManager.colorMask(true, true, true, false); - fillGradient(x, y, x + 16, y + 16, -2130706433, -2130706433); + int color = darkTheme ? 0xFF5E5E5E : -2130706433; + fillGradient(x, y, x + 16, y + 16, color, color); GlStateManager.colorMask(true, true, true, true); GlStateManager.enableLighting(); GlStateManager.enableDepthTest(); diff --git a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java index c4ac02342..1376b325e 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java @@ -6,6 +6,7 @@ package me.shedaniel.rei.gui.widget; import com.mojang.blaze3d.platform.GlStateManager; +import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.ClientHelper; import me.shedaniel.rei.api.RecipeCategory; import me.shedaniel.rei.api.Renderer; @@ -21,6 +22,7 @@ import java.util.List; public class TabWidget extends HighlightableWidget { public static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); + public static final Identifier CHEST_GUI_TEXTURE_DARK = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer_dark.png"); public boolean shown = false, selected = false; public Renderer renderer; @@ -73,7 +75,7 @@ public class TabWidget extends HighlightableWidget { if (shown) { GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); - minecraft.getTextureManager().bindTexture(CHEST_GUI_TEXTURE); + minecraft.getTextureManager().bindTexture(RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme ? CHEST_GUI_TEXTURE_DARK : CHEST_GUI_TEXTURE); this.blit(bounds.x, bounds.y + 2, selected ? 28 : 0, 192, 28, (selected ? 30 : 27)); renderer.setBlitOffset(100); renderer.render((int) bounds.getCenterX(), (int) bounds.getCenterY(), mouseX, mouseY, delta); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java index e1ab4c9ed..3861735c1 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java @@ -6,6 +6,7 @@ package me.shedaniel.rei.plugin; import com.mojang.blaze3d.platform.GlStateManager; +import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.RecipeCategory; import me.shedaniel.rei.api.Renderable; import me.shedaniel.rei.api.Renderer; @@ -31,8 +32,6 @@ import java.util.function.Supplier; public class DefaultBlastingCategory implements RecipeCategory { - private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png"); - @Override public Identifier getIdentifier() { return DefaultPlugin.BLASTING; @@ -63,7 +62,7 @@ public class DefaultBlastingCategory implements RecipeCategory { - private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png"); - @Override public Identifier getIdentifier() { return DefaultPlugin.BREWING; @@ -58,7 +56,7 @@ public class DefaultBrewingCategory implements RecipeCategory { - private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png"); - @Override public Identifier getIdentifier() { return DefaultPlugin.CAMPFIRE; @@ -54,7 +52,7 @@ public class DefaultCampfireCategory implements RecipeCategory { - private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png"); - @Override public Identifier getIdentifier() { return DefaultPlugin.CRAFTING; @@ -55,7 +53,7 @@ public class DefaultCraftingCategory implements RecipeCategory BREWING_DISPLAYS = Lists.newArrayList(); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java index 56cd26fa9..f45b0c7ba 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java @@ -31,8 +31,6 @@ import java.util.function.Supplier; public class DefaultSmeltingCategory implements RecipeCategory { - private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png"); - @Override public Identifier getIdentifier() { return DefaultPlugin.SMELTING; @@ -62,7 +60,7 @@ public class DefaultSmeltingCategory implements RecipeCategory { - private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png"); - @Override public Identifier getIdentifier() { return DefaultPlugin.SMOKING; @@ -62,7 +60,7 @@ public class DefaultSmokingCategory implements RecipeCategory { - private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png"); - @Override public Identifier getIdentifier() { return DefaultPlugin.STONE_CUTTING; @@ -54,7 +52,7 @@ public class DefaultStoneCuttingCategory implements RecipeCategory false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().darkTheme = bool, () -> getConfigTooltip("dark_theme"))); appearance.addOption(new EnumListEntry<>("text.rei.config.recipe_screen_type", RecipeScreenType.class, RoughlyEnoughItemsCore.getConfigManager().getConfig().screenType, RESET, () -> RecipeScreenType.UNSET, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().screenType = bool, EnumListEntry.DEFAULT_NAME_PROVIDER, () -> getConfigTooltip("recipe_screen_type"))); appearance.addOption(new BooleanListEntry("text.rei.config.side_search_box", RoughlyEnoughItemsCore.getConfigManager().getConfig().sideSearchField, RESET, () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().sideSearchField = bool, () -> getConfigTooltip("side_search_box"))); appearance.addOption(new EnumListEntry<>("text.rei.config.list_ordering", ItemListOrderingConfig.class, ItemListOrderingConfig.from(RoughlyEnoughItemsCore.getConfigManager().getConfig().itemListOrdering, RoughlyEnoughItemsCore.getConfigManager().getConfig().isAscending), RESET, () -> ItemListOrderingConfig.REGISTRY_ASCENDING, config -> { @@ -66,6 +67,7 @@ public class ClothScreenRegistry { }); appearance.addOption(new IntegerSliderEntry("text.rei.config.max_recipes_per_page", 2, 99, RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage, RESET, () -> 3, i -> RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage = i, () -> getConfigTooltip("max_recipes_per_page"))); appearance.addOption(new BooleanListEntry("text.rei.config.light_gray_recipe_border", RoughlyEnoughItemsCore.getConfigManager().getConfig().lightGrayRecipeBorder, RESET, () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().lightGrayRecipeBorder = bool, () -> getConfigTooltip("light_gray_recipe_border"))); + appearance.addOption(new BooleanListEntry("text.rei.config.villager_screen_permanent_scroll_bar", RoughlyEnoughItemsCore.getConfigManager().getConfig().villagerScreenPermanentScrollBar, RESET, () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().villagerScreenPermanentScrollBar = bool, () -> getConfigTooltip("villager_screen_permanent_scroll_bar"))); ConfigScreenBuilder.CategoryBuilder action = builder.addCategory("text.rei.config.action"); action.addOption(new EnumListEntry<>("text.rei.config.item_cheating_mode", ItemCheatingMode.class, RoughlyEnoughItemsCore.getConfigManager().getConfig().itemCheatingMode, RESET, () -> ItemCheatingMode.REI_LIKE, i -> RoughlyEnoughItemsCore.getConfigManager().getConfig().itemCheatingMode = i, e -> { return I18n.translate("text.rei.config.item_cheating_mode." + e.name().toLowerCase()); diff --git a/src/main/resources/assets/roughlyenoughitems/lang/en_us.json b/src/main/resources/assets/roughlyenoughitems/lang/en_us.json index de6413d4f..b83a1fa17 100755 --- a/src/main/resources/assets/roughlyenoughitems/lang/en_us.json +++ b/src/main/resources/assets/roughlyenoughitems/lang/en_us.json @@ -87,6 +87,8 @@ "text.rei.config.enable_legacy_speedcraft_support": "Enable Legacy Plugin Support: ", "text.rei.config.april_fools": "April Fools", "text.rei.config.april_fools.2019": "Force 2019 REI April Fools' joke: ", + "text.rei.config.dark_theme": "Dark Mode:", + "text.rei.config.villager_screen_permanent_scroll_bar": "Villager Screen Permanent Scroll Bar:", "text.rei.config.item_cheating_mode": "Item Cheating Amount:", "text.rei.config.item_cheating_mode.rei_like": "Normal", "text.rei.config.item_cheating_mode.jei_like": "Reversed", @@ -100,7 +102,6 @@ "text.rei.select": "Select", "text.rei.recipe_screen_type.selection": "Recipe Screen Type Selection", "text.rei.recipe_screen_type.selection.sub": "You can always edit this setting again via the config screen.", - "_comment": "Config Tooltips", "tooltip.rei.config.side_search_box": "Declares the location of the search field:\nYes: Left / Right\nNo: Center\n \nDefaulted: No", "tooltip.rei.config.list_ordering": "Declares the ordering of the side item list:\nValues: Registry / Name / Item Groups\n(Ascending / Descending)\n \nDefaulted: %s", @@ -108,7 +109,6 @@ "tooltip.rei.config.max_recipes_per_page": "Declares the maximum possible displayed recipes:\nValues: 2 - 99\n \nDefaulted: 3", "tooltip.rei.config.light_gray_recipe_border": "Declares the appearance of the recipe border:\nYes: Light Gray\nNo: Hard Black\n \nDefaulted: No", "tooltip.rei.config.april_fools.2019": "Forcefully enables the 2019 april fools joke:\nValues: Yes / No\n \nDefaulted: No", - "_comment": "Don't change / translate the credit down below if you are doing it :)", "text.rei.credit.text": "§lRoughly Enough Items\n§7Originally a fork for Almost Enough Items.\n\n§lDevelopers\n - Originally by ZenDarva\n - Created by Danielshe\n - Plugin Support by TehNut\n\n§lLanguage Translation\n English - Danielshe\n Simplified Chinese - XuyuEre & Danielshe\n Traditional Chinese - hugoalh, gxy17886 & Danielshe\n French - Yanis48\n German - MelanX\n Estonian - Madis0\n Portuguese - thiagokenis\n LOLCAT - Danielshe\n Upside Down - Danielshe\n Brazilian Portuguese - thiagokenis\n Bulgarian - geniiii\n\n§lLicense\n§7Roughly Enough Items is using MIT." } diff --git a/src/main/resources/assets/roughlyenoughitems/textures/gui/button_dark.png b/src/main/resources/assets/roughlyenoughitems/textures/gui/button_dark.png new file mode 100644 index 000000000..3d72f5c53 Binary files /dev/null and b/src/main/resources/assets/roughlyenoughitems/textures/gui/button_dark.png differ diff --git a/src/main/resources/assets/roughlyenoughitems/textures/gui/display_dark.png b/src/main/resources/assets/roughlyenoughitems/textures/gui/display_dark.png new file mode 100644 index 000000000..d5bd24b90 Binary files /dev/null and b/src/main/resources/assets/roughlyenoughitems/textures/gui/display_dark.png differ diff --git a/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer.png b/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer.png index 66a44dc2e..366a8791f 100755 Binary files a/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer.png and b/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer.png differ diff --git a/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer_dark.png b/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer_dark.png new file mode 100644 index 000000000..6033f91b1 Binary files /dev/null and b/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer_dark.png differ -- cgit