Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
[SOLVED] Problem when zooming
Print
Pages: [
1
]
Author
Topic: [SOLVED] Problem when zooming (Read 1478 times)
0 Members and 1 Guest are viewing this topic.
Guido_Ion
Newbie
Posts: 42
[SOLVED] Problem when zooming
«
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?
«
Last Edit: May 02, 2023, 11:04:20 pm by Guido_Ion
»
Logged
Gamepad Class for SFML ->
https://github.com/GuidoBisocoli/SFML_GamepadSupport
G.
Hero Member
Posts: 1593
Re: Problem when zooming
«
Reply #1 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.
Logged
Guido_Ion
Newbie
Posts: 42
Re: Problem when zooming
«
Reply #2 on:
May 02, 2023, 11:04:08 pm »
Thanks! Everything working now, it was simpler than I thought
Logged
Gamepad Class for SFML ->
https://github.com/GuidoBisocoli/SFML_GamepadSupport
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
[SOLVED] Problem when zooming