-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding screen icons and converting to ES6, see phetsims/fractions-com…
- Loading branch information
1 parent
2967992
commit 6eaf3cc
Showing
3 changed files
with
36 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,24 +5,24 @@ | |
* | ||
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
define( function( require ) { | ||
define( require => { | ||
'use strict'; | ||
|
||
// modules | ||
var EqualityLabScreen = require( 'FRACTIONS_EQUALITY/view/EqualityLabScreen' ); | ||
var FractionsScreen = require( 'FRACTION_MATCHER/view/FractionsScreen' ); | ||
var Sim = require( 'JOIST/Sim' ); | ||
var SimLauncher = require( 'JOIST/SimLauncher' ); | ||
var Tandem = require( 'TANDEM/Tandem' ); | ||
const EqualityLabScreen = require( 'FRACTIONS_EQUALITY/view/EqualityLabScreen' ); | ||
const FractionsScreen = require( 'FRACTION_MATCHER/view/FractionsScreen' ); | ||
const Sim = require( 'JOIST/Sim' ); | ||
const SimLauncher = require( 'JOIST/SimLauncher' ); | ||
const Tandem = require( 'TANDEM/Tandem' ); | ||
|
||
// strings | ||
var fractionsEqualityTitleString = require( 'string!FRACTIONS_EQUALITY/fractions-equality.title' ); | ||
var screenGameString = require( 'string!FRACTIONS_EQUALITY/screen.game' ); | ||
const fractionsEqualityTitleString = require( 'string!FRACTIONS_EQUALITY/fractions-equality.title' ); | ||
const screenGameString = require( 'string!FRACTIONS_EQUALITY/screen.game' ); | ||
|
||
// constants | ||
var tandem = Tandem.rootTandem; | ||
const tandem = Tandem.rootTandem; | ||
|
||
var simOptions = { | ||
const simOptions = { | ||
credits: { | ||
//TODO fill in proper credits, all of these fields are optional, see joist.AboutDialog | ||
leadDesign: '', | ||
|
@@ -34,11 +34,10 @@ define( function( require ) { | |
} | ||
}; | ||
|
||
SimLauncher.launch( function() { | ||
var sim = new Sim( fractionsEqualityTitleString, [ | ||
SimLauncher.launch( () => { | ||
const sim = new Sim( fractionsEqualityTitleString, [ | ||
new EqualityLabScreen(), | ||
new FractionsScreen( tandem.createTandem( 'fractionsScreen' ), { | ||
// TODO: don't hack like this | ||
name: screenGameString | ||
} ) | ||
], simOptions ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,11 @@ | |
* | ||
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
define( function( require ) { | ||
define( require => { | ||
'use strict'; | ||
|
||
// modules | ||
var Namespace = require( 'PHET_CORE/Namespace' ); | ||
const Namespace = require( 'PHET_CORE/Namespace' ); | ||
|
||
return new Namespace( 'fractionsEquality' ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,36 @@ | ||
// Copyright 2018, University of Colorado Boulder | ||
|
||
/** | ||
* TODO: doc | ||
* Equality Lab screen for Fractions: Equality | ||
* | ||
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
define( function( require ) { | ||
define( require => { | ||
'use strict'; | ||
|
||
// modules | ||
var EqualityLabModel = require( 'FRACTIONS_COMMON/intro/model/EqualityLabModel' ); | ||
var EqualityLabScreenView = require( 'FRACTIONS_COMMON/intro/view/EqualityLabScreenView' ); | ||
var FractionsCommonColorProfile = require( 'FRACTIONS_COMMON/common/view/FractionsCommonColorProfile' ); | ||
var fractionsEquality = require( 'FRACTIONS_EQUALITY/fractionsEquality' ); | ||
var inherit = require( 'PHET_CORE/inherit' ); | ||
var Screen = require( 'JOIST/Screen' ); | ||
const EqualityLabModel = require( 'FRACTIONS_COMMON/intro/model/EqualityLabModel' ); | ||
const EqualityLabScreenView = require( 'FRACTIONS_COMMON/intro/view/EqualityLabScreenView' ); | ||
const FractionsCommonColorProfile = require( 'FRACTIONS_COMMON/common/view/FractionsCommonColorProfile' ); | ||
const fractionsEquality = require( 'FRACTIONS_EQUALITY/fractionsEquality' ); | ||
const Screen = require( 'JOIST/Screen' ); | ||
|
||
// strings | ||
var screenEqualityLabString = require( 'string!FRACTIONS_EQUALITY/screen.equalityLab' ); | ||
|
||
/** | ||
* @constructor | ||
*/ | ||
function EqualityLabScreen() { | ||
|
||
var options = { | ||
name: screenEqualityLabString, | ||
backgroundColorProperty: FractionsCommonColorProfile.introScreenBackgroundProperty | ||
}; | ||
|
||
Screen.call( this, | ||
function() { return new EqualityLabModel(); }, | ||
function( model ) { return new EqualityLabScreenView( model ); }, | ||
options | ||
); | ||
const screenEqualityLabString = require( 'string!FRACTIONS_EQUALITY/screen.equalityLab' ); | ||
|
||
class EqualityLabScreen extends Screen { | ||
constructor() { | ||
super( | ||
() => new EqualityLabModel(), | ||
model => new EqualityLabScreenView( model ), | ||
{ | ||
name: screenEqualityLabString, | ||
backgroundColorProperty: FractionsCommonColorProfile.introScreenBackgroundProperty, | ||
homeScreenIcon: EqualityLabScreenView.createScreenIcon() | ||
} | ||
); | ||
} | ||
} | ||
|
||
fractionsEquality.register( 'EqualityLabScreen', EqualityLabScreen ); | ||
|
||
return inherit( Screen, EqualityLabScreen ); | ||
return fractionsEquality.register( 'EqualityLabScreen', EqualityLabScreen ); | ||
} ); |