Skip to content

Commit

Permalink
fix(menu): remove focus key from buttons as it's no longer necessary …
Browse files Browse the repository at this point in the history
…and made the mod throw an error
  • Loading branch information
toverux committed Nov 27, 2024
1 parent 50fe950 commit 3637566
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions HallOfFame/UI/src/menu/menu-controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { type ReactElement, type ReactNode, useEffect, useState } from 'react';
import type { Screenshot } from '../common';
import loveChirperSrc from '../icons/love-chirper.png';
import { type ModSettings, snappyOnSelect, useModSettings } from '../utils';
import { FOCUS_DISABLED } from '../vanilla-modules/game-ui/common/focus/focus-key';
import * as styles from './menu-controls.module.scss';
import { useHofMenuState } from './menu-state-hook';

Expand Down Expand Up @@ -46,7 +45,6 @@ export function MenuControls(): ReactElement {
<MenuButton
className={styles.menuControlsButtonsButton}
src='Media/Glyphs/ArrowCircular.svg'
focusKey={FOCUS_DISABLED}
disabled={!menuState.isReadyForNextImage}
{...snappyOnSelect(nextScreenshot)}>
{translate(
Expand Down Expand Up @@ -325,7 +323,6 @@ function MenuControlsButtons({
className={`${styles.menuControlsButtonsButtonIcon} ${styles.menuControlsButtonsButtonPrevious}`}
src='coui://uil/Colored/DoubleArrowRightTriangle.svg'
tinted={isLoading || !hasPreviousScreenshot}
focusKey={FOCUS_DISABLED}
disabled={isLoading || !hasPreviousScreenshot}
{...snappyOnSelect(previousScreenshot)}
/>
Expand All @@ -339,7 +336,6 @@ function MenuControlsButtons({
className={styles.menuControlsButtonsButton}
src='coui://uil/Colored/DoubleArrowRightTriangle.svg'
tinted={isLoading}
focusKey={FOCUS_DISABLED}
disabled={isLoading}
{...snappyOnSelect(nextScreenshot)}>
{translate(
Expand All @@ -363,7 +359,6 @@ function MenuControlsButtons({
: 'coui://uil/Colored/EyeClosed.svg'
}
tinted={false}
focusKey={FOCUS_DISABLED}
{...snappyOnSelect(
toggleMenuVisibility,
isMenuVisible ? 'close-menu' : 'open-menu'
Expand Down Expand Up @@ -408,7 +403,6 @@ function MenuControlsButtons({
className={`${styles.menuControlsButtonsButton} ${styles.menuControlsButtonsButtonFavorite} ${screenshot.isFavorite ? styles.menuControlsButtonsButtonFavoriteActive : ''}`}
src={loveChirperSrc}
tinted={false}
focusKey={FOCUS_DISABLED}
onSelect={favoriteScreenshot}
selectSound={
screenshot.isFavorite ? 'chirp-event' : 'xp-event'
Expand Down

This file was deleted.

0 comments on commit 3637566

Please sign in to comment.