actually get ladder, also fixes performance problem.

This commit is contained in:
2014-11-19 16:02:59 -08:00
parent 50a9423205
commit db97c2d76f
5 changed files with 22 additions and 16 deletions

View File

@@ -85,13 +85,13 @@
{}))))
:on-mouse-moved (fn [screen [entities]]
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})
font (bitmap-font "ego/font.fnt" )]
(when (seq entities)
(doseq [index (range (dec (count entities)))]
(if (< (* index 30) y (* (inc index) 30))
(label! (entities index) :set-style (style :label font (color :yellow)))
(label! (entities index) :set-style (style :label font (color :white))))))))
(when (seq entities)
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})
font (bitmap-font "ego/font.fnt" )]
(doseq [index (range (dec (count entities)))]
(if (< (* index 30) y (* (inc index) 30))
(label! (entities index) :set-style (style :label font (color :yellow)))
(label! (entities index) :set-style (style :label font (color :white))))))))
:on-resize (fn [screen entities]
(size! screen 1280 960)))