Skip to content

Commit

Permalink
add ghost button
Browse files Browse the repository at this point in the history
  • Loading branch information
Er1ckW committed Jan 28, 2024
1 parent 2329abe commit f71d906
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/renderer/Voice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { validateClientPeerConfig } from './validateClientPeerConfig';
// @ts-ignore
import reverbOgx from 'arraybuffer-loader!../../static/sounds/reverb.ogx'; // @ts-ignore
import radioOnSound from '../../static/sounds/radio_on.wav'; // @ts-ignore
import EnableDeadPlayer from '../../static/images/button/EnableDeadPlayerButton.png'; // @ts-ignore
import DisableDeadPlayer from '../../static/images/button/DisableDeadPlayerButton.png'; // @ts-ignore

import { CameraLocation, AmongUsMaps, MapType } from '../common/AmongusMap';
import { ObsVoiceState } from '../common/ObsOverlay';
Expand All @@ -35,8 +37,6 @@ import Button from '@mui/material/Button';
import IconButton from '@mui/material/IconButton';
import VolumeOff from '@mui/icons-material/VolumeOff';
import VolumeUp from '@mui/icons-material/VolumeUp';
import HearingIcon from '@mui/icons-material/Hearing';
import HearingDisabledIcon from '@mui/icons-material/HearingDisabled';
import Mic from '@mui/icons-material/Mic';
import MicOff from '@mui/icons-material/MicOff';
import adapter from 'webrtc-adapter';
Expand Down Expand Up @@ -946,7 +946,7 @@ const Voice: React.FC<VoiceProps> = function ({ t, error: initialError }: VoiceP
setDeafened(connectionStuff.current.deafened);
};

connectionStuff.current.toggleMute = () => {
connectionStuff.current.toggleMuteDead = () => {
connectionStuff.current.muteDead = !connectionStuff.current.muteDead;
setDead(connectionStuff.current.muteDead);
}
Expand Down Expand Up @@ -1404,7 +1404,7 @@ const Voice: React.FC<VoiceProps> = function ({ t, error: initialError }: VoiceP
{gameState.lobbyCode !== 'MENU' && (
<div className={classes.muteButtons}>
<IconButton onClick={connectionStuff.current.toggleMuteDead} size="small">
{muteDead ? <HearingIcon /> : <HearingDisabledIcon />}
{muteDead ? <img src={DisableDeadPlayer} style={{ width: '20px', height: '20px' }} /> : <img src={EnableDeadPlayer} style={{ width: '20px', height: '20px' }} />}
</IconButton>
<IconButton onClick={connectionStuff.current.toggleMute} size="small">
{mutedState || deafenedState ? <MicOff /> : <Mic />}
Expand Down
Binary file added static/images/button/DisableDeadPlayerButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/button/EnableDeadPlayerButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f71d906

Please sign in to comment.