|
@@ -165,19 +165,35 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
|
}
|
|
|
|
|
|
private fun initResource(){
|
|
|
- resourceThemeBitmap = project.sceneResource as ArrayList<String>
|
|
|
+ resourceThemeBitmap = ArrayList<String>().apply {
|
|
|
+ project.themeAssetIndex.contains.scene.values.forEach {
|
|
|
+ val path = "${project.assetFolder.path}/${it.largeFile}"
|
|
|
+ add(path)
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!resourceThemeBitmap.contains(File(Config.ASSETS_FOLDER, Config.PROJECT_WHITE_FILE_NAME).path)){
|
|
|
resourceThemeBitmap.add(File(Config.ASSETS_FOLDER, Config.PROJECT_WHITE_FILE_NAME).path)
|
|
|
}
|
|
|
resourceActorBitmap = when(intent.getStringExtra("resource_actor")) {
|
|
|
- null -> { project.actorResource as ArrayList<ArrayList<String>>}
|
|
|
+ null -> {
|
|
|
+ ArrayList<ArrayList<String>>().apply {
|
|
|
+ project.themeAssetIndex.contains.actor.forEach {
|
|
|
+ add(ArrayList<String>().apply {
|
|
|
+ it.value.values.forEach {
|
|
|
+ val path = "${project.assetFolder.path}/${it.smallFile}"
|
|
|
+ add(path)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
else -> { Gson().fromJson<ThemeActorResource>(intent.getStringExtra("resource_actor"), ThemeActorResource::class.java).actorPath}
|
|
|
}
|
|
|
resourceObjectPath = when(intent.getStringArrayListExtra("resource_object")) {
|
|
|
null -> {
|
|
|
ArrayList<String>().apply {
|
|
|
project.themeAssetIndex.contains.obj.values.forEach {
|
|
|
- val path = "${project.assetFolder.path}/${it.smallFile}"
|
|
|
+ val path = "${project.assetFolder.path}/${it.largeFile}"
|
|
|
add(path)
|
|
|
}
|
|
|
}
|