panel: make panels movable

This commit is contained in:
shagu
2018-06-24 21:44:34 +02:00
parent 193ede50ed
commit 72ea6ba7bb
2 changed files with 16 additions and 14 deletions
+11 -9
View File
@@ -510,17 +510,18 @@ pfUI:RegisterModule("panel", function()
if pfUI.chat then if pfUI.chat then
pfUI.panel.left:SetScale(pfUI.chat.left:GetScale()) pfUI.panel.left:SetScale(pfUI.chat.left:GetScale())
pfUI.panel.left:SetPoint("BOTTOMLEFT", pfUI.chat.left, "BOTTOMLEFT", 2, 2) pfUI.panel.left:SetWidth(tonumber(C.chat.left.width) - 4)
pfUI.panel.left:SetPoint("BOTTOMRIGHT", pfUI.chat.left, "BOTTOMRIGHT", -2, 2) pfUI.panel.left:SetPoint("BOTTOM", pfUI.chat.left, "BOTTOM", 0, 2)
else else
pfUI.panel.left:SetWidth(C.chat.left.width) pfUI.panel.left:SetWidth(C.chat.left.width)
pfUI.panel.left:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 5, 5) pfUI.panel.left:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 5, 5)
end end
UpdateMovable(pfUI.panel.left) pfUI.panel.left:SetFrameStrata("DIALOG")
pfUI.panel.left:SetHeight(C.global.font_size+default_border*2) pfUI.panel.left:SetHeight(C.global.font_size+default_border*2)
CreateBackdrop(pfUI.panel.left, default_border, nil) CreateBackdrop(pfUI.panel.left, default_border, nil)
UpdateMovable(pfUI.panel.left)
pfUI.panel.left.hide = CreateFrame("Button", nil, pfUI.panel.left) pfUI.panel.left.hide = CreateFrame("Button", nil, pfUI.panel.left)
pfUI.panel.left.hide:SetFrameLevel(0) pfUI.panel.left.hide:SetFrameLevel(0)
@@ -582,18 +583,19 @@ pfUI:RegisterModule("panel", function()
pfUI.panel.right:SetFrameStrata("FULLSCREEN") pfUI.panel.right:SetFrameStrata("FULLSCREEN")
pfUI.panel.right:ClearAllPoints() pfUI.panel.right:ClearAllPoints()
if pfUI.chat then if pfUI.chat then
pfUI.panel.right:SetScale(pfUI.chat.left:GetScale()) pfUI.panel.right:SetScale(pfUI.chat.right:GetScale())
pfUI.panel.right:SetPoint("BOTTOMLEFT", pfUI.chat.right, "BOTTOMLEFT", 2, 2) pfUI.panel.right:SetWidth(tonumber(C.chat.right.width) - 4)
pfUI.panel.right:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", -2, 2) pfUI.panel.right:SetPoint("BOTTOM", pfUI.chat.right, "BOTTOM", 0, 2)
else else
pfUI.panel.right:SetWidth(C.chat.right.width) pfUI.panel.right:SetWidth(C.chat.right.width)
pfUI.panel.right:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -5, 5) pfUI.panel.right:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -5, 5)
end end
UpdateMovable(pfUI.panel.right) pfUI.panel.right:SetFrameStrata("DIALOG")
pfUI.panel.right:SetHeight(C.global.font_size+default_border*2) pfUI.panel.right:SetHeight(C.global.font_size+default_border*2)
CreateBackdrop(pfUI.panel.right, default_border, nil) CreateBackdrop(pfUI.panel.right, default_border, nil)
UpdateMovable(pfUI.panel.right)
pfUI.panel.right.hide = CreateFrame("Button", nil, pfUI.panel.right) pfUI.panel.right.hide = CreateFrame("Button", nil, pfUI.panel.right)
pfUI.panel.right.hide:SetFrameLevel(0) pfUI.panel.right.hide:SetFrameLevel(0)
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: |cff33ffccpf|cffffffffUI ## Title: |cff33ffccpf|cffffffffUI
## Author: Shagu ## Author: Shagu
## Notes: A complete user interface replacement. ## Notes: A complete user interface replacement.
## Version: 3.10.0 ## Version: 3.11.0
## SavedVariables: pfUI_profiles, pfUI_gold ## SavedVariables: pfUI_profiles, pfUI_gold
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB