Skip to content

Commit

Permalink
refactor(gui): change access level of fields and methods in simple sc…
Browse files Browse the repository at this point in the history
…reen to private
  • Loading branch information
WakelessSloth56 committed Feb 23, 2022
1 parent 22d1e89 commit 76baff6
Showing 1 changed file with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
@OnlyIn(Dist.CLIENT)
public class SimpleScreen extends HScreen {

protected static final ResourceLocation TEXTURE = ArnicaLib.id("textures/gui/simple_screen.png");
protected static final int TEXTURE_SIZE = 16;

protected static final int CORNER_SIZE = 4;
protected static final int TOP_LEFT_CORNER_U_OFFSET = 0;
protected static final int TOP_LEFT_CORNER_V_OFFSET = 0;
protected static final int TOP_RIGHT_CORNER_U_OFFSET = 5;
protected static final int TOP_RIGHT_CORNER_V_OFFSET = 0;
protected static final int BOTTOM_LEFT_CORNER_U_OFFSET = 0;
protected static final int BOTTOM_LEFT_CORNER_V_OFFSET = 5;
protected static final int BOTTOM_RIGHT_CORNER_U_OFFSET = 5;
protected static final int BOTTOM_RIGHT_CORNER_V_OFFSET = 5;
private static final ResourceLocation TEXTURE = ArnicaLib.id("textures/gui/simple_screen.png");
private static final int TEXTURE_SIZE = 16;

private static final int CORNER_SIZE = 4;
private static final int TOP_LEFT_CORNER_U_OFFSET = 0;
private static final int TOP_LEFT_CORNER_V_OFFSET = 0;
private static final int TOP_RIGHT_CORNER_U_OFFSET = 5;
private static final int TOP_RIGHT_CORNER_V_OFFSET = 0;
private static final int BOTTOM_LEFT_CORNER_U_OFFSET = 0;
private static final int BOTTOM_LEFT_CORNER_V_OFFSET = 5;
private static final int BOTTOM_RIGHT_CORNER_U_OFFSET = 5;
private static final int BOTTOM_RIGHT_CORNER_V_OFFSET = 5;

protected static final int COLOR_BLACK = adjustColor(0x000000);
protected static final int COLOR_WHITE = adjustColor(0xFFFFFF);
Expand All @@ -38,8 +38,6 @@ public class SimpleScreen extends HScreen {
protected int divX;
protected int divY;

protected boolean isPauseScreen = false;

public SimpleScreen(Component title, int divWidth, int divHeight) {
super(title);
this.divWidth = divWidth;
Expand All @@ -55,16 +53,16 @@ public SimpleScreen() {
}

@Override
public final boolean isPauseScreen() {
return isPauseScreen;
public boolean isPauseScreen() {
return false;
}

@Override
public final void render(PoseStack poseStack, int mouseX, int mouseY, float partialTick) {
this.divX = center(this.width, this.divWidth);
this.divY = center(this.height, this.divHeight);

this.renderBackground(poseStack);
this._renderBackground(poseStack);

this.renderBorderEdge(poseStack);
this.renderBorderCorner(poseStack);
Expand All @@ -76,8 +74,7 @@ public final void render(PoseStack poseStack, int mouseX, int mouseY, float part

protected void subRender(PoseStack poseStack, int mouseX, int mouseY, float partialTick) {}

@Override
public final void renderBackground(PoseStack poseStack) {
private void _renderBackground(PoseStack poseStack) {
super.renderBackground(poseStack);

fill(
Expand All @@ -88,7 +85,7 @@ public final void renderBackground(PoseStack poseStack) {
);
}

private final void renderBorderEdge(PoseStack poseStack) {
private void renderBorderEdge(PoseStack poseStack) {
drawBorderEdge(
poseStack,
this.divX, this.divY,
Expand All @@ -115,7 +112,7 @@ private final void renderBorderEdge(PoseStack poseStack) {
);
}

private final void renderBorderCorner(PoseStack poseStack) {
private void renderBorderCorner(PoseStack poseStack) {
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.setShaderTexture(0, TEXTURE);

Expand Down

0 comments on commit 76baff6

Please sign in to comment.