Skip to content

Commit 0c6aa3e

Browse files
authored
Optimize getCenterScreenPosition function
1 parent 33f219c commit 0c6aa3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usergui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ class UserGui {
351351
const guiWidth = this.settings.window.size.width;
352352
const guiHeight = this.settings.window.size.height;
353353

354-
const x = (screen.width / 2) - (guiWidth / 2);
355-
const y = (screen.height / 2) - (guiHeight / 2);
354+
const x = (screen.width - guiWidth) / 2;
355+
const y = (screen.height - guiHeight) / 2;
356356

357357
return { "x" : x, "y": y };
358358
}

0 commit comments

Comments
 (0)