[orx-parameters, orx-property-watchers, orx-file-watcher, orx-gui] Add @PathParameter, file watcher delegates and property delegates
This commit is contained in:
@@ -31,6 +31,10 @@ fun Any.listParameters(): List<Parameter> {
|
||||
var vectorRange = Pair(Vector2(-1.0, -1.0), Vector2(1.0, 1.0))
|
||||
var invertY: Boolean? = null
|
||||
var showVector: Boolean? = null
|
||||
var absolutePath: Boolean? = null
|
||||
var pathContext: String? = null
|
||||
var pathExtensions: Array<String>? = null
|
||||
var pathIsDirectory: Boolean? = null
|
||||
|
||||
for (it in annotations) {
|
||||
type = ParameterType.forParameterAnnotationClass(it)
|
||||
@@ -95,6 +99,13 @@ fun Any.listParameters(): List<Parameter> {
|
||||
label = it.label
|
||||
order = it.order
|
||||
}
|
||||
is PathParameter -> {
|
||||
label = it.label
|
||||
absolutePath = it.absolute
|
||||
pathContext = it.context
|
||||
pathExtensions = it.extensions
|
||||
pathIsDirectory = it.directory
|
||||
}
|
||||
}
|
||||
}
|
||||
Parameter(
|
||||
@@ -109,7 +120,12 @@ fun Any.listParameters(): List<Parameter> {
|
||||
precision = precision,
|
||||
showVector = showVector,
|
||||
invertY = invertY,
|
||||
order = order
|
||||
absolutePath = absolutePath,
|
||||
pathContext = pathContext,
|
||||
pathExtensions = pathExtensions,
|
||||
pathIsDirectory = pathIsDirectory,
|
||||
order = order,
|
||||
|
||||
)
|
||||
} + this::class.declaredMemberFunctions.filter {
|
||||
it.findAnnotation<ActionParameter>() != null
|
||||
@@ -130,6 +146,10 @@ fun Any.listParameters(): List<Parameter> {
|
||||
precision = null,
|
||||
showVector = null,
|
||||
invertY = null,
|
||||
absolutePath = null,
|
||||
pathContext = null,
|
||||
pathExtensions = null,
|
||||
pathIsDirectory = null,
|
||||
order = order
|
||||
)
|
||||
}).sortedBy { it.order }
|
||||
|
||||
Reference in New Issue
Block a user