@@ -123,7 +123,8 @@ local PROGRESS={}
123
123
---- ----------------------------------------------------------
124
124
-- Save & Load
125
125
126
- --- @param step nil
126
+ --- @async
127
+ --- @param step nil | ' yield' | ' save'
127
128
function PROGRESS .save (step )
128
129
if step == nil then
129
130
-- Wait 1 frame before saving
@@ -289,14 +290,17 @@ function PROGRESS.applyEnv(env)
289
290
02 * cos (rc + w * 2. ),02 * sin (rc + w * 2. )
290
291
end
291
292
updateCursor (.55 )
293
+ local _wid1 ,_wid2
294
+ local function cursor_anim (t ) updateCursor (MATH .lerp (_wid1 ,_wid2 ,t )) end
295
+ local function cursor_anim2 (t ) msColor [4 ]= 1 - t end
292
296
function ZENITHA .globalEvent .mouseDown (x ,y ,k )
293
297
msColor [1 ],msColor [2 ],msColor [3 ]= unpack (k == 1 and COLOR .lP or k == 2 and COLOR .lS or COLOR .lR )
294
298
msColor [4 ]= 1
295
299
296
300
TWEEN .tag_kill (' cursor_anim' )
297
- local _wid = msWidth
298
- TWEEN .new (function (t ) updateCursor (MATH .lerp (_wid ,.4 ,t )) end ):setTag (' cursor_anim' ):setDuration (.0626 ):run ()
299
301
TWEEN .tag_kill (' cursor_anim2' )
302
+ _wid1 ,_wid2 = msWidth ,.4
303
+ TWEEN .new (cursor_anim ):setTag (' cursor_anim' ):setDuration (.0626 ):run ()
300
304
301
305
if k == 1 then SYSFX .ripple (.26 ,x ,y ,26 ,.8 ,.62 ,1 )
302
306
elseif k == 2 then SYSFX .ripple (.26 ,x ,y ,26 ,.62 ,.8 ,1 )
@@ -309,11 +313,10 @@ function PROGRESS.applyEnv(env)
309
313
function ZENITHA .globalEvent .mouseUp (x ,y ,k )
310
314
if not love .mouse .isDown (1 ,2 ,3 ) then
311
315
TWEEN .tag_kill (' cursor_anim' )
312
- local _wid = msWidth
313
- TWEEN .new (function ( t ) updateCursor ( MATH . lerp ( _wid , .55 , t )) end ):setTag (' cursor_anim' ):setDuration (.0626 ):run ()
314
- TWEEN .new (function ( t ) msColor [ 4 ] = 1 - t end ):setEase (' Linear' ):setTag (' cursor_anim2' ):setDuration (1 ):run ()
316
+ _wid1 , _wid2 = msWidth , .55
317
+ TWEEN .new (cursor_anim ):setTag (' cursor_anim' ):setDuration (.0626 ):run ()
318
+ TWEEN .new (cursor_anim2 ):setEase (' Linear' ):setTag (' cursor_anim2' ):setDuration (1 ):run ()
315
319
end
316
-
317
320
SFX .play (' mouse_up' )
318
321
end
319
322
0 commit comments