oakes / play-clj

A Clojure game library
The Unlicense
939 stars 73 forks source link

`:on-ui-clicked` does not seem to work. #60

Closed zackp30 closed 9 years ago

zackp30 commented 9 years ago

Code:

  :on-ui-clicked
  (fn [screen entities]
    (println (:event screen))
     entities))

This does not print the :event key.

:on-ui-changed however, does.

oakes commented 9 years ago

The :on-ui-changed event is the correct one to use; it is based on ChangeListener's "changed" method. The :on-ui-clicked event comes from ClickListener's "clicked" method. I wrapped it for the sake of completeness, but I'm not sure what its behavior is supposed to be.

zackp30 commented 9 years ago

Aha! I see, thanks!