Skip to content

Commit

Permalink
fix skip button focus mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdaniculae committed Aug 18, 2023
1 parent f870dfb commit f5c79ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Experience/Extras/MultipleChoiceWithPicture.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export default class MultipleChoiceWithPicture {
});

instance.experience.navigation.next.disabled = false;
instance.experience.navigation.next.classList.remove(
"less-focused"
);
instance.experience.navigation.next.classList.add("focused");
instance.experience.navigation.next.innerHTML =
instance.experience.icons.next;
Expand All @@ -94,6 +97,9 @@ export default class MultipleChoiceWithPicture {
htmlAnswers[correctIndex].parentNode.classList.add("correct");

instance.experience.navigation.next.disabled = false;
instance.experience.navigation.next.classList.remove(
"less-focused"
);
instance.experience.navigation.next.classList.add("focused");
instance.experience.navigation.next.innerHTML =
instance.experience.icons.next;
Expand Down
3 changes: 2 additions & 1 deletion src/Experience/Games/ChooseNewKing.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export default class ChooseNewKing {
instance.toggleGodVoice();

instance.experience.navigation.container.style.display = "flex";
instance.experience.navigation.next.classList.remove("less-focused");
instance.experience.navigation.next.classList.add("focused");
instance.experience.navigation.next.innerHTML =
instance.experience.icons.next;
Expand Down Expand Up @@ -253,8 +254,8 @@ export default class ChooseNewKing {
destroy() {
document.querySelector(".game")?.remove();

instance.experience.navigation.next.classList.add("focused");
instance.experience.navigation.next.classList.remove("less-focused");
instance.experience.navigation.next.classList.add("focused");
instance.experience.navigation.next.innerHTML =
instance.experience.icons.next;
}
Expand Down
3 changes: 3 additions & 0 deletions src/Experience/Games/FlipCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ export default class FlipCards {

if (flippedCards.length == instance.data.cards.length) {
instance.experience.navigation.container.style.display = "flex";
instance.experience.navigation.next.classList.remove(
"less-focused"
);
instance.experience.navigation.next.classList.add("focused");
instance.experience.navigation.next.innerHTML =
instance.experience.icons.next;
Expand Down
2 changes: 1 addition & 1 deletion src/Experience/Games/MazeGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default class MazeGame {
<div class="game-popup">
<h1>${_s.miniGames.completed.title}</h1>
<div class="buttons">
<button class="btn default focused">
<button class="btn default focused" id="new-level">
${_s.miniGames.nextRound}</button>
</div>
</div>
Expand Down

0 comments on commit f5c79ae

Please sign in to comment.