Hi! I have a couple of questions about scrollview. How can i force scrollers to never draw? How to make scroll wheel events work with horizontal scrollview?
I was able to hide scrollers by doing this
root.Q<Scroller>().style.display = DisplayStyle.None;
Horizontal scrolling is working
scrollView.RegisterCallback<WheelEvent>(ev => OnScroll(ev));
private void OnScroll(WheelEvent ev)
{
scrollView.scrollOffset = new Vector2(scrollView.scrollOffset.x + 10 * ev.delta.y, scrollView.scrollOffset.y);
}
Also i had to divide ev.delta.y by 3 because its scrolls wrongly for some reason
This will not work
//scroll by 100 pixels on each event fire
100 * ev.delta.y
This is working
//scroll by 100 pixels on each event fire
100 * (ev.delta.y / 3)