Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Fixed issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
CiroZDP committed Apr 25, 2024
1 parent e5af159 commit d0187d6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/net/op/render/screens/MenuScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ public void render(Graphics g) {
}

boolean quitsel, setsel;
quitsel = MouseUtils.inRange(width / 2, height / 2 - 4, 200, 40);
setsel = MouseUtils.inRange((width - 400) / 2, height / 2 - 4, 198, 40);

quitsel = false;
setsel = false;

if (getCurrent().equals(MenuScreen.getInstance())) {
quitsel = MouseUtils.inRange(width / 2, height / 2 - 4, 200, 40);
setsel = MouseUtils.inRange((width - 400) / 2, height / 2 - 4, 198, 40);
}

// Draw buttons
g.drawImage(gts.getButton(BUTTON_DISABLED), (width - 400) / 2, height / 2 - 50, 400, 40, null);
g.drawImage(gts.getButton(setsel ? BUTTON_HIGHLIGHTED : BUTTON), (width - 400) / 2, height / 2 - 4, 198, 40,
Expand Down

0 comments on commit d0187d6

Please sign in to comment.