actually get ladder, also fixes performance problem.
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user