You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to make a button widget with a custom hitbox. This hitbox should be used for both click and hover events (including styleHover). My approach so far is to define a custom widget using createSingle.
From the documentation, it sounds like Single.singleFindByPoint would allow me to achieve my goal. It seems that this affects which SystemEvent.Click events reach the widget (and maybe SystemEvent.Enter, but I have not tested this). However, it does not seem to affect when the styleHover style is applied. Indeed, setting singleFindByPoint to a function that always returns Nothing still applies hover style changes when the mouse is moved across the widget.
I am not sure if this is a bug or intended behavior. In either case, it would be very useful if singleFindByPoint would take care of both the SystemEvents, aswell as the styleHover behavior.
I want to make a button widget with a custom hitbox. This hitbox should be used for both click and hover events (including
styleHover
). My approach so far is to define a custom widget usingcreateSingle
.From the documentation, it sounds like
Single.singleFindByPoint
would allow me to achieve my goal. It seems that this affects whichSystemEvent.Click
events reach the widget (and maybeSystemEvent.Enter
, but I have not tested this). However, it does not seem to affect when thestyleHover
style is applied. Indeed, settingsingleFindByPoint
to a function that always returnsNothing
still applies hover style changes when the mouse is moved across the widget.I am not sure if this is a bug or intended behavior. In either case, it would be very useful if
singleFindByPoint
would take care of both theSystemEvent
s, aswell as thestyleHover
behavior.As an aside, the documentation at https://hackage.haskell.org/package/monomer-1.6.0.1/docs/Monomer-Widgets-Single.html#t:SingleFindByPointHandler mentions that
Monomer.Widgets.Singles.Radio
is an example using this override. However, this seems to not be the case. Instead,Radio
seems to overridesingleGetCurrentStyle
to achieve the desired style changes with elliptical hit detection.The text was updated successfully, but these errors were encountered: