progress.
This commit is contained in:
@@ -1471,6 +1471,8 @@ void main ()
|
||||
(tween/tween :appear-item screen [:selected-item :opacity] 1.0 0.0 0.5 :ease tween/ease-in-out-quadratic)
|
||||
(tween/tween :appear-item screen [:selected-item :opacity] 0.0 1.0 0.5 :ease tween/ease-in-out-quadratic))
|
||||
move-tween (condp = in-or-out
|
||||
:far-out
|
||||
(tween/tween :appear-item-y screen [:selected-item :y] 35 40 0.5 :ease tween/ease-in-out-quadratic)
|
||||
:out
|
||||
(tween/tween :appear-item-y screen [:selected-item :y] 30 35 0.5 :ease tween/ease-in-out-quadratic)
|
||||
|
||||
@@ -1482,7 +1484,15 @@ void main ()
|
||||
(-> entities
|
||||
(assoc :selected-item
|
||||
(assoc (texture (aget (get-in entities [:all-items]) 0 (.indexOf utils/+all-cursors+ (:cursor item))))
|
||||
:x 300 :y 40 :baseline 9000 :opacity 0.0
|
||||
:x 300 :y (condp = in-or-out
|
||||
:in
|
||||
35
|
||||
:out
|
||||
30
|
||||
:none
|
||||
35
|
||||
:far-out
|
||||
35) :baseline 9000 :opacity (if (= :hide hide-or-show) 1.0 0.0)
|
||||
:item item))
|
||||
(assoc-in [:tweens :appear-item] fade-tween)
|
||||
(assoc-in [:tweens :appear-item-y] move-tween))))
|
||||
@@ -1557,7 +1567,7 @@ void main ()
|
||||
[screen entities state state-data]
|
||||
(let [current-item (get-in entities [:inv-fsm :state-data])
|
||||
transitions (if (= state-data current-item )
|
||||
[(appear-transition state-data :hide :none)
|
||||
[(appear-transition state-data :hide :far-out)
|
||||
(reify ITransition
|
||||
(start-transition [this screen entities]
|
||||
(-> entities
|
||||
@@ -1565,7 +1575,8 @@ void main ()
|
||||
(transition-done? [this screen entities]
|
||||
true))]
|
||||
[(appear-transition current-item :hide :in)
|
||||
(appear-transition state-data :hide :out)
|
||||
(appear-transition state-data :show :out)
|
||||
(appear-transition state-data :hide :far-out)
|
||||
(reify ITransition
|
||||
(start-transition [this screen entities]
|
||||
(-> entities
|
||||
|
||||
Reference in New Issue
Block a user