Package-level declarations

Types

Link copied to clipboard

Create in src/iosMain/kotlin/KorgeIosUIViewProvider.kt this file:

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeepOnReload

Annotate properties in your Scene class that will be persisted upon reload

Link copied to clipboard
data class Korge(val args: Array<String> = arrayOf(), val imageFormats: ImageFormat = RegisteredImageFormats, val gameWindow: GameWindow? = null, val mainSceneClass: KClass<out Scene>? = null, val timeProvider: TimeProvider = TimeProvider, val injector: Injector = Injector(), val configInjector: Injector.() -> Unit = {}, val debug: Boolean = false, val trace: Boolean = false, val context: Any? = null, val fullscreen: Boolean? = null, val blocking: Boolean = true, val gameId: String = DEFAULT_GAME_ID, val settingsFolder: String? = null, val batchMaxQuads: Int = BatchBuilder2D.DEFAULT_BATCH_QUADS, val windowSize: Size = DefaultViewport.SIZE, val virtualSize: Size = windowSize, val displayMode: KorgeDisplayMode = KorgeDisplayMode.DEFAULT, val title: String = "Game", val backgroundColor: RGBA? = Colors.BLACK, val quality: GameWindow.Quality = GameWindow.Quality.PERFORMANCE, val icon: String? = null, val multithreaded: Boolean? = null, val forceRenderEveryFrame: Boolean = true, val windowCreationConfig: GameWindowCreationConfig = GameWindowCreationConfig(fullscreen = fullscreen, multithreaded = multithreaded), val main: suspend Stage.() -> Unit = {}, val debugAg: Boolean = false, val debugFontExtraScale: Double = 1.0, val debugFontColor: RGBA = Colors.WHITE, val stageBuilder: (Views) -> Stage = { Stage(it) }, val targetFps: Double = 0.0, val preferSyncIo: Boolean? = null, val unit: Unit = Unit)
Link copied to clipboard
typealias KorgeConfig = Korge
Link copied to clipboard
data class KorgeDisplayMode(val scaleMode: ScaleMode, val scaleAnchor: Anchor, val clipBorders: Boolean)
Link copied to clipboard
Link copied to clipboard
data class KorgeIosUIViewInfo(val controller: ViewController, val view: UIView)
Link copied to clipboard
Link copied to clipboard
class KorgeReloadClassLoader(val extraFolders: List<String> = emptyList(), val allEntries: List<File> = (extraFolders + System.getProperty("java.class.path").split(File.pathSeparator)).map { File(it).absoluteFile }.distinct(), val jars: List<File> = allEntries.filter { it.name.endsWith(".jar") }, val folders: List<File> = allEntries.filter { !it.name.endsWith(".jar") }, parent: ClassLoader? = null) : ClassLoader
Link copied to clipboard

Entry point for games written in Korge. You have to call the Korge method by either providing some parameters, or a Korge.Config object.

Link copied to clipboard
class KorgeUIView(val controller: ViewController) : UIView
Link copied to clipboard
class ReloadClassContext(val injector: Injector, val refreshedClasses: Set<String>, val rootFolders: List<String>)
Link copied to clipboard
data class ReloadEvent(val refreshedClasses: Set<String>, val reloadSuccess: Boolean, val rootFolders: List<String>) : Event, TEvent<ReloadEvent>
Link copied to clipboard
Link copied to clipboard
interface ViewsCompleter

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun Korge.glCanvas(block: suspend Stage.() -> Unit): GLCanvasWithKorge
Link copied to clipboard
fun GLCanvasWithKorge(config: KorgeConfig, block: suspend Stage.() -> Unit): GLCanvasWithKorge
Link copied to clipboard
suspend fun KorgeConfig.headless(ag: AG = AGDummy(this.windowSize), devicePixelRatio: Double = 1.0, draw: Boolean = false, entry: suspend Stage.() -> Unit): KorgeHeadless.HeadlessGameWindow
Link copied to clipboard
fun jvmAddOpensList(mac: Boolean = true, linux: Boolean = true): List<String>
Link copied to clipboard

Call this as soon as possible to create a new process with the JVM --add-opens

Link copied to clipboard
suspend fun Korge(entry: suspend Stage.() -> Unit)
suspend fun Korge(args: Array<String> = arrayOf(), imageFormats: ImageFormat = RegisteredImageFormats, gameWindow: GameWindow? = null, mainSceneClass: KClass<out Scene>? = null, timeProvider: TimeProvider = TimeProvider, injector: Injector = Injector(), configInjector: Injector.() -> Unit = {}, debug: Boolean = false, trace: Boolean = false, context: Any? = null, fullscreen: Boolean? = null, blocking: Boolean = true, gameId: String = Korge.DEFAULT_GAME_ID, settingsFolder: String? = null, batchMaxQuads: Int = BatchBuilder2D.DEFAULT_BATCH_QUADS, windowWidth: Int = DefaultViewport.SIZE.width.toInt(), windowHeight: Int = DefaultViewport.SIZE.height.toInt(), windowSize: Size = Size(windowWidth, windowHeight), virtualWidth: Int = windowSize.width.toInt(), virtualHeight: Int = windowSize.height.toInt(), virtualSize: Size = Size(virtualWidth, virtualHeight), scaleMode: ScaleMode = ScaleMode.SHOW_ALL, scaleAnchor: Anchor = Anchor.CENTER, clipBorders: Boolean = true, displayMode: KorgeDisplayMode = KorgeDisplayMode(scaleMode, scaleAnchor, clipBorders), title: String = "Game", bgcolor: RGBA? = Colors.BLACK, backgroundColor: RGBA? = bgcolor, quality: GameWindow.Quality = GameWindow.Quality.PERFORMANCE, icon: String? = null, multithreaded: Boolean? = null, forceRenderEveryFrame: Boolean = true, main: suspend Stage.() -> Unit = {}, debugAg: Boolean = false, debugFontExtraScale: Double = 1.0, debugFontColor: RGBA = Colors.WHITE, stageBuilder: (Views) -> Stage = { Stage(it) }, targetFps: Double = 0.0, preferSyncIo: Boolean? = null, entry: suspend Stage.() -> Unit = {})
Link copied to clipboard
suspend fun KorgeWithConfig(config: KorgeConfig, entry: suspend Stage.() -> Unit)