implemented library of items.

This commit is contained in:
2014-10-14 12:57:12 -07:00
parent de2a4f8c7c
commit 2c046134f8
7 changed files with 26 additions and 20 deletions

View File

@@ -45,7 +45,7 @@
(render! screen [(:fade entities) (:overlay entities)])
(render! screen (:items entities))
(if-let [item (:highlighted-item entities)]
(label! (:highlighted-text entities) :set-text (name item))
(label! (:highlighted-text entities) :set-text (:name item))
(label! (:highlighted-text entities) :set-text ""))
(render! screen [(:highlighted-text entities)]))
entities))
@@ -60,7 +60,7 @@
offset-y (+ y (/ item-width 2))
padding (/ item-width 2)
padding (* 4 padding)]]
(assoc (texture (aget (:all-items entities) 0 (.indexOf utils/+all-cursors+ item)))
(assoc (texture (aget (:all-items entities) 0 (.indexOf utils/+all-cursors+ (:cursor item))))
:x x :y y
:scale-x 4
:scale-y 4