![]() |
GUI scaling
Is it possible to actually scale a GUI control to always have a certain size on the players screen no matter his/her resolution? If not, why not Stefan? :\
|
Could this help? http://wiki.graal.net/index.php/Crea...GuiStretchCtrl
|
Quote:
|
Quote:
I suppose it would be possible to make a function that generates the proper width and height (from say widthp and heightp) when you pass a GUI object, and also sets handlers for when the screenheight/screenwidth is changed. |
Quote:
|
Quote:
|
Well, actually scaling the graphics, for say different DPI, would be a different problem, because that would require scalable vector graphics (which would be a whole other path to travel down); but, resizing the controls for different screen sizes would not be difficult and potentially useful.
|
Quote:
|
Quote:
|
Problem with GUIstretch is that it uses bilinear scaling, which generally looks pretty damn bad with transparency. It would be nice if it was nearest-neighbor instead.
|
Quote:
Quote:
|
Quote:
|
Quote:
|
Something like this would be cool:
PHP Code:
|
This would be an awesome addition, though I'd rather seeing it work something like
PHP Code:
|
Isn't that exactly what GuiStretchCtrl is doing, though? It scales all children controls with it, as well.
|
Quote:
PHP Code:
|
Quote:
|
Quote:
|
The major difference would be that defining the dimensions using screenheight/screenwidth would result in them being set statically, once.
If they were set as percents, then they would dynamically change as the screen dimensions change. The only way to do this currently would be hooks and something to manage all your GUI controls (which I suggested in the 4th post of this thread). |
Quote:
This is how many GUI Toolkits work. |
| All times are GMT +2. The time now is 05:28 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.