[orx-olive] Fix problem with requestAssets and produceAssets events
This commit is contained in:
@@ -87,7 +87,10 @@ class Olive<P : Program>(val resources: Resources? = null, private var scriptMod
|
|||||||
program.window.minimized,
|
program.window.minimized,
|
||||||
program.window.moved,
|
program.window.moved,
|
||||||
program.window.sized,
|
program.window.sized,
|
||||||
program.window.unfocused)
|
program.window.unfocused,
|
||||||
|
program.requestAssets,
|
||||||
|
program.produceAssets
|
||||||
|
)
|
||||||
|
|
||||||
trackedListeners.forEach { it.saveListeners(store) }
|
trackedListeners.forEach { it.saveListeners(store) }
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import java.nio.file.Paths
|
|||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
import kotlin.streams.toList
|
import kotlin.streams.toList
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class OliveProgram(private val sourceLocation: String, private val scriptHost: OliveScriptHost, resources: Resources?) : Program() {
|
open class OliveProgram(private val sourceLocation: String, private val scriptHost: OliveScriptHost, resources: Resources?) : Program() {
|
||||||
val olive = extend(Olive<OliveProgram>(scriptMode = ScriptMode.OLIVE_PROGRAM, resources = resources)) {
|
val olive = extend(Olive<OliveProgram>(scriptMode = ScriptMode.OLIVE_PROGRAM, resources = resources)) {
|
||||||
script = sourceLocation
|
script = sourceLocation
|
||||||
@@ -28,7 +26,6 @@ class Once<T:Any>(val build:() -> T) {
|
|||||||
operator fun getValue(thisRef:Any?, property:KProperty<*>) : T = values.getOrPut(property.name) { build() } as T
|
operator fun getValue(thisRef:Any?, property:KProperty<*>) : T = values.getOrPut(property.name) { build() } as T
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun stackRootClassName(thread: Thread = Thread.currentThread(), sanitize: Boolean = true): String {
|
fun stackRootClassName(thread: Thread = Thread.currentThread(), sanitize: Boolean = true): String {
|
||||||
val root = Thread.currentThread().stackTrace.last()
|
val root = Thread.currentThread().stackTrace.last()
|
||||||
val rootClass = root.className
|
val rootClass = root.className
|
||||||
|
|||||||
Reference in New Issue
Block a user