Beispiel #1
0
 public void deleteLevelDialog()
 {
     Library.levels[sourceId] = null;
     sourceLevel = null;
     if (Library.saveUserLevelsCallback != null)
     {
         Library.saveUserLevelsCallback();
     }
     UIManager.closeDialog();
 }
Beispiel #2
0
 private void confirmWrite()
 {
     //CONVERSION - converted this ok but I don't think it's called
     LevelData.writeToObject(sourceLevel, targetLevel, Level.ROOM_WIDTH, Level.ROOM_HEIGHT);
     Library.levels[targetId] = (Library.LevelData)targetLevel;
     if (Library.saveUserLevelsCallback != null)
     {
         Library.saveUserLevelsCallback();
     }
     UIManager.closeDialog();
 }
Beispiel #3
0
 private void insertBefore()
 {
     Library.levels.splice(sourceId, 1);
     if (targetId > sourceId)
     {
         targetId--;
     }
     Library.levels.splice(targetId, 0, (Library.LevelData)sourceLevel);
     if (Library.saveUserLevelsCallback != null)
     {
         Library.saveUserLevelsCallback();
     }
     UIManager.closeDialog();
 }
Beispiel #4
0
 private void confirmDialog(Action callback)
 {
     if (UIManager.dialog != null)
     {
         UIManager.closeDialog();
     }
     UIManager.confirmDialog(
         Game.WIDTH * 0.5 - renderer.confirmPanelBlit.width * 0.5,
         Game.HEIGHT * 0.5 - renderer.confirmPanelBlit.height * 0.5,
         renderer.confirmPanelBlit,
         callback,
         renderer.confirmButtonBlit,
         renderer.cancelButtonBlit,
         game.selectSound
         );
 }