Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,29 @@ class EnvironmentActivity : AppCompatActivity() {

private fun skyBoxButtonHandlers() {
// Load skybox from a Path
findViewById<Button>(R.id.environment_load_path).setOnClickListener {
val loadPathButton = findViewById<Button>(R.id.environment_load_path)
loadPathButton.setOnClickListener {
lifecycleScope.launch {
greySkybox =
ExrImage.createFromZip(session!!, Paths.get("skyboxes", "GreySkybox.zip"))
addEvent(EventType.SKYBOX_CHANGED, "Grey Skybox loaded from Path")
findViewById<Button>(R.id.environment_button2_1).isEnabled = true
}
}
loadPathButton.isEnabled = true

// Load skybox from a bytes
findViewById<Button>(R.id.environment_load_bytes).setOnClickListener {
val loadBytesButton = findViewById<Button>(R.id.environment_load_bytes)
loadBytesButton.setOnClickListener {
lifecycleScope.launch {
val bytes = assets.open("skyboxes/BlueSkybox.zip").readBytes()
blueSkybox = ExrImage.createFromZip(session!!, bytes, "BlueSkybox.zip")
addEvent(EventType.SKYBOX_CHANGED, "Blue Skybox loaded from Bytes")
findViewById<Button>(R.id.environment_button2_2).isEnabled = true
findViewById<Button>(R.id.environment_button4_1).isEnabled = true
}
}
loadBytesButton.isEnabled = true

// handle grey skybox
findViewById<Button>(R.id.environment_button2_1).setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/test_button"
android:enabled="false"
android:textSize="18sp"
android:textFontWeight="400"
android:text="Load Skybox Bar (Path)"
Expand All @@ -91,6 +92,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/test_button"
android:enabled="false"
android:textSize="18sp"
android:textFontWeight="400"
android:text="Load Skybox Blue (Bytes)"
Expand Down Expand Up @@ -131,6 +133,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/test_button"
android:enabled="false"
android:textSize="18sp"
android:textFontWeight="400"
android:text="Set Skybox Bar"
Expand All @@ -147,6 +150,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/test_button"
android:enabled="false"
android:textSize="18sp"
android:textFontWeight="400"
android:text="Set Skybox Blue"
Expand Down Expand Up @@ -281,6 +285,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/test_button"
android:enabled="false"
android:textSize="18sp"
android:textFontWeight="400"
android:text="Set Geometry and Skybox (Ground, Blue)"
Expand Down
Loading