rows of inventory items.
This commit is contained in:
@@ -59,8 +59,12 @@
|
||||
:show-screen (fn [{items :items} [entities]]
|
||||
(assoc entities :start-showing? true
|
||||
:items (for [[item index] (map vector items (range))
|
||||
:let [x (+ (* 79 4) (* index (* 24 4)))
|
||||
y (* 4 180)
|
||||
:let [row (int (/ index 8))
|
||||
column (mod index 8)
|
||||
base-x (* 79 4)
|
||||
base-y (* 180 4)
|
||||
x (+ base-x (* column (* 24 4)))
|
||||
y (- base-y (* row (* 24 4)))
|
||||
item-width 16
|
||||
offset-x (+ x (/ item-width 2))
|
||||
offset-y (+ y (/ item-width 2))
|
||||
|
||||
Reference in New Issue
Block a user