In v1 I updated
RackScrollWidget::offset in some of my utility modules for moving the scene around.
This seem not to work anymore since
settings::zoom was removed if I set
RackScrollWidget::offset on the same frame. I believe this is because
RackScrollWidget::Internal::oldOffset first and
RackScrollWidget::offset afterwards. I know I used unstable API but mybe I’m doing something wrong here or there is some other way.
My use-case is centering something on the screen, like a module.
I feel that I’ll have same problems (still to discover)
Did you try calling
RackWidget::setGridOffset() first and then
I’m still strugling with this. Any chance you can give me an example how to center a module in the center of the screen and setting the zoom level the same time? I tried
but I get it only working when the zoom level stays unchanged.
What if you set the zoom first?
I don’t know where the origin of the zoom scaling is?
Problem solved. My code was fine but calling
setZoom() within a widget’s
step() resulted in strange jumping within the viewport.