Commit fbba4a32 authored by thatanimeweirdo's avatar thatanimeweirdo

Merge branch 'auto-play-single-difficulty' into 'master'

added auto playing on showPlayOverlay if there is only one difficulty

See merge request spinshare/client!42
parents 16b29622 95edd5f8
......@@ -43,6 +43,23 @@
'hasXDDifficulty'
],
mounted: function() {
var difficultyObject = [
{difficulty: 0, value: this.$props.hasEasyDifficulty},
{difficulty: 1, value: this.$props.hasNormalDifficulty},
{difficulty: 2, value: this.$props.hasHardDifficulty},
{difficulty: 3, value: this.$props.hasExpertDifficulty},
{difficulty: 4, value: this.$props.hasXDDifficulty}
]
var trueCount = 0;
var singleDiff = {};
difficultyObject.forEach(e => {
if (e['value'] == true) {
trueCount++
singleDiff == e
}
});
if (trueCount == 1) {this.play(singleDiff.difficulty)}
ipcRenderer.on("overlays-close", () => {
this.close();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment