Use getWidth(), getHeight() instead of fixed values
parent
32ceffb2a2
commit
bc813feaa3
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue