StatusBar¶
Overview¶
StatusBar is the base class for the status bar that appears at the top of games. It sizes itself to match the bounds of the browser self (the visible bounds) and float to either the top of the browser self or the layout bounds. Subclasses are responsible for adding UI components to the bar.
@author Chris Malley (PixelZoom, Inc.)
Class StatusBar¶
Constructor¶
new StatusBar( layoutBounds : Bounds2, visibleBoundsProperty : TReadOnlyProperty<Bounds2>, providedOptions? : StatusBarOptions )¶
Instance Methods¶
dispose()¶
Instance Properties¶
positioningBoundsProperty : TReadOnlyProperty<Bounds2>¶
(protected, readonly)
Static Properties¶
DEFAULT_FONT : PhetFont¶
(readonly)
DEFAULT_TEXT_FILL¶
(readonly)
Type StatusBarOptions¶
- barFill?: TColor
- barStroke?: TColor
- barHeight?: number
- xMargin?: number
- yMargin?: number
- floatToTop?: boolean
true: float bar to top of visible bounds false: bar at top of layoutBounds - dynamicAlignment?: boolean
true: keeps things on the status bar aligned with left and right edges of self bounds (aka visible bounds) false: keeps things on the status bar aligned with left and right edges of layoutBounds - & NodeOptions
Source Code¶
See the source for StatusBar.ts in the scenery-phet repository.