commonMain.de.fabmax.kool.editor.api.AppState.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kool-editor-model Show documentation
Show all versions of kool-editor-model Show documentation
A multiplatform OpenGL / Vulkan graphics engine written in kotlin
The newest version!
package de.fabmax.kool.editor.api
import de.fabmax.kool.modules.ui2.mutableStateOf
object AppState {
var isInEditorState = mutableStateOf(false)
var appModeState = mutableStateOf(AppMode.PLAY)
val isInEditor: Boolean get() = isInEditorState.value
val appMode: AppMode get() = appModeState.value
val isEditMode: Boolean get() = appMode == AppMode.EDIT
val isPlayMode: Boolean get() = appMode == AppMode.PLAY || appMode == AppMode.PAUSE
}
enum class AppMode {
EDIT,
PLAY,
PAUSE
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy