camera option
This commit is contained in:
@@ -1 +1 @@
|
||||
60
|
||||
61
|
||||
|
||||
@@ -1221,7 +1221,8 @@ void main ()
|
||||
[id ((:update-fn entity) screen entities entity)]
|
||||
[id entity])))))
|
||||
|
||||
entities (if (and (not (get-in entities [:cam :paused?]))
|
||||
entities (if (and (@utils/settings :camera-man? true)
|
||||
(not (get-in entities [:cam :paused?]))
|
||||
(nil? (get-in entities [:tweens :cam-x]))
|
||||
(= 1 (rand-int 20)))
|
||||
(if (= (rand-int 2) 1)
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
(doto (merge (check-box msg s)
|
||||
(apply hash-map rest))
|
||||
(set-checkbox-state (utils/is-fullscreen?))
|
||||
(set-checkbox-state checked)
|
||||
save-object))))
|
||||
|
||||
(defn make-label
|
||||
@@ -253,17 +253,20 @@
|
||||
[ (make-button "Back" :key :back) :height 56]])))
|
||||
|
||||
(defn settings-menu []
|
||||
(let [fullscreen-button (make-checkbox "Fullscreen" (utils/is-fullscreen?) :key :toggle-fullscreen)]
|
||||
(let [fullscreen-button (make-checkbox "Fullscreen" (utils/is-fullscreen?) :key :toggle-fullscreen)
|
||||
cameraman-button (make-checkbox "Handheld Camera" (@utils/settings :camera-man? true) :key :camera-man?)]
|
||||
|
||||
(assoc (make-table [[(make-label "Music" label-color) :height 40 :pad-bottom 4]
|
||||
(assoc (make-table [[(make-label "Music" label-color) :height 40]
|
||||
:row
|
||||
[(make-slider (:music-volume @utils/settings) :key :music-volume-slider) :width 240 :pad-bottom 4]
|
||||
[(make-slider (:music-volume @utils/settings) :key :music-volume-slider) :width 240]
|
||||
:row
|
||||
[(make-label "FX" label-color) :height 40 :width 200 :pad-bottom 4]
|
||||
[(make-label "FX" label-color) :height 40 :width 200]
|
||||
:row
|
||||
[(make-slider (:sound-volume @utils/settings) :key :sound-volume-slider) :width 240 :pad-bottom 4]
|
||||
[(make-slider (:sound-volume @utils/settings) :key :sound-volume-slider) :width 240]
|
||||
:row
|
||||
[fullscreen-button :height 56 :pad-bottom 4 :width 240]
|
||||
[fullscreen-button :height 56 :width 240]
|
||||
:row
|
||||
[cameraman-button :height 56 :width 280]
|
||||
|
||||
:row
|
||||
[ (make-button "Back" :key :back) :height 56 :width 240]])
|
||||
@@ -450,6 +453,11 @@
|
||||
(utils/save-settings!)
|
||||
entities)
|
||||
|
||||
(= :camera-man? actor-key)
|
||||
(do (swap! utils/settings assoc :camera-man? (check-box! e :is-checked))
|
||||
(utils/save-settings!)
|
||||
entities)
|
||||
|
||||
(= :sound-volume-slider actor-key)
|
||||
(do (swap! utils/settings assoc :sound-volume (slider! e :get-value))
|
||||
(utils/save-settings!)
|
||||
|
||||
Reference in New Issue
Block a user