import { h } from 'preact'; import { useCallback, useContext, useEffect, useState } from 'preact/hooks'; import { CPUMeter } from './CPUMeter'; import { Inset } from './Inset'; import { useHotKey } from './hooks/useHotKey'; import { Apple2 as Apple2Impl } from '../apple2'; import { Audio, SOUND_ENABLED_OPTION } from '../ui/audio'; import { OptionsModal} from './OptionsModal'; import { OptionsContext } from './OptionsContext'; import { ControlButton } from './ControlButton'; import { JoyStick } from '../ui/joystick'; import { Screen, SCREEN_FULL_PAGE } from '../ui/screen'; import { System } from '../ui/system'; const README = 'https://github.com/whscullin/apple2js#readme'; interface ControlStripProps { apple2: Apple2Impl | undefined; e: boolean; } /** * Strip containing containing controls for various system * characteristics, like CPU speed, audio, and the system * options panel. * * @param apple2 Apple2 object * @param e Whether or not this is a //e * @returns ControlStrip component */ export const ControlStrip = ({ apple2, e }: ControlStripProps) => { const [running, setRunning] = useState(true); const [audio, setAudio] = useState