Skip to content

Commit 673bc41

Browse files
committed
Add onHoverOut.
1 parent b4e0137 commit 673bc41

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/fidget.nim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ template onHover*(inner: untyped) =
188188
if mouseOverlapLogic():
189189
inner
190190

191+
template onHoverOut*(inner: untyped) =
192+
## Code in the block will run when hovering outside the box.
193+
if not mouseOverlapLogic():
194+
inner
195+
191196
template onDown*(inner: untyped) =
192197
## Code in the block will run when this mouse is dragging.
193198
if mouse.down and mouseOverlapLogic():

0 commit comments

Comments
 (0)