Skip to content

PlayPauseStepButtonGroup

Overview

PlayPauseStepButtonGroup has a play & pause button, optional step-forward button, and optional step-back button. It's typically a subcomponent of TimeControlNode, and was originally an inner class of TimeControlNode.

@author Denzell Barnett (PhET Interactive Simulations) @author Jonathan Olson <jonathan.olson@colorado.edu> @author Chris Malley (PixelZoom, Inc.) @author Jesse Greenberg (PhET Interactive Simulations)

Class PlayPauseStepButtonGroup

import { PlayPauseStepButtonGroup } from 'scenerystack/scenery-phet';

Constructor

new PlayPauseStepButtonGroup( isPlayingProperty : Property<boolean>, providedOptions? : PlayPauseStepButtonGroupOptions )

Instance Methods

getPlayPauseButtonCenter() : Vector2

Get the center of the PlayPauseButton, in the local coordinate frame of the PlayPauseStepButtonGroup.

dispose()

Instance Properties

playPauseButton : PlayPauseButton

(readonly)

Public to help with positioning

Type PlayPauseStepButtonGroupOptions

import type { PlayPauseStepButtonGroupOptions } from 'scenerystack/scenery-phet';
  • includeStepForwardButton?: boolean
    if true, a StepForwardButton is included in the button group
  • includeStepBackwardButton?: boolean
    if true, a StepBackwardButton is included in the button group
  • playPauseStepXSpacing?: number
    horizontal space between Play/Pause and Step buttons
  • playPauseButtonOptions?: StrictOmit<PlayPauseButtonOptions, "tandem" | "phetioDocumentation">
    options for button subcomponents
  • stepForwardButtonOptions?: StrictOmit<StepForwardButtonOptions, "tandem" | "phetioDocumentation">
  • stepBackwardButtonOptions?: StrictOmit<StepBackwardButtonOptions, "tandem" | "phetioDocumentation">
  • playingHelpText?: string | TReadOnlyProperty<string> | null
    pdom - Strings used for the help text of this button group in the playing and paused states. If not provided, default help text will be used when a step button is visible.
  • pausedHelpText?: string | TReadOnlyProperty<string> | null
  • & StrictOmit<RemoveParallelDOMOptions<HBoxOptions>, "spacing" | "children">

Source Code

See the source for PlayPauseStepButtonGroup.ts in the scenery-phet repository.