Add actor! and actor? to play-clj.ui
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{"ActorGestureListener" {"actor-gesture-listener!" :methods}
|
||||
{"Actor" {"actor!" :methods}
|
||||
"ActorGestureListener" {"actor-gesture-listener!" :methods}
|
||||
"Align" {"align" :static-fields}
|
||||
"com.badlogic.gdx.graphics.g2d.Animation" {"animation" :methods
|
||||
"animation!" :methods}
|
||||
|
||||
@@ -168,6 +168,18 @@ based on the file at `path`.
|
||||
[^WidgetGroup group children]
|
||||
(apply add! (ActorEntity. group) children))
|
||||
|
||||
; actor
|
||||
|
||||
(defmacro actor!
|
||||
"Calls a single method on an actor."
|
||||
[entity k & options]
|
||||
`(u/call! ^Actor (u/get-obj ~entity :object) ~k ~@options))
|
||||
|
||||
(defn actor?
|
||||
"Returns true if `entity` is an actor."
|
||||
[entity]
|
||||
(isa? (type (u/get-obj entity :object)) Actor))
|
||||
|
||||
; check-box
|
||||
|
||||
(defn check-box*
|
||||
|
||||
Reference in New Issue
Block a user