Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | mbenoni | |
Old Version | Published before Godot 3 was released. |
Hello everybody !
Today, another question about a thing I didn’t find anywhere : the VScrollBar interaction with the mouse wheel.
I explain myself:
I’ve the following architecture :
-Control
– Panel1
— Panel2
---- GridContainer
---- VScrollBar
My Grid Container contains some panels/Sprites, and is restricted to the Panel2 zone.
My ScrollBar, by script, display some elements in the GridContainer when his value is changed.
It functions perfectly fine with clicking on the cursor of the scrollbar and moving it by hand, but next come the problem.
The problem is, if I do a mouse wheel up or down on the scrollbar it doesn’t work.
So, my question is :
Is there any mean to detect a mouse wheel up or down in a restricted zone of my UI ? (in this case, I want my mouse wheel to be detected when my mouse is in the Panel2 zone, and so in the GridContainer and VScrollBar zone also, as they are in the zone of Panel2).
I currently can detect a mouse wheel (more or less), but it detects it ALWAYS, even if i’m not in the zone I want, and I don’t want this ^^’
If you have any idea,
Thank you !