Skip to content

Commit

Permalink
Use drawRect instead of drawGradientRect where appropriate. Also repr…
Browse files Browse the repository at this point in the history
…esent colors as hex to make them easier to read
  • Loading branch information
pupnewfster committed Jul 8, 2019
1 parent 710348a commit e720e19
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/mekanism/client/gui/GuiDictionary.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, in
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth();
int x = guiWidth + 6;
int y = guiHeight + 6;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, in
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 12;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
if (xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35) {
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 149;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, in
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 12;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
if (xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35) {
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 149;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, in
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 149;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, in
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 149;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, in
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 12;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, in
MekanismRenderHelper renderHelper = new MekanismRenderHelper(true).disableLighting().disableDepth().colorMaskAlpha();
int x = guiWidth + 12;
int y = guiHeight + 19;
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
drawRect(x, y, x + 16, y + 16, 0x80FFFFFF);
renderHelper.cleanup();
}
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/mekanism/client/gui/robit/GuiRobitRepair.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
byte b0 = 67;

if (fontRenderer.getUnicodeFlag()) {
drawRect(i1 - 3, b0 - 2, xSize - 25 - 7, b0 + 10, -16777216);
drawRect(i1 - 2, b0 - 1, xSize - 25 - 8, b0 + 9, -12895429);
drawRect(i1 - 3, b0 - 2, xSize - 25 - 7, b0 + 10, 0xFF000000);
drawRect(i1 - 2, b0 - 1, xSize - 25 - 8, b0 + 9, 0xFF3B3B3B);
} else {
fontRenderer.drawString(s, i1, b0 + 1, l);
fontRenderer.drawString(s, i1 + 1, b0, l);
Expand Down

0 comments on commit e720e19

Please sign in to comment.