|
@@ -11,7 +11,6 @@ import android.support.v7.app.AppCompatActivity
|
|
import android.support.v7.widget.LinearLayoutManager
|
|
import android.support.v7.widget.LinearLayoutManager
|
|
import android.support.v7.widget.RecyclerView
|
|
import android.support.v7.widget.RecyclerView
|
|
import android.util.DisplayMetrics
|
|
import android.util.DisplayMetrics
|
|
-import android.util.Log
|
|
|
|
import android.view.*
|
|
import android.view.*
|
|
import android.widget.PopupWindow
|
|
import android.widget.PopupWindow
|
|
import android.widget.SeekBar
|
|
import android.widget.SeekBar
|
|
@@ -45,15 +44,16 @@ import kotlinx.android.synthetic.main.view_control_dialogue_dialog.view.*
|
|
import com.bomostory.sceneeditmodule.DialogueColorData
|
|
import com.bomostory.sceneeditmodule.DialogueColorData
|
|
import com.bomostory.sceneeditmodule.SceneDrawer
|
|
import com.bomostory.sceneeditmodule.SceneDrawer
|
|
import com.bomostory.sceneeditmodule.navigationbar.actor.ObjectView
|
|
import com.bomostory.sceneeditmodule.navigationbar.actor.ObjectView
|
|
|
|
+import com.bomostory.sceneeditmodule.navigationbar.actor.NonInterceptTouchRecycleView
|
|
import com.bomostory.sceneeditmodule.screen.draw.DrawActivity
|
|
import com.bomostory.sceneeditmodule.screen.draw.DrawActivity
|
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
|
import io.reactivex.schedulers.Schedulers
|
|
import io.reactivex.schedulers.Schedulers
|
|
import kotlinx.android.synthetic.main.actor_select_view.view.*
|
|
import kotlinx.android.synthetic.main.actor_select_view.view.*
|
|
|
|
+import kotlinx.android.synthetic.main.add_scene_view.view.*
|
|
import kotlinx.android.synthetic.main.layer_management_fragment.*
|
|
import kotlinx.android.synthetic.main.layer_management_fragment.*
|
|
import kotlinx.android.synthetic.main.navigation_bar_view.view.*
|
|
import kotlinx.android.synthetic.main.navigation_bar_view.view.*
|
|
import kotlinx.android.synthetic.main.popupview_color_dialog.view.*
|
|
import kotlinx.android.synthetic.main.popupview_color_dialog.view.*
|
|
import kotlinx.android.synthetic.main.popupview_setting.view.*
|
|
import kotlinx.android.synthetic.main.popupview_setting.view.*
|
|
-import kotlinx.android.synthetic.main.scene_brush_view.view.*
|
|
|
|
import java.io.File
|
|
import java.io.File
|
|
import java.util.*
|
|
import java.util.*
|
|
import java.util.concurrent.CopyOnWriteArrayList
|
|
import java.util.concurrent.CopyOnWriteArrayList
|
|
@@ -165,10 +165,17 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
}
|
|
}
|
|
|
|
|
|
private fun initResource(){
|
|
private fun initResource(){
|
|
- resourceThemeBitmap = ArrayList<String>().apply {
|
|
|
|
- project.themeAssetIndex.contains.scene.values.forEach {
|
|
|
|
- val path = "${project.assetFolder.path}/${it.largeFile}"
|
|
|
|
- add(path)
|
|
|
|
|
|
+ resourceThemeBitmap = when(intent.getStringExtra("resource_actor")) {
|
|
|
|
+ null -> {
|
|
|
|
+ ArrayList<String>().apply {
|
|
|
|
+ project.themeAssetIndex.contains.scene.values.forEach {
|
|
|
|
+ val path = "${project.assetFolder.path}/${it.largeFile}"
|
|
|
|
+ add(path)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else -> {
|
|
|
|
+ intent.getStringArrayListExtra("resource_scene")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!resourceThemeBitmap.contains(File(Config.ASSETS_FOLDER, Config.PROJECT_WHITE_FILE_NAME).path)){
|
|
if (!resourceThemeBitmap.contains(File(Config.ASSETS_FOLDER, Config.PROJECT_WHITE_FILE_NAME).path)){
|
|
@@ -395,7 +402,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
val layoutManager = LinearLayoutManager(this)
|
|
val layoutManager = LinearLayoutManager(this)
|
|
layoutManager.orientation = LinearLayoutManager.HORIZONTAL
|
|
layoutManager.orientation = LinearLayoutManager.HORIZONTAL
|
|
var actorAdapter = ActorAdapter(this, resourceActorBitmap, sceneEditView.findViewById(currentLayerIndex), this)
|
|
var actorAdapter = ActorAdapter(this, resourceActorBitmap, sceneEditView.findViewById(currentLayerIndex), this)
|
|
- var actorRecyclerView = selectActorView.findViewById<RecyclerView>(R.id.select_actor_recycler_view)
|
|
|
|
|
|
+ var actorRecyclerView = selectActorView.findViewById<NonInterceptTouchRecycleView>(R.id.select_actor_recycler_view)
|
|
actorRecyclerView.layoutManager = layoutManager
|
|
actorRecyclerView.layoutManager = layoutManager
|
|
actorRecyclerView.adapter = actorAdapter
|
|
actorRecyclerView.adapter = actorAdapter
|
|
viewContainer.addView(selectActorView)
|
|
viewContainer.addView(selectActorView)
|
|
@@ -474,6 +481,9 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
var newSceneRecyclerView = addSceneView.findViewById<RecyclerView>(R.id.new_scene_recycler_view)
|
|
var newSceneRecyclerView = addSceneView.findViewById<RecyclerView>(R.id.new_scene_recycler_view)
|
|
newSceneRecyclerView.layoutManager = layoutManager
|
|
newSceneRecyclerView.layoutManager = layoutManager
|
|
newSceneRecyclerView.adapter = addSceneAdapter
|
|
newSceneRecyclerView.adapter = addSceneAdapter
|
|
|
|
+ addSceneView.btn_add_scene_view_choose_theme.setOnClickListener {
|
|
|
|
+ chooseTheme()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
controlSceneView.setonClickDuplicateBtn(View.OnClickListener {
|
|
controlSceneView.setonClickDuplicateBtn(View.OnClickListener {
|
|
project.story?.let {
|
|
project.story?.let {
|
|
@@ -1539,9 +1549,9 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
val json = Gson().toJson(project)
|
|
val json = Gson().toJson(project)
|
|
val themeJson = Gson().toJson(otherThemes)
|
|
val themeJson = Gson().toJson(otherThemes)
|
|
val intent = Intent(this@SceneEditActivity, ChooseThemeActivity::class.java).apply {
|
|
val intent = Intent(this@SceneEditActivity, ChooseThemeActivity::class.java).apply {
|
|
- putExtra("project", json)
|
|
|
|
- putExtra("other_theme", themeJson)
|
|
|
|
- }
|
|
|
|
|
|
+ putExtra("project", json)
|
|
|
|
+ putExtra("other_theme", themeJson)
|
|
|
|
+ }
|
|
startActivity(intent)
|
|
startActivity(intent)
|
|
finish()
|
|
finish()
|
|
}
|
|
}
|