better job at showing hotspots.
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
[play-clj.math :refer :all]
|
||||
[play-clj.g2d :refer :all]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.edn :as edn])
|
||||
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter]
|
||||
[clojure.edn :as edn]
|
||||
[clojure.string :as str])
|
||||
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Blending Pixmap$Filter Texture Texture$TextureFilter]
|
||||
[com.badlogic.gdx.graphics.g2d TextureRegion]
|
||||
[com.badlogic.gdx.utils.viewport FitViewport]
|
||||
[com.badlogic.gdx.scenes.scene2d Actor Stage]
|
||||
@@ -42,6 +43,7 @@
|
||||
#_(Pixmap/setFilter Pixmap$Filter/NearestNeighbour)
|
||||
(pixmap! resized :draw-pixmap base-cursor (* index 16) 0 16 16
|
||||
0 0 target-width target-height)
|
||||
|
||||
resized ))
|
||||
|
||||
(defn save [entities]
|
||||
@@ -239,8 +241,14 @@
|
||||
(let [last-pos (unproject screen (get-in entities [:cursor :last-pos]))]
|
||||
(if (get-in entities [:state :active?])
|
||||
(if-let [mouse-override (find-override entities last-pos)]
|
||||
(assoc-in entities [:cursor :override] (or (:cursor mouse-override) (when (#{:main :active-main} (get-in entities [:cursor :last])) :active-main)))
|
||||
(assoc-in entities [:cursor :override] nil))
|
||||
(-> entities
|
||||
(assoc-in [:cursor :override] (or (:cursor mouse-override) (when (#{:main :active-main} (get-in entities [:cursor :last])) :active-main)))
|
||||
(assoc-in [:cursor :was-active] (get-in entities [:cursor :active]))
|
||||
(assoc-in [:cursor :active] true))
|
||||
(-> entities
|
||||
(assoc-in [:cursor :override] nil)
|
||||
(assoc-in [:cursor :was-active] (get-in entities [:cursor :active]))
|
||||
(assoc-in [:cursor :active] false)))
|
||||
entities)))
|
||||
|
||||
(def default-night-merge {:r 0.08 :g 0.1 :b 0.36 :multiply-amount 1.0 :hue-amount 1.0})
|
||||
|
||||
Reference in New Issue
Block a user