Skip to content

Commit

Permalink
convert to new ComboBoxItem, phetsims/sun#450
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <[email protected]>
  • Loading branch information
pixelzoom committed Jan 17, 2019
1 parent ec7817e commit e5fa7c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/blackbox/view/BlackBoxSceneView.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ define( function( require ) {
var ChallengeSet = require( 'CIRCUIT_CONSTRUCTION_KIT_BLACK_BOX_STUDY/blackbox/model/ChallengeSet' );
var circuitConstructionKitBlackBoxStudy = require( 'CIRCUIT_CONSTRUCTION_KIT_BLACK_BOX_STUDY/circuitConstructionKitBlackBoxStudy' );
var ComboBox = require( 'SUN/ComboBox' );
var ComboBoxItem = require( 'SUN/ComboBoxItem' );
var inherit = require( 'PHET_CORE/inherit' );
var InteractionMode = require( 'CIRCUIT_CONSTRUCTION_KIT_COMMON/model/InteractionMode' );
var ModeRadioButtonGroup = require( 'CIRCUIT_CONSTRUCTION_KIT_BLACK_BOX_STUDY/blackbox/view/ModeRadioButtonGroup' );
Expand Down Expand Up @@ -103,13 +104,13 @@ define( function( require ) {
};

// A different ComboBox instance appears in each BlackBoxSceneView
var elements = [ ComboBox.createItem(
var elements = [ new ComboBoxItem(
new Text( 'Warm-up', comboBoxTextOptions ), // TODO: i18n
'warmup', {
tandemName: 'warmup'
} ) ];
for ( var i = 0; i < ChallengeSet.challengeArray.length; i++ ) {
elements.push( ComboBox.createItem(
elements.push( new ComboBoxItem(
new Text( 'Black Box ' + ( i + 1 ), comboBoxTextOptions ), // TODO: i18n
'scene' + i, {
tandemName: 'scene' + i
Expand All @@ -121,6 +122,8 @@ define( function( require ) {
this.addChild( listParent );

var sceneSelectionComboBox = new ComboBox( elements, sceneProperty, listParent, {
xMargin: 12,
yMargin: 10,
cornerRadius: 6,
tandem: tandem.createTandem( 'sceneSelectionComboBox' )
} );
Expand Down

0 comments on commit e5fa7c2

Please sign in to comment.