From the code, I'm guessing you mean Euf_ConfigFrame
Lua Code:
Euf_ConfigFrame:SetScript("OnDragStop", function(self) Euf_ConfigFrame:StopMovingOrSizing() end)
This just stops the the dragging of the frame. Once this is done you need to save the new position of the frame. You could use something like LibWindow you could do it manually by making some changes like:
The default positioning: (
Small Note: Changing the defaults table won't change the defaults already saved on disk so you will need to remove that file before the new ones will take effect or the frame won't show up on screen)
Lua Code:
local defaults = {
profile = {
position = {
point = "CENTER",
topoint = "CENTER",
x = 50,
y = 50
},
Shown = true,
Castbar = true
}
}
Which means you would change setting the initial frame position to:
Lua Code:
Euf_ConfigFrame:SetPoint(dataPlayer.position.point, UIParent, dataPlayer.position.topoint, dataPlayer.position.x, dataPlayer.position.y)
and finally change the OnDragStop to:
Lua Code:
Euf_ConfigFrame:SetScript("OnDragStop", function(self)
self:StopMovingOrSizing()
local p, r, t, x, y = self:GetPoint(1)
dataPlayer.position.point = p
dataPlayer.position.topoint = t
dataPlayer.position.x = x
dataPlayer.position.y = y
end)
The p and t (point and topoint) returned by GetPoint() are relative to the frames position on screen so depending on that, they will change.
This probably won't save the position perfectly, LibWindow makes it pretty effortless.