why is the scaling of my buttons offsetting my vertical scroll?

Hey,

Specific issue with my UI. I have a menu that has buttons aligned along its center:

I can scroll up and down using button presses - I have made it so the current button in the chain is always aligned in the dead center of the screen.

Currently this works perfectly all the way down my list - the buttons remain central.

However when I introduce a ‘set render scale’ so the current central button gets larger. As I now traverse the list, the buttons gradually shift away from the central position.


I’m assuming the scaled button is somehow being factored into the scroll calculation which is why its starting to drift off course. But I don’t see how because the buttons are scaling from the center and button position is taken from the center also?


So the scroll logic is here: the difference is taken between the current and next button pos and added to the original screen position when the down button is pressed

any help would be awesome !
Sam

Everyyyyynonnnnnnee!!! where are uuuuuuuu!!!

i did such nice pictures… no one?

apparently i needed a delay in there as it was sampling something that hadnt currently updated. But now i have to wait for a pause each time i scroll. But the alignment is correct now

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.