- Home /
Best Practices, GUI and Browser Zoom, Scaling
I wanted to ask how most of you guys deal with changes in Browser Zoom (example: 100% to say 125%), when figuring out GUI positioning. Do you have a function that looks for updates in the screen.width and screen.height every update? This GUI in question is a friends bar on the bottom of the screen for a Facebook Application.
Some individuals have stated to position GUI objects properly, such as Menu, Buttons, and user profile pictures, you should set positions to % of the total screen width + height. Ex: 20% from the top left of the screen. Another approach would be to hard code a position, and modifying position +/- through via the amount scaled.
Which is the better approach, or perhaps a better 3rd approach to this?
Also, what is a good amount to scale of game objects, etc, whenever a player would zoom in or out ex: 100% - 125%? Static objects, such as the general menu interface is easy, it is just 1 texture 2d, set to 25% of the height, and 100% of the width. Things like buttons, and Facebook profile pictures are a bit trickier to position via %'s or general scale.
Thanks in advance for your help.
Your answer
Follow this Question
Related Questions
GUI box scaling issue [C#] 0 Answers
ReScaling with easing?! 1 Answer
How to scale a GUI (Lagacy) grid? 1 Answer
Raycast misses after camera zoom 2 Answers
How can I convert a world space point to screen, with canvas scaling? 1 Answer