skin: always open setting frames centered

This commit is contained in:
shagu
2019-03-04 18:59:48 +01:00
parent 5408ad4ddf
commit 8ea85c4d10
3 changed files with 15 additions and 2 deletions
+5 -2
View File
@@ -2,8 +2,6 @@ pfUI:RegisterSkin("Options-Interface", function ()
local border = tonumber(pfUI_config.appearance.border.default)
local bpad = border > 1 and border - 1 or 1
UIOptionsFrame:ClearAllPoints()
UIOptionsFrame:SetPoint("CENTER", 0, 0)
UIOptionsFrame:SetParent(UIParent)
UIOptionsFrame:SetWidth(1024)
UIOptionsFrame:SetHeight(700)
@@ -12,6 +10,11 @@ pfUI:RegisterSkin("Options-Interface", function ()
CreateBackdrop(UIOptionsFrame, nil, nil, .75)
EnableMovable(UIOptionsFrame)
HookScript(UIOptionsFrame, "OnShow", function()
this:ClearAllPoints()
this:SetPoint("CENTER", 0, 0)
end)
UIOptionsFrame.backdrop:SetPoint("BOTTOMRIGHT", 0, 50)
UIOptionsFrame:SetHitRectInsets(0,0,0,50)
+5
View File
@@ -6,6 +6,11 @@ pfUI:RegisterSkin("Options-Sound", function ()
CreateBackdrop(SoundOptionsFrame, nil, true, .75)
EnableMovable(SoundOptionsFrame)
HookScript(SoundOptionsFrame, "OnShow", function()
this:ClearAllPoints()
this:SetPoint("CENTER", 0, 0)
end)
local SoundOptionsFrameHeaderText = GetNoNameObject(SoundOptionsFrame, "FontString", "ARTWORK", SOUNDOPTIONS_MENU)
SoundOptionsFrameHeaderText:ClearAllPoints()
SoundOptionsFrameHeaderText:SetPoint("TOP", 0, -10)
+5
View File
@@ -5,6 +5,11 @@ pfUI:RegisterSkin("Options-Video", function ()
CreateBackdrop(OptionsFrame, nil, nil, .75)
EnableMovable(OptionsFrame)
HookScript(OptionsFrame, "OnShow", function()
this:ClearAllPoints()
this:SetPoint("CENTER", 0, 0)
end)
OptionsFrameHeader:SetTexture("")
local OptionsFrameHeaderText = GetNoNameObject(OptionsFrame, "FontString", "ARTWORK", VIDEOOPTIONS_MENU)
OptionsFrameHeaderText:ClearAllPoints()