SensiUKesi
(SensiUKesi)
February 22, 2021, 11:22am
1
By default Scroll multipler is *1, what all affect on it?How i can calculate to be per pixel?
For example in my case i want to calculate to be per 100 pixels becouse in my array of list i have child widget with 100pixels height so i want to scroll per one child widget…
Everynone
(Everynone)
February 22, 2021, 11:36am
2
so i want to scroll per one child
widget…
You could spend a couple of hours calculating the necessary geometry, vectors, offset, DPIs and whatnot… but you can do this instead:
And tell the Scrollbox
which widget to scroll to by Index . Let’s say you scroll with a mouse wheel:
positive & negative mouse delta adds to / subtracts from an Int value that is clamped to the array length
use this value to fetch a Scrollbox
child or an array element
The added bonus here is that you no longer need to care about the dimensions. On top of that, you can even have each child be of different size…
1 Like
SensiUKesi
(SensiUKesi)
February 22, 2021, 12:40pm
3
It should look like this?
Everynone
(Everynone)
February 22, 2021, 12:45pm
4
Not really. You just need to provide the Index of the item. There’s no need to loop anything.
How are you intending to scroll through items? Mouse wheel? Buttons? Something else?
SensiUKesi
(SensiUKesi)
February 22, 2021, 12:48pm
5
Im not sure that this is correct way to do it cus it not look like it should
This is List scrolled to Top
And this is scrolled to nearly bottom
Last slot of design is not in use cus there should be backpack info and there is no padding
between child slots at least I didn’t put it on, maybe UE is make padding by self?
Everynone
(Everynone)
February 22, 2021, 2:24pm
7
To get the very top / bottom widget scroll into view correctly, you’d need to pad the scroll box with some dummy invisible objects and adjust clamps.
1 Like
SensiUKesi
(SensiUKesi)
February 22, 2021, 2:43pm
8
Whoa bro, thanks a lot, im so grateful. Im strugling with this whole day, if i can help for some 3d models maybe just say Thanks a lot again!