Skip to content

Commit

Permalink
internal: fix ui backdrop gradient
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTJP committed May 5, 2024
1 parent 3d055ed commit 4c16c05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public void render(PoseStack stack, int mouseX, int mouseY, float partialFrame)
RenderSystem.enableDepthTest(); // Nodes render out of order, so depth test is needed

// Render semi-transparent grey background
fillGradient(stack, getScreenFrame().x(), getScreenFrame().y(), getScreenFrame().width(), getScreenFrame().height(), -1072689136, -804253680);
int x = getScreenFrame().x();
int y = getScreenFrame().y();
fillGradient(stack, x, y, x + getScreenFrame().width(), y + getScreenFrame().height(), -1072689136, -804253680);

// Render background
drawBackForSubtree(stack, new Point(mouseX, mouseY), partialFrame);
Expand Down
4 changes: 3 additions & 1 deletion core/src/main/java/mrtjp/projectred/redui/RedUIScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public void render(PoseStack matrixStack, int mouseX, int mouseY, float partialF
RenderSystem.enableDepthTest(); // Nodes render out of order, so depth test is needed

// Render semi-transparent grey background
fillGradient(matrixStack, getScreenFrame().x(), getScreenFrame().y(), getScreenFrame().width(), getScreenFrame().height(), -1072689136, -804253680);
int x = getScreenFrame().x();
int y = getScreenFrame().y();
fillGradient(matrixStack, x, y, x + getScreenFrame().width(), y + getScreenFrame().height(), -1072689136, -804253680);

// Call frame update function on all nodes
Point mousePoint = new Point(mouseX, mouseY);
Expand Down

0 comments on commit 4c16c05

Please sign in to comment.