clojure.gdx.ui

act!

(act! stage ctx)

actor

(actor opts)

add-rows!

(add-rows! table rows)

rows is a seq of seqs of columns. Elements are actors or nil (for just adding empty cells ) or a map of {:actor :expand? :bottom? :colspan int :pad :pad-bottom}. Only :actor is required.

add-tooltip!

(add-tooltip! actor tooltip-text)

tooltip-text is a (fn context) or a string. If it is a function will be-recalculated every show. Returns the actor.

button?

(button? actor)

Returns true if the actor or its parent is a button.

CanAddActor

protocol

members

add!

(add! _ actor)

CanHit

protocol

members

hit

(hit _ [x y])

cells

(cells table)

change-listener

(change-listener on-clicked)

check-box

(check-box text on-clicked checked?)

on-clicked is a fn of one arg, taking the current isChecked state

checked?

children

(children group)

clear!

(clear! stage)

clear-children!

(clear-children! group)

click-listener

(click-listener f)

create-drawable

(create-drawable texture-region & {:keys [width height tint-color]})

draw!

(draw! stage ctx)

find-actor

(find-actor group name)

find-ancestor-window

(find-ancestor-window actor)

get-name

(get-name actor)

get-selected

get-text

get-x

(get-x actor)

get-y

(get-y actor)

group

(group {:keys [actors], :as opts})

horizontal-group

(horizontal-group {:keys [space pad], :as opts})

horizontal-separator-cell

(horizontal-separator-cell colspan)

image-button

(image-button texture-region on-clicked)(image-button texture-region on-clicked {:keys [scale]})

image-widget

(image-widget object {:keys [scaling align fill-parent?], :as opts})

Takes either a texture-region or drawable. Opts are :scaling, :align and actor opts.

label

(label text)

load!

(load! {:keys [skin-scale]})

pack-ancestor-window!

(pack-ancestor-window! actor)

parent

(parent actor)

remove!

(remove! actor)

remove-tooltip!

(remove-tooltip! actor)

root

(root stage)

scroll-pane

(scroll-pane actor)

select-box

(select-box {:keys [items selected]})

set-drawable!

(set-drawable! image-widget drawable)

set-touchable!

(set-touchable! actor touchable)

set-user-object!

(set-user-object! actor object)

set-visible!

(set-visible! actor visible?)

stack

(stack actors)

stage

(stage viewport batch)

table

(table opts)

text-button

(text-button text on-clicked)

text-field

(text-field text opts)

texture-region-drawable

(texture-region-drawable texture-region)

toggle-visible!

(toggle-visible! actor)

tree-node

(tree-node actor)

user-object

(user-object actor)

vertical-group

(vertical-group actors)

vertical-separator-cell

(vertical-separator-cell)

visible?

(visible? actor)

widget

(widget opts)

window

(window {:keys [title modal? close-button? center? close-on-escape?], :as opts})

window-title-bar?

(window-title-bar? actor)

Returns true if the actor is a window title bar.