I don’t know the addon but a couple of things come to mind.
Your code refers to two frames TwintopInsanityBar and barContainerFrame.
Are you sure the bar you want to move is anchored to barContainerFrame? ie. the bar has one or more points using barContainerFrame as the reference (attach to) point.
If the first is correct, does barContainerFrame have multiple (or other (not “CENTER”)) attach points (SetPoints). If so, then not using TwintopInsanityBar.barContainerFrame:ClearAllPoints() first means that any additional anchor points remain fixed in place.
settings.bar.xPos do you know what this contains (did you create the table/keys) or is it a grab from the addon in which case the settings` you are looking at are possibly a global leak from some other addon.
Not specifying an reference (attach point) in you SetPoint call means the frame will still use it’s original anchor parent as the “starting point” for it anchor:
changes the “starting point” to UIParent which covers the entire screen so (“CENTER” is center of screen rather than center of the frame used as the original anchor).
One thing you could try to see if it moves to the center of the screen (no offsets) is:
@Elvenbane
This is true, however you cannot set up profiles for this addon. When I’m in a group i would like the bar to be in a different position then when I am solo.
I tired using the addon “Reflux” for this issue but it was a pain to set it up and when i finally got it after editing some saved variables it ended up causing some issues with my other addon profiles that i did not like.
@Fizzle,
This is the beginning of the lua file of the addon, after reading your comment i believe i was wrong and now think the frame which i need to move is called TwinTopInsanityBarFrame. Let me know your thoughts.
local barContainerFrame = CreateFrame("Frame", "TwintopInsanityBarFrame", UIParent)
local insanityFrame = CreateFrame("StatusBar", nil, barContainerFrame)
local castingFrame = CreateFrame("StatusBar", nil, barContainerFrame)
local passiveFrame = CreateFrame("StatusBar", nil, barContainerFrame)
local barBorderFrame = CreateFrame("StatusBar", nil, barContainerFrame)
local leftTextFrame = CreateFrame("Frame", nil, barContainerFrame)
local middleTextFrame = CreateFrame("Frame", nil, barContainerFrame)
local rightTextFrame = CreateFrame("Frame", nil, barContainerFrame)
insanityFrame.threshold = CreateFrame("Frame", nil, insanityFrame)
passiveFrame.threshold = CreateFrame("Frame", nil, passiveFrame)
leftTextFrame.font = leftTextFrame:CreateFontString(nil, "BACKGROUND")
middleTextFrame.font = middleTextFrame:CreateFontString(nil, "BACKGROUND")
rightTextFrame.font = rightTextFrame:CreateFontString(nil, "BACKGROUND")
Amazing! I never thought by coming to the forums that the addon author would make these changes. The slash command works perfectly, and I’m going to macro it right now!