dont show leaderboard empty message while loading

This commit is contained in:
Kevin Ngo
2018-12-10 01:58:02 -08:00
parent a9f2c62d0b
commit 039d1c2712
3 changed files with 7 additions and 3 deletions

View File

@@ -43,7 +43,7 @@
<section>
<h1>
<span class="cyan">Play now for free on </span><span class="pink"><img src="site/assets/supermedium.png" class="supermedium-h1"></span> <span class="pink">The&nbsp;Virtual&nbsp;Reality&nbsp;Browser</span>
<span class="cyan">Play now for free on </span><span class="pink"><img src="site/assets/supermedium.png" class="supermedium-h1"></span> <span class="pink">The&nbsp;Browser&nbsp;for&nbsp;the&nbsp;the&nbsp;VR&nbsp;Internet</span>
</h1>
<div class="storebuttons">

View File

@@ -291,6 +291,7 @@ AFRAME.registerState({
state.leaderboardNames += `${score.username} (${score.accuracy || 0}%)\n`;
state.leaderboardScores += `${score.score}\n`;
}
state.leaderboardLoading = false;
},
leaderboardqualify: state => {
@@ -340,6 +341,7 @@ AFRAME.registerState({
state.isSearching = false;
clearLeaderboard(state);
state.leaderboardLoading = true;
},
menuchallengeunselect: state => {
@@ -349,8 +351,10 @@ AFRAME.registerState({
menudifficultyselect: (state, difficulty) => {
state.menuSelectedChallenge.difficulty = difficulty;
clearLeaderboard(state);
updateMenuSongInfo(state, state.menuSelectedChallenge);
clearLeaderboard(state);
state.leaderboardLoading = true;
},
minehit: state => {

View File

@@ -47,7 +47,7 @@
<a-entity
id="leaderboardEmpty"
mixin="font"
bind__visible="leaderboard.length === 0 && !leaderboardQualified"
bind__visible="leaderboard.length === 0 && !leaderboardQualified && !leaderboardLoading"
text="align: center; color: #777; baseline: center; width: 1.6; value: No high scores. Be the first!"
position="0 0 0.001"></a-entity>