@@ -39,6 +39,9 @@ var tinyMapEditor = (function() {
3939 tileCombinationsDialog = getById ( 'tileCombinationsDialog' ) ,
4040 tileCombinationChoiceDialog = getById ( 'tileCombinationChoiceDialog' ) ,
4141
42+ playerSpriteButton = getById ( 'playerSpriteButton' ) ,
43+ playerSpriteDialog = getById ( 'playerSpriteDialog' ) ,
44+
4245 projectInfoButton = getById ( 'projectInfoButton' ) ,
4346 projectInfoDialog = getById ( 'projectInfoDialog' ) ,
4447 loadProjectInput = getById ( 'loadProjectInput' ) ,
@@ -670,6 +673,17 @@ var tinyMapEditor = (function() {
670673
671674 populateModalDialog ( tileCombinationsDialog , 'Tile Combinations' , table ) ;
672675 } ,
676+
677+ showPlayerSpritePopup : function ( ) {
678+ const { h, newTr, newTd, newTh, newInput, newDataCheckbox, populateModalDialog } = DomUtil ;
679+
680+ populateModalDialog ( playerSpriteDialog , 'Player Sprite' ,
681+ h ( 'label' , { } ,
682+ 'Player sprite to load:' ,
683+ newInput ( 'file' , { accept : 'image/*' } )
684+ )
685+ ) ;
686+ } ,
673687
674688 prepareProjectInfoStructure : function ( ) {
675689 if ( ! projectInfo ) projectInfo = { } ;
@@ -835,6 +849,7 @@ var tinyMapEditor = (function() {
835849
836850 tileAttrsButton . addEventListener ( 'click' , ( ) => _this . showTileAttrsPopup ( ) ) ;
837851 tileCombinationsButton . addEventListener ( 'click' , ( ) => _this . showTileCombinationsPopup ( ) ) ;
852+ playerSpriteButton . addEventListener ( 'click' , ( ) => _this . showPlayerSpritePopup ( ) ) ;
838853
839854 /**
840855 * Map list events.
0 commit comments