FoldButton

表示可折叠按钮的小部件,可以通过点击打开或关闭,带有动画效果。用于在UI中创建可扩展的部分。

A widget representing a foldable button that can be opened or closed with animation. Useful for creating expandable sections in a UI.

Props

decoratenametypedescription
animatoranimatorAnimatorHandles the animations for the fold button.
redraw, livedraw_bgDrawQuadDefines the background drawing properties of the fold button.
liveabs_sizeDVec2Defines the absolute size of the fold button.
liveabs_offsetDVec2Defines the absolute offset position of the fold button.
walkwalkWalkDefines how the fold button should be positioned and sized within its parent.

See DrawQuad

See DVec2

See Walk

See Animator

Event

namedescription
OpeningTriggered when the fold button is opened.
ClosingTriggered when the fold button is closed.
Animating(f64)Triggered when the fold button is animating with a value representing the animation progress.