WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR UI Bugs (https://www.wowinterface.com/forums/forumdisplay.php?f=176)
-   -   SetScale bug with frames (https://www.wowinterface.com/forums/showthread.php?t=56879)

galvin 12-08-18 02:01 AM

SetScale bug with frames
 
When Setting the scale. Its size is reduced.

Expected result is framesize shouldn't change, but visual size should be 5x larger

UPDATE: Did some more testing. If you setscale to MyBaseFrame it works fine. So there's a bug or something with setpoints and scale
Tested this on the PTR today, and still bugs out


Code:

local FrameBorder = {
  bgFile  = '',
  edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]],
  tile = true,
  tileSize = 16,
  edgeSize = 6,
  insets = {
      left = -4 ,
      right = -4,
      top = -4,
      bottom = -4
  }
}

if MyBaseFrame == nil then
  MyBaseFrame = CreateFrame('Frame', nil, UIParent)
  MyBaseFrame:SetSize(100, 100)
  MyBaseFrame:SetPoint('LEFT', 100, 0)
end

if MyScaleFrame == nil then
  MyScaleFrame = CreateFrame('Frame', nil, MyBaseFrame)
  MyScaleFrame:SetAllPoints()
end

if MyFrame == nil then
  MyFrame = CreateFrame('Frame', nil, MyScaleFrame)
  MyFrame:SetAllPoints()
  MyFrame:SetBackdrop(FrameBorder)
end

local MB = MyBaseFrame
local SF = MyScaleFrame
local MF = MyFrame


SF:SetScale(5)

C_Timer.After(1, function() print(MF:GetSize()) end)



All times are GMT -6. The time now is 06:12 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI