WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Moving default BuffFrame (https://www.wowinterface.com/forums/showthread.php?t=57361)

glaaod 08-16-19 12:09 PM

Moving default BuffFrame
 
Hi,

I'm in the process of making a simple addon to change the placement of the default UI frames.

Most frames can be moved just fine with just a few lines of basic code. Example:

Code:

PlayerFrame:ClearAllPoints()
PlayerFrame:SetPoint("CENTER", UIParent, "CENTER", -117, -309)
PlayerFrame.SetPoint = function() end
PlayerFrame:SetUserPlaced(true)

(The PlayerFrame and TargetFrame need the additional line at the end to work, otherwise everything seems to only need the first 3 lines.)

The only thing I'm having trouble with is the BuffFrame. You can move it just fine with the approach above, however, it seems to break target of target functionality, and I can not figure out why.
I have tried to add the "SetUserPlaced(true)" and a few other things but nothing seems to work.

Any help would be appreciated.
Thanks!

LudiusMaximus 08-16-19 01:40 PM

Lua Code:
  1. BuffFrame:ClearAllPoints()
  2. BuffFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)

works for me without any errors.

Just SetUserPlaced(true) is not possible for BuffFrame. But also not necessary (?).

glaaod 08-16-19 03:18 PM

Checked again and apparently it's only happening when I pull a mob. If the mob is already aggroed it seems to be working just fine.

Code:

BuffFrame:ClearAllPoints()
BuffFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
BuffFrame.SetPoint = function() end

This is the entire LUA file in my test addon, so not really sure where the issue can be, especially since it works fine with other frames.

LudiusMaximus 08-16-19 03:34 PM

I tried to reproduce this but I can pull mobs without any problems while the buff frame remains in the center of the screen.

glaaod 08-16-19 04:40 PM

I made a quick video to hopefully illustrate the issue. Link: https://www.youtube.com/watch?v=AubkeNHYulY

I guess if you can't replicate the issue then it pretty much has to be my client or something, even though it's pretty much a fresh install and I have no other addons running. But I guess you can't really do much in that case.

In any case thank you for your time. :)

LudiusMaximus 08-16-19 04:56 PM

Maybe this is something specific to the class you are using?
Have you tried it with other classes?

glaaod 08-16-19 05:22 PM

I've tried several. They all had the same issue.


All times are GMT -6. The time now is 01:45 PM.

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