screen adjust
This commit is contained in:
@@ -12,12 +12,16 @@ MyUtl.getUIContent = function(panel, top, bottom, forceCal)
|
||||
-- if _ContentRect and (not forceCal) then
|
||||
-- return _ContentRect
|
||||
-- end
|
||||
local sizeAdjust = UIRoot.GetPixelSizeAdjustment(panel.gameObject)
|
||||
local height = Screen.height * sizeAdjust
|
||||
top = top or _TopHeight_
|
||||
bottom = bottom or _BottomHeight_
|
||||
local sizeAdjust = UIRoot.GetPixelSizeAdjustment(panel.gameObject)
|
||||
local offsetRect = NGUITools.offsetRect
|
||||
top = top + offsetRect.y * height
|
||||
bottom = bottom + offsetRect.w * height
|
||||
|
||||
_sizeAdjust = sizeAdjust
|
||||
_ContentRect =
|
||||
Vector4(0, (bottom - top) / 2, Screen.width * sizeAdjust, Screen.height * sizeAdjust - (bottom + top))
|
||||
_ContentRect = Vector4(0, (bottom - top) / 2, Screen.width * sizeAdjust, height - (bottom + top))
|
||||
return _ContentRect
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user