Skip to content

Commit

Permalink
Use the game screen icon image property. See phetsims/area-model-mult…
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisav1 committed Mar 26, 2024
1 parent a9ababf commit 5c00d46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions js/screens/GenericGameScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ import AreaModelCommonStrings from '../AreaModelCommonStrings.js';
import AreaModelCommonColors from '../common/view/AreaModelCommonColors.js';
import GenericGameAreaModel from '../game/model/GenericGameAreaModel.js';
import GameAreaScreenView from '../game/view/GameAreaScreenView.js';
import GameScreenIcon from '../game/view/GameScreenIcon.js';

class GenericGameScreen extends Screen {

/**
* @param { PreferencesModel } preferencesModel
* @param { Array<JugglerPortrayal> } jugglerPortrayals
* @param { TReadOnlyProperty<ImageableImage>} gameHomeScreenIconImageProperty
* @param { ( GameAreaModel ) => JugglerCharacters } createJugglerController
* @param {number[]} gameLevels
* @public
*/
constructor( preferencesModel, jugglerPortrayals, createJugglerController, gameLevels ) {
constructor( preferencesModel, gameHomeScreenIconImageProperty, createJugglerController, gameLevels ) {

const options = {
name: AreaModelCommonStrings.screen.gameStringProperty,
backgroundColorProperty: AreaModelCommonColors.backgroundProperty,
homeScreenIcon: new GameScreenIcon( jugglerPortrayals, preferencesModel.localizationModel.regionAndCulturePortrayalProperty ),
homeScreenIcon: new ScreenIcon( new Image( gameHomeScreenIconImageProperty ), {
maxIconWidthProportion: 1,
maxIconHeightProportion: 1
} ),
navigationBarIcon: new ScreenIcon( new Image( genericGameScreenNavbar_png ), {
maxIconWidthProportion: 1,
maxIconHeightProportion: 1
Expand Down
10 changes: 6 additions & 4 deletions js/screens/VariablesGameScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ import AreaModelCommonStrings from '../AreaModelCommonStrings.js';
import AreaModelCommonColors from '../common/view/AreaModelCommonColors.js';
import VariablesGameAreaModel from '../game/model/VariablesGameAreaModel.js';
import GameAreaScreenView from '../game/view/GameAreaScreenView.js';
import GameScreenIcon from '../game/view/GameScreenIcon.js';

class VariablesGameScreen extends Screen {

/**
* @param { PreferencesModel } preferencesModel
* @param { Array<JugglerPortrayal> } jugglerPortrayals
* @param { TReadOnlyProperty<ImageableImage> } gameHomeScreenIconImageProperty
* @param { ( GameAreaModel ) => JugglerCharacters } createJugglerController
* @param {number[]} gameLevels
* @public
*/
constructor( preferencesModel, jugglerPortrayals, createJugglerController, gameLevels ) {
constructor( preferencesModel, gameHomeScreenIconImageProperty, createJugglerController, gameLevels ) {

const options = {
name: AreaModelCommonStrings.screen.gameStringProperty,
backgroundColorProperty: AreaModelCommonColors.backgroundProperty,
homeScreenIcon: new GameScreenIcon( jugglerPortrayals, preferencesModel.localizationModel.regionAndCulturePortrayalProperty ),
homeScreenIcon: new ScreenIcon( new Image( gameHomeScreenIconImageProperty ), {
maxIconWidthProportion: 1,
maxIconHeightProportion: 1
} ),
navigationBarIcon: new ScreenIcon( new Image( variablesGameScreenNavbar_png ), {
maxIconWidthProportion: 1,
maxIconHeightProportion: 1
Expand Down

0 comments on commit 5c00d46

Please sign in to comment.