Skip to content

Commit

Permalink
#30 - Player Frames not moveable with no artwork
Browse files Browse the repository at this point in the history
Wutname1 committed Jul 21, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent ad4214d commit f43a4a0
Showing 4 changed files with 32 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Components/Tooltips.lua
Original file line number Diff line number Diff line change
@@ -150,7 +150,7 @@ local setPoint = function(self, parent)

--See If the theme has an anchor and if we are allowed to use it
if SUI.DB.Styles[SUI.DBMod.Artwork.Style].TooltipLoc and not SUI.DB.Tooltips[ActiveRule()].OverrideLoc then
local style = SUI:GetModule('Style_' .. SUI.DBMod.Artwork.Style)
local style = SUI:GetModule('Style_' .. SUI.DBMod.Artwork.Style, true)
if style then
style:TooltipLoc(self, parent)
end
7 changes: 6 additions & 1 deletion Modules/PartyFrames/scripts/Spawn-Frames.lua
Original file line number Diff line number Diff line change
@@ -66,7 +66,12 @@ function PartyFrames:OnEnable()
pf.mover:Hide()
end

pf:SetParent('SpartanUI')
if SpartanUI then
pf:SetParent('SpartanUI')
else
pf:SetParent(UIParent)
end

PartyMemberBackground.Show = function()
return
end
36 changes: 19 additions & 17 deletions Modules/PlayerFrames/scripts/Unit-FrameSpawn.lua
Original file line number Diff line number Diff line change
@@ -46,26 +46,28 @@ function PlayerFrames:SUI_PlayerFrames_Classic()
end
end

local unattached = false
SpartanUI:HookScript(
'OnHide',
function(this, event)
if UnitUsingVehicle('player') then
SUI_FramesAnchor:SetParent(UIParent)
unattached = true
if SpartanUI then
local unattached = false
SpartanUI:HookScript(
'OnHide',
function(this, event)
if UnitUsingVehicle('player') then
SUI_FramesAnchor:SetParent(UIParent)
unattached = true
end
end
end
)
)

SpartanUI:HookScript(
'OnShow',
function(this, event)
if unattached then
SUI_FramesAnchor:SetParent(SpartanUI)
PlayerFrames:PositionFrame_Classic()
SpartanUI:HookScript(
'OnShow',
function(this, event)
if unattached then
SUI_FramesAnchor:SetParent(SpartanUI)
PlayerFrames:PositionFrame_Classic()
end
end
end
)
)
end
end

function PlayerFrames:PositionFrame_Classic(b)
7 changes: 6 additions & 1 deletion Modules/RaidFrames/scripts/FrameStyle_Classic.lua
Original file line number Diff line number Diff line change
@@ -313,7 +313,12 @@ function RaidFrames:Classic()
)
raid:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 20, -40)

raid:SetParent('SpartanUI')
if SpartanUI then
raid:SetParent('SpartanUI')
else
raid:SetParent(UIParent)
end

raid:SetClampedToScreen(false)

return (raid)

0 comments on commit f43a4a0

Please sign in to comment.