Introduce (game :point-x) and (game :point-y) to preserve backwards compatibility
This commit is contained in:
@@ -94,15 +94,17 @@
|
|||||||
"Provides quick access to often-used functions.
|
"Provides quick access to often-used functions.
|
||||||
|
|
||||||
(game :width)"
|
(game :width)"
|
||||||
[k]
|
[k & [arg]]
|
||||||
(case k
|
(case k
|
||||||
:width (graphics! :get-width)
|
:width (graphics! :get-width)
|
||||||
:height (graphics! :get-height)
|
:height (graphics! :get-height)
|
||||||
:fps (graphics! :get-frames-per-second)
|
:fps (graphics! :get-frames-per-second)
|
||||||
:fullscreen? (graphics! :is-fullscreen)
|
:fullscreen? (graphics! :is-fullscreen)
|
||||||
:touched? (input! :is-touched)
|
:touched? (input! :is-touched)
|
||||||
:x (input! :get-x)
|
:x (input! :get-x) ; deprecated, use :point-x instead
|
||||||
:y (- (graphics! :get-height) (input! :get-y))
|
:y (input! :get-y) ; deprecated, use :point-y instead (it is flipped)
|
||||||
|
:point-x (input! :get-x (or arg 0))
|
||||||
|
:point-y (- (graphics! :get-height) (input! :get-y (or arg 0)))
|
||||||
(u/throw-key-not-found k)))
|
(u/throw-key-not-found k)))
|
||||||
|
|
||||||
(defmacro key-code
|
(defmacro key-code
|
||||||
|
|||||||
Reference in New Issue
Block a user