add info to menu selected challenge panel
This commit is contained in:
@@ -490,11 +490,14 @@ function computeMenuSelectedChallengeIndex (state) {
|
||||
}
|
||||
|
||||
function computeMenuSelectedChallengeInfoText (state) {
|
||||
const numBeats = state.menuSelectedChallenge.numBeats;
|
||||
const songLength = state.menuSelectedChallenge.songLength;
|
||||
const challenge = state.menuSelectedChallenge;
|
||||
|
||||
const numBeats = challenge.numBeats;
|
||||
const songLength = challenge.songLength;
|
||||
if (!numBeats || !songLength) { return; }
|
||||
state.menuSelectedChallenge.songInfoText =
|
||||
`${formatSongLength(songLength)} / ${numBeats} beats`;
|
||||
|
||||
challenge.songInfoText =
|
||||
`${challenge.author}\n${challenge.downloadsText}\n${formatSongLength(songLength)} / ${numBeats} beats`;
|
||||
}
|
||||
|
||||
function formatSongLength (songLength) {
|
||||
|
||||
@@ -215,10 +215,10 @@
|
||||
bind__text="value: menuSelectedChallenge.songName"></a-entity>
|
||||
<a-entity
|
||||
id="menuSelectedChallengeInfo"
|
||||
position="0 -0.282 0"
|
||||
position="0 -0.482 0"
|
||||
mixin="font"
|
||||
text="align: center; color: #999; wrapCount: 30; lineHeight: 40; width: 0.8; baseline: bottom"
|
||||
bind__text="value: menuSelectedChallenge.info"></a-entity>
|
||||
text="align: center; color: #999; wrapCount: 30; lineHeight: 60; width: 0.8; baseline: bottom"
|
||||
bind__text="value: menuSelectedChallenge.songInfoText"></a-entity>
|
||||
</a-entity>
|
||||
|
||||
<a-plane
|
||||
|
||||
Reference in New Issue
Block a user