-
-
Notifications
You must be signed in to change notification settings - Fork 156
Expand file tree
/
Copy pathExamplesLibrary.kt
More file actions
28 lines (23 loc) · 703 Bytes
/
ExamplesLibrary.kt
File metadata and controls
28 lines (23 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package processing.app.ui
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
class ExamplesLibrary{
companion object{
@JvmStatic
fun main(args: Array<String>) = application {
val active = remember { mutableStateOf(true) }
if(!active.value){
Window(onCloseRequest = ::exitApplication) {
}
return@application
}
Window(
onCloseRequest = { active.value = false },
) {
ExamplesLibrary()
}
}
}
}