Originally Posted by nightcracker
Hence my above post
One problem though, neither GetCVar("uiScale") or UIParent:GetScale() return values instantly, you'll have to hook an event like PLAYER_ENTERING_WORLD(I don't know the first event that they are available, I do know that they are available at PLAYER_ENTERING_WORLD).
|
Since GetScreenWidth() is already scaled by the current uiScale, GetScreenWidth() * UIParent:GetScale() is constant no matter what uiScale is set to.