Update pack list when create new atlas pack
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -360,6 +360,7 @@ public class TiledPanelMediator extends Mediator<TiledPanel> {
|
||||
pixmap.dispose();
|
||||
texturePackVO.regions.add(miniImageName);
|
||||
|
||||
facade.sendNotification(MsgAPI.UPDATE_ATLAS_PACK_LIST);
|
||||
facade.sendNotification(MsgAPI.ACTION_REPACK);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.renderer.data.TexturePackVO;
|
||||
import games.rednblack.editor.utils.ImportUtils;
|
||||
import games.rednblack.editor.utils.asset.Asset;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.ProgressHandler;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -64,6 +65,8 @@ public class AtlasAsset extends Asset {
|
||||
}
|
||||
|
||||
resolutionManager.rePackProjectImagesForAllResolutionsSync();
|
||||
|
||||
facade.sendNotification(MsgAPI.UPDATE_ATLAS_PACK_LIST);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
progressHandler.progressFailed();
|
||||
|
||||
@@ -9,6 +9,7 @@ import games.rednblack.editor.renderer.data.TexturePackVO;
|
||||
import games.rednblack.editor.view.menu.ResourcesMenu;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.stage.UIStage;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
|
||||
@@ -40,6 +41,7 @@ public class AnimationsPackDialogMediator extends Mediator<AtlasesPackDialog> {
|
||||
MOVE_REGION_TO_PACK,
|
||||
UPDATE_CURRENT_LIST,
|
||||
REMOVE_PACK,
|
||||
MsgAPI.UPDATE_ATLAS_PACK_LIST,
|
||||
ProjectManager.PROJECT_DATA_UPDATED,
|
||||
DeleteImageResource.DONE,
|
||||
DeleteSpineAnimation.DONE,
|
||||
@@ -66,6 +68,7 @@ public class AnimationsPackDialogMediator extends Mediator<AtlasesPackDialog> {
|
||||
if (currentTab != null)
|
||||
viewComponent.updateCurrentPack(projectManager.currentProjectInfoVO.animationsPacks.get(currentTab).regions);
|
||||
break;
|
||||
case MsgAPI.UPDATE_ATLAS_PACK_LIST:
|
||||
case ProjectManager.PROJECT_OPENED:
|
||||
viewComponent.initPacks(projectManager.currentProjectInfoVO.animationsPacks.keySet());
|
||||
viewComponent.updateMainPack(projectManager.currentProjectInfoVO.animationsPacks.get("main").regions);
|
||||
|
||||
@@ -9,6 +9,7 @@ import games.rednblack.editor.renderer.data.TexturePackVO;
|
||||
import games.rednblack.editor.view.menu.ResourcesMenu;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.stage.UIStage;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
|
||||
@@ -40,6 +41,7 @@ public class ImagesPackDialogMediator extends Mediator<AtlasesPackDialog> {
|
||||
MOVE_REGION_TO_PACK,
|
||||
UPDATE_CURRENT_LIST,
|
||||
REMOVE_PACK,
|
||||
MsgAPI.UPDATE_ATLAS_PACK_LIST,
|
||||
ProjectManager.PROJECT_DATA_UPDATED,
|
||||
DeleteImageResource.DONE,
|
||||
DeleteSpineAnimation.DONE,
|
||||
@@ -66,6 +68,7 @@ public class ImagesPackDialogMediator extends Mediator<AtlasesPackDialog> {
|
||||
if (currentTab != null)
|
||||
viewComponent.updateCurrentPack(projectManager.currentProjectInfoVO.imagesPacks.get(currentTab).regions);
|
||||
break;
|
||||
case MsgAPI.UPDATE_ATLAS_PACK_LIST:
|
||||
case ProjectManager.PROJECT_OPENED:
|
||||
viewComponent.initPacks(projectManager.currentProjectInfoVO.imagesPacks.keySet());
|
||||
viewComponent.updateMainPack(projectManager.currentProjectInfoVO.imagesPacks.get("main").regions);
|
||||
|
||||
Reference in New Issue
Block a user