From 69f5f662e8ebdbefcd1398b1b4b8c539b35ceb96 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Fri, 12 Aug 2022 20:18:41 -0600 Subject: [PATCH] stringProperties experimentation --- js/compare/CompareScreen.ts | 4 +--- js/density-main.ts | 4 +--- js/densityStrings.ts | 5 +++++ js/intro/IntroScreen.ts | 4 +--- js/mystery/MysteryScreen.ts | 4 +--- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/js/compare/CompareScreen.ts b/js/compare/CompareScreen.ts index 38ccf21..9d4eaf7 100644 --- a/js/compare/CompareScreen.ts +++ b/js/compare/CompareScreen.ts @@ -19,8 +19,6 @@ import compare_screen_icon_png from '../../mipmaps/compare_screen_icon_png.js'; import density from '../density.js'; import densityStrings from '../densityStrings.js'; -const screenCompareString = densityStrings.screen.compare; - export default class CompareScreen extends Screen { public constructor( tandem: Tandem ) { const icon = DensityBuoyancyCommonQueryParameters.generateIconImages ? DensityBuoyancyScreenView.getDensityCompareIcon() : new Image( compare_screen_icon_png ); @@ -33,7 +31,7 @@ export default class CompareScreen extends Screen { - const sim = new Sim( densityTitleString, [ + const sim = new Sim( densityStrings.density.titleProperty, [ new IntroScreen( Tandem.ROOT.createTandem( 'introScreen' ) ), new CompareScreen( Tandem.ROOT.createTandem( 'compareScreen' ) ), new MysteryScreen( Tandem.ROOT.createTandem( 'mysteryScreen' ) ) diff --git a/js/densityStrings.ts b/js/densityStrings.ts index db125b7..63b4787 100644 --- a/js/densityStrings.ts +++ b/js/densityStrings.ts @@ -5,16 +5,21 @@ */ /* eslint-disable */ import getStringModule from '../../chipper/js/getStringModule.js'; +import Property from '../../axon/js/Property.js'; import density from './density.js'; type StringsType = { 'density': { 'title': string; + 'titleProperty': Property; }; 'screen': { 'intro': string; + 'introProperty': Property; 'compare': string; + 'compareProperty': Property; 'mystery': string; + 'mysteryProperty': Property; } }; diff --git a/js/intro/IntroScreen.ts b/js/intro/IntroScreen.ts index ddf46e8..e773f0e 100644 --- a/js/intro/IntroScreen.ts +++ b/js/intro/IntroScreen.ts @@ -19,8 +19,6 @@ import intro_screen_icon_png from '../../mipmaps/intro_screen_icon_png.js'; import density from '../density.js'; import densityStrings from '../densityStrings.js'; -const screenIntroString = densityStrings.screen.intro; - export default class IntroScreen extends Screen { public constructor( tandem: Tandem ) { const icon = DensityBuoyancyCommonQueryParameters.generateIconImages ? DensityBuoyancyScreenView.getDensityIntroIcon() : new Image( intro_screen_icon_png ); @@ -33,7 +31,7 @@ export default class IntroScreen extends Screen { public constructor( tandem: Tandem ) { const icon = DensityBuoyancyCommonQueryParameters.generateIconImages ? DensityBuoyancyScreenView.getDensityMysteryIcon() : new Image( mystery_screen_icon_png ); @@ -33,7 +31,7 @@ export default class MysteryScreen extends Screen