[ts][player] Closes #1238, disable pause/play when controls are hidden via options.

This commit is contained in:
badlogic 2019-01-03 13:43:23 +01:00
parent 66689b3800
commit 1cf8a72e30
6 changed files with 25 additions and 19 deletions

View File

@ -10820,6 +10820,8 @@ var spine;
target = null; target = null;
} }
else { else {
if (!_this.config.showControls)
return;
if (_this.paused) if (_this.paused)
_this.play(); _this.play();
else else

File diff suppressed because one or more lines are too long

View File

@ -10157,6 +10157,8 @@ var spine;
target = null; target = null;
} }
else { else {
if (!_this.config.showControls)
return;
if (_this.paused) if (_this.paused)
_this.play(); _this.play();
else else

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,8 @@ body {
backgroundColor: "#cccccc", backgroundColor: "#cccccc",
viewport: { viewport: {
debugRender: true, debugRender: true,
} },
showControls: false,
}); });
/*// Creates a new spine player with a transparent background, /*// Creates a new spine player with a transparent background,

View File

@ -989,6 +989,7 @@
if (target) { if (target) {
target = null; target = null;
} else { } else {
if (!this.config.showControls) return;
if (this.paused) if (this.paused)
this.play() this.play()
else else