diff --git a/korge/src/common/korlibs/korge/ui/UIMaterialLayer.kt b/korge/src/common/korlibs/korge/ui/UIMaterialLayer.kt index 6b08672942..1eadb180eb 100644 --- a/korge/src/common/korlibs/korge/ui/UIMaterialLayer.kt +++ b/korge/src/common/korlibs/korge/ui/UIMaterialLayer.kt @@ -49,8 +49,7 @@ class UIMaterialLayer( fun removeHighlight(highlight: Highlight) { view.simpleAnimator.sequence { tween( - highlight::alpha[0.0], - highlight::radiusRatio[0.0], + if (highlight.below) highlight::radiusRatio[0.0] else highlight::alpha[0.0], V2Callback { view.invalidateRender() }, time = 0.3.seconds, easing = Easing.EASE_IN) block { highlights.remove(highlight) } }