       (<! (fadein b :duration fade-in))
 
       ;; show load progress
-      (<! (apply (partial load-urls urls b) options))
+      (<! (apply
+           (partial resources/load-urls urls
+                    (fn [i num-urls url obj]
+                      (set! (.-texture b)
+                            (progress-texture (/ i num-urls) options))))
+           options))
 
       ;; load is done. return message
       ;(>! c true)


;; where we store all the loaded textures keyed by name
(defonce !textures (atom {}))

(defn progress-texture
  "Draws an empty box that can serve as a default progress bar for preloading images"

    (set! (.-src i) url)
    c))

(defmethod resources/load "png" [url] (load url))
(defmethod resources/load "gif" [url] (load url))
(defmethod resources/load "jpg" [url] (load url))

(defn fadeout [spr & {:keys [duration start end]
                        :or {duration 1 start nil end 0}}]
