GuiRoot:GetWidth() question
GuiRoot:GetWidth() is returning a completely different value when I am in windowed mode versus full screen. It is actually returning a value my monitor does not even support(too large). I was wondering if anyone had any similar issue and a work around...or if there are completely different functions for a windowed setup.
|
UI units are not necessarily equal to pixels. If GetUIGlobalScale() returns something other than 1, they're different. You can change the scale in settings (I think, if not, see CustomUIScale in UserSettings.txt).
|
sorry should have posted sooner....I was not setting(min, max) when changing...now I have an ugly workaround...do you, or anyone else, know an event that can tell if I am switching windowed/full screen?
on a side note the ui stuff should be 1-1 pixel ratio...unless they are prjected on a different layer in 3d space...but I am also very very new to this api....I just wrapped up the basics for my plugin that took me like 3-4 days in my off work off family and kids time...so all in all about 4 hours...for a simple xp bar...anyone here could have probably don it it about 10 minutes :) lol...but hey that's still progress. |
Quote:
Quote:
|
they are, unless they are being altered in another way, like drawing a view to a specific camera and layer, then changing the aspect ratio. or if they are sub/super sampled....but they do not appear to be. I will have to take your word for it though :)
|
Perhaps we're talking about different things. If you have 2 textures for example:
Lua Code:
1) doesn't mean tex1 is 100x100px; it can be 67x67px, if GetUIGlobalScale() == 0.67 2) doesn't mean there's 1 px border between tex1 and tex2. Could be 1px, 0px or 2px, depending on the scale and alignment. |
All times are GMT -6. The time now is 02:22 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI