CustomComponent as indicator for mouseExit / mouseEnter #566
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Hi there's some info about it here : You need to create a custom component sitting below your slider with "component is at the back". Save your panel, close and open it again to redraw it with those position properties. You can use Juce triggers mouseEnters() and mouseExit() Yeah, I agree, when you have two component stacked up, the custom component has to be bigger than the slider. So the custom component working only if you want to remove or replace the message with its callback "mouseEnter()" Slider must be on top of the custom component. uiSlider triggers the script to display your message with "Called when the mouse is moved over the component" uiCustomComponent removes or resets the message with ""MouseEnter callback". It can work for different sliders since everytime you'll leave a slider area you'll activate the custom component with a "mouseEnter". There's also other ways to remove or replace your message, for exemple with a timer. If you don't need to reset the message when you leave the slider area, forget about the custom component's callbacks. Hope it helps Damien EDIT:you'll find attached a demo for this little trick |
Beta Was this translation helpful? Give feedback.
-
That's interesting that it's the order in the XML that determines whether an object sits above another. I was going to say that I remember having trouble using the send to back option, but yes I always use layers anyway! |
Beta Was this translation helpful? Give feedback.
Hi there's some info about it here :
#361 (comment)
You need to create a custom component sitting below your slider with "component is at the back".
Save your panel, close and open it again to redraw it with those position properties.
You can use Juce triggers mouseEnters() and mouseExit()
https://docs.juce.com/master/classMouseListener.html#a479dc784712648193bdc236b2c34e8bd
Yeah, I agree, when you have two component stacked up, the custom component has to be bigger than the slider.
When you go over the custom component it triggers the mouseEnter() and this is what you'll need to reset the message or replace it with the "default" one.
So the custom component working only if you want to r…