Use getWidth(), getHeight() instead of fixed values

master
Adam Schmalhofer 2021-11-18 15:09:00 +01:00
parent 32ceffb2a2
commit bc813feaa3
1 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ class StartedState extends State {
} }
draw () { draw () {
drawCounter(this.timeCounter, 120, 120); drawCounter(this.timeCounter, g.getWidth() / 2, g.getHeight() / 2);
} }
init () { init () {
@ -220,8 +220,8 @@ function drawCounter (currentValue, x, y) {
return; return;
} }
x = x || 120; x = x || g.getWidth() / 2;
y = y || 120; y = y || g.getHeight() / 2;
let minutes = 0; let minutes = 0;
let seconds = 0; let seconds = 0;