aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-06-03 21:39:36 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-06-03 21:39:36 +0800
commit7689bdbb42ad10b2ad99e2bae55ddaceac15bca7 (patch)
tree0e2ca1323fdfa14ce7a5239fe9bbefa778979b8b /src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
parent8b1978b12906dce6860cc567bd9e46c60becef5d (diff)
downloadRoughlyEnoughItems-7689bdbb42ad10b2ad99e2bae55ddaceac15bca7.tar.gz
RoughlyEnoughItems-7689bdbb42ad10b2ad99e2bae55ddaceac15bca7.tar.bz2
RoughlyEnoughItems-7689bdbb42ad10b2ad99e2bae55ddaceac15bca7.zip
Dark Mode
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java18
1 files changed, 12 insertions, 6 deletions
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();