SFML community forums

Help => Graphics => Topic started by: Guido_Ion on May 02, 2023, 05:41:25 pm

Title: [SOLVED] Problem when zooming
Post by: Guido_Ion on May 02, 2023, 05:41:25 pm
Hi, I can't figure out what to do to make the text and the minimap stay in the same size when i zoom.
I zoom in the main view and the text and minimap that I'm drawing after the scene zooms also, I want them to stay the same size.
Should I create another view? As I understand the views overwrite each other, can I make a transparent View so I write the text and minimap over it and the rest is transparent so the back main view is viewed?
Or should I apply a counter-zoom to the text and the minimap?
Title: Re: Problem when zooming
Post by: G. on May 02, 2023, 06:12:11 pm
Hello.
Yes, definitely make 2 different view, one where you draw the main game and apply the zoom, and another one with the UI, text and minimap.
Nothing is drawn unless you explicitely draw something, so views are transparent by default.
Title: Re: Problem when zooming
Post by: Guido_Ion on May 02, 2023, 11:04:08 pm
Thanks! Everything working now, it was simpler than I thought :D