Add clearReloadables
This commit is contained in:
@@ -60,6 +60,8 @@ import org.openrndr.draw.*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
The Reloadable store can be cleared using the `clearReloadables` function
|
||||||
|
|
||||||
Keep in mind that `Reloadable` should only be used for singleton classes.
|
Keep in mind that `Reloadable` should only be used for singleton classes.
|
||||||
|
|
||||||
## Persistent Data
|
## Persistent Data
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ import kotlin.reflect.jvm.jvmName
|
|||||||
|
|
||||||
private val store = mutableMapOf<String, Any>()
|
private val store = mutableMapOf<String, Any>()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear reloadable values
|
||||||
|
*/
|
||||||
|
fun clearReloadables() {
|
||||||
|
store.clear()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class with which persistent state can be reloaded from inside Olive scripts.
|
* A class with which persistent state can be reloaded from inside Olive scripts.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user