Skip to content

RoundMomentaryButton

Overview

RoundMomentaryButton is a round momentary button that toggles a Property between 2 values. The 'off value' is the value when the button is not pressed. The 'on value' is the value when the button is pressed.

TODO: Not supported with alternative input, see https://github.com/phetsims/scenery/issues/1117

@author Chris Malley (PixelZoom, Inc.)

Class RoundMomentaryButton

import { RoundMomentaryButton } from 'scenerystack/sun';

Constructor

new RoundMomentaryButton( property : TProperty<T>, valueOff : T, valueOn : T, providedOptions? : RoundMomentaryButtonOptions )

Instance Methods

dispose()

Type RoundMomentaryButtonOptions

import type { RoundMomentaryButtonOptions } from 'scenerystack/sun';
  • valueOffSoundPlayer?: TSoundPlayer
  • valueOnSoundPlayer?: TSoundPlayer
  • & RoundButtonOptions

Source Code

See the source for RoundMomentaryButton.ts in the sun repository.