Swagkhalifa 0 Report post Posted April 18, 2017 Hello! So i'm trying to make an addon that will move the FPS display to the lower left corner of my screen. This is the core script for my addon: local x = -650 local y = -375 local FPSDisplay = CreateFrame("Frame") FPSDisplay:RegisterEvent("PLAYER_LOGIN") FPSDisplay:RegisterEvent("PLAYER_ENTERING_WORLD") FPSDisplay:RegisterEvent("ZONE_CHANGED") FPSDisplay:RegisterEvent("ZONE_CHANGED_INDOORS") FPSDisplay:RegisterEvent("ZONE_CHANGED_NEW_AREA") FPSDisplay:SetScript("OnEvent", function(...) FramerateLabel:ClearAllPoints() FramerateText:ClearAllPoints() FramerateLabel:SetPoint("RIGHT",UIParent,"CENTER",x,y) FramerateText:SetPoint("LEFT",FramerateLabel,"RIGHT") if not FramerateLabel:IsVisible() then ToggleFramerate() end end) It is almost working, but for some reason it won't stay there. Everytime I enter a different zone or simply go from Durotar in to Orgrimmar, the y-variable will automatically change to something around -270 and then it will just be stuck there. I don't know whats causing this. I've tried to disable every other addon I use but it still happens. As you can see in the script, I've also tried to apply trigger events for the addon such as ZONE_CHANGING etc. but that doesn't seem to work either. I hope someone can help me out. Cheers! 0 Share this post Link to post Share on other sites
Swagkhalifa 0 Report post Posted April 18, 2017 After some research I think I've found what causes the issue but I still haven't found a solution for it. FramerateLabel is listed in UIPARENT_MANAGED_FRAME_POSITIONS in UIParent.lua, which means the default UI moves it around. I've tried to use the following API's: UIPARENT_MANAGED_FRAME_POSITIONS.FramerateLabel = nil FramerateLabel.ignoreFramePositionManager = true FramerateText.ignoreFramePositionManager = true it works somewhat; it still changes the y-variable but not as much as before. I've also tried UIPARENT_MANAGED_FRAME_POSITIONS.FramerateLabel["CONTAINER_OFFSET_Y"] = nil UIPARENT_ALTERNATE_FRAME_POSITIONS.FramerateLabel = nil The first one wasn't different to the API's above and the second one just gave me an error and I couldn't get it to work. My guess is that the API simply doesn't exsist in vanilla but not sure. I found this thread: https://forums.wowace.com/showthread.php?t=21092 where the OP had the exact same problem as I do and he seem to have fixed it, but and can't really tell what he did. Maybe someone with a bit more knowledge for scripting can tell me what he did? Thanks in advance 0 Share this post Link to post Share on other sites
dms 0 Report post Posted April 18, 2017 You ever tried moveanything? regards friend 0 Share this post Link to post Share on other sites
Swagkhalifa 0 Report post Posted April 18, 2017 MoveAnything cannot move the FPS display afaik. 0 Share this post Link to post Share on other sites
euron 1 Report post Posted April 18, 2017 DiscordFrameModifier might be able to. 0 Share this post Link to post Share on other sites
Swagkhalifa 0 Report post Posted April 19, 2017 Found a solution. 0 Share this post Link to post Share on other sites
Howdil 0 Report post Posted April 19, 2017 Please post this addon once you're done with it :D 0 Share this post Link to post Share on other sites