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

Commit

Permalink
Hot fix for stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkKronicle committed Sep 18, 2022
1 parent 5bf3408 commit 6f0cb00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ public DrawPosition getScaledPos() {
}

public DrawPosition getScaledPos(float scale) {
if (client.getWindow() == null) {
return new DrawPosition(0, 0);
}
int scaledX = floatToInt((float) x.getDoubleValue(), client.getWindow().getScaledWidth(),
Math.round(width * scale));
int scaledY = floatToInt((float) y.getDoubleValue(), client.getWindow().getScaledHeight(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public static Optional<String> getMouseKeyBindName(KeyBinding keyBinding) {
}

public void setKeystrokes() {
if (client.getWindow() == null) {
keystrokes = null;
return;
// Wait until render is called
}
keystrokes = new ArrayList<>();
DrawPosition pos = getPos();
// LMB
Expand Down

0 comments on commit 6f0cb00

Please sign in to comment.