RSS

Суббота, 02.11.2024, 01:35
Главная » WoW API » API Виджеты » Фрейм »

scale = SimpleHTML:GetEffectiveScale()

[ править ]
Returns the overall scale factor of the frame.
[клоны]
Returns the overall scale factor of the frame. Unlike :GetScale() which returns the scale factor of the frame relative to its parent, this function returns the absolute scale factor of the frame, taking into account the relative scales of parent frames.


Signature:
Code
scale = Frame:GetEffectiveScale()

Returns:
  • scale - Scale factor for the frame relative to its parent (number)

Examples:
CreateFrame("Frame","Frame1", UIParent)
Frame1:SetScale(0.5)
CreateFrame("Frame","Frame2", Frame1)
Frame2:SetScale(1.5)
CreateFrame("Frame","Frame3", Frame2)
Frame3:SetScale(0.25)

UIParent:GetEffectiveScale()
-- returns 1 (assuming the UI Scale setting in Video Options is not enabled)
Frame1:GetEffectiveScale()
-- returns 0.5
Frame2:GetEffectiveScale()
-- returns 0.75
Frame3:GetEffectiveScale()
-- returns 0.1875

Также смотрите: Фрейм
Ссылки: http://wowprogramming.com/docs/widgets/Frame/GetEffectiveScale