From 48618beb19a413a02e446b05358dfc67b5fee593 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 28 Feb 2025 22:28:03 +0800 Subject: [PATCH] feat:fadeout support up direction slide fadeout --- maomao.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maomao.c b/maomao.c index 3809b65..da426a7 100644 --- a/maomao.c +++ b/maomao.c @@ -5680,9 +5680,10 @@ void init_fadeout_client(Client *c) { c->animation.initial = c->animation.current; fadeout_cient->mon = c->mon; // 这里snap节点的坐标设置是使用的相对坐标,所以不能加上原来坐标 - // 这根普通node有区别 - fadeout_cient->current.y = - c->mon->m.height - (c->animation.current.y - c->mon->m.y); + // 这跟普通node有区别 + fadeout_cient->current.y = c->geom.y+c->geom.height/2 > c->mon->m.y+c->mon->m.height/2 + ? c->mon->m.height - (c->animation.current.y - c->mon->m.y) //down out + : c->mon->m.y - c->geom.height; //up out fadeout_cient->current.x = 0; // x无偏差,垂直划出 fadeout_cient->animation.passed_frames = 0; fadeout_cient->animation.total_frames =