WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Lua reposition frames (https://www.wowinterface.com/forums/showthread.php?t=57478)

glupikreten 09-12-19 02:55 AM

Lua reposition frames
 
Hi,

Can someone explain to me why this does not work:

BNToastFrame:HookScript("OnShow", function(self)
BNToastFrame:ClearAllPoints()
BNToastFrame:SetPoint("BOTTOMLEFT", someframe, "TOPLEFT", 0, 15)
end)

While this works like a charm...

LootFrame:HookScript("OnShow", function(self)
LootFrame:ClearAllPoints()
LootFrame:SetPoint("BOTTOMLEFT", someframe, "TOPLEFT", 450, 250)
end)


Please?


And also is it possible to change strata of FPS frames...

FramerateLabel:SetFrameStrata("HIGH")
FramerateText:SetFrameStrata("HIGH")

not working... afaik strata for both is WORLD which is below BACKGROUND :)

SDPhantom 09-12-19 05:08 AM

Quote:

Originally Posted by glupikreten (Post 333701)
Can someone explain to me why this does not work:

Code:

BNToastFrame:HookScript("OnShow", function(self)
        BNToastFrame:ClearAllPoints()
        BNToastFrame:SetPoint("BOTTOMLEFT", someframe, "TOPLEFT", 0, 15)
end)


The ToastFrame position may be set after OnShow is fired. You can nuke these functions by setting an empty function in their place.
Code:

BNToastFrame:ClearAllPoints()
BNToastFrame:SetPoint("BOTTOMLEFT", someframe, "TOPLEFT", 0, 15)

local function NoOp() end--        Do nothing
BNToastFrame.ClearAllPoints=NoOp;
BNToastFrame.SetPoint=NoOp;




Quote:

Originally Posted by glupikreten (Post 333701)
And also is it possible to change strata of FPS frames...

Code:

FramerateLabel:SetFrameStrata("HIGH")
FramerateText:SetFrameStrata("HIGH")

not working... afaik strata for both is WORLD which is below BACKGROUND :)

These are regions, not frames. You have to make a new frame and re-set their parent to it. You may also want to remove FramerateLabel from the UIPARENT_MANAGED_FRAME_POSITIONS table or strange things will happen with its anchors.
Code:

UIPARENT_MANAGED_FRAME_POSITIONS.FramerateLabel=nil;

glupikreten 09-12-19 10:22 AM

Thank you ... this helped :)


All times are GMT -6. The time now is 07:14 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI