Mouse hover sets answer cursor via mouseenter + _renderCursor, matching pokeazure approach
This commit is contained in:
@@ -1140,6 +1140,10 @@ class Game {
|
|||||||
btn.setAttribute('data-letter', slotIdx + 1);
|
btn.setAttribute('data-letter', slotIdx + 1);
|
||||||
btn.textContent=rewriteLetterRefs(q.options[origIdx]);
|
btn.textContent=rewriteLetterRefs(q.options[origIdx]);
|
||||||
btn.addEventListener('click',()=>this.pick(slotIdx, correctShuffledIdx, q, container));
|
btn.addEventListener('click',()=>this.pick(slotIdx, correctShuffledIdx, q, container));
|
||||||
|
btn.addEventListener('mouseenter', () => {
|
||||||
|
this.state.cursor = slotIdx;
|
||||||
|
this._renderCursor();
|
||||||
|
});
|
||||||
container.appendChild(btn);
|
container.appendChild(btn);
|
||||||
});
|
});
|
||||||
this._renderCursor();
|
this._renderCursor();
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ html, body {
|
|||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
image-rendering: pixelated;
|
image-rendering: pixelated;
|
||||||
filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4));
|
filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4));
|
||||||
z-index: 99;
|
z-index: 10;
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user