Skip to content

Commit

Permalink
Merge pull request #22 from Zwixx/master
Browse files Browse the repository at this point in the history
Fix Compatiblity with Dragonflight
  • Loading branch information
Kiatra authored Nov 28, 2022
2 parents 2a49590 + ca0810f commit 7cd77a2
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 48 deletions.
2 changes: 1 addition & 1 deletion Chocolate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ local function OnDragStart(frame)
Drag:Start(bar, frame.name, frame)
frame:StartMoving()
frame.isMoving = true
frame:highlight(1)
frame:highlight(1, 0, 0, 0)
end
end

Expand Down
2 changes: 1 addition & 1 deletion Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ local function createPointer()
pointer:SetFrameLevel(20)
pointer:SetWidth(15)

local arrow = pointer:CreateTexture(nil, "DIALOG")
local arrow = pointer:CreateTexture(nil, "BACKGROUND")
arrow:SetPoint("CENTER",pointer,"LEFT", 0, 0)
arrow:SetTexture("Interface\\AddOns\\ChocolateBar\\pics\\pointer")
return pointer
Expand Down
94 changes: 48 additions & 46 deletions Jostle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ end

if not Jostle.hooks.PlayerFrame_SequenceFinished then
Jostle.hooks.PlayerFrame_SequenceFinished = true
hooksecurefunc("PlayerFrame_SequenceFinished", function()
if Jostle.PlayerFrame_SequenceFinished then
Jostle:PlayerFrame_SequenceFinished()
end
end)
-- hooksecurefunc("PlayerFrame_SequenceFinished", function()
-- if Jostle.PlayerFrame_SequenceFinished then
-- Jostle:PlayerFrame_SequenceFinished()
-- end
-- end)
end

function Jostle:WorldMapFrame_Hide()
Expand Down Expand Up @@ -361,49 +361,51 @@ function Jostle:Refresh(...)
anchor = "BOTTOM" .. anchor
offset = bottomOffset / framescale
end
if frame == MinimapCluster and not MinimapBorderTop:IsShown() then
offset = offset + MinimapBorderTop:GetHeight() * 3/5
elseif frame == ConsolidatedBuffs and TicketStatusFrame:IsShown() then
offset = offset - TicketStatusFrame:GetHeight() * TicketStatusFrame:GetScale()
elseif frame == DEFAULT_CHAT_FRAME then
y = MainMenuBar:GetHeight() * MainMenuBar:GetScale() + 32
if StanceBarFrame and (PetActionBarFrame:IsShown() or StanceBarFrame:IsShown()) then
offset = offset + StanceBarFrame:GetHeight() * StanceBarFrame:GetScale()
end
if MultiBarBottomLeft:IsShown() then
offset = offset + MultiBarBottomLeft:GetHeight() * MultiBarBottomLeft:GetScale() - 21
end
elseif frame == ChatFrame2 then
y = MainMenuBar:GetHeight() * MainMenuBar:GetScale() + 32
if MultiBarBottomRight:IsShown() then
offset = offset + MultiBarBottomRight:GetHeight() * MultiBarBottomRight:GetScale() - 21
end
elseif frame == GroupLootFrame1 or frame == TutorialFrameParent or frame == FramerateLabel then
if MultiBarBottomLeft:IsShown() or MultiBarBottomRight:IsShown() then
offset = offset + MultiBarBottomLeft:GetHeight() * MultiBarBottomLeft:GetScale()
end
elseif frame == DurabilityFrame or frame == WatchFrame then
anchorFrame = MinimapCluster
x = 0
y = 0
offset = 0
if frame == WatchFrame and DurabilityFrame:IsShown() then
y = y - DurabilityFrame:GetHeight() * DurabilityFrame:GetScale()
end
if frame == DurabilityFrame then
x = -20
end
anchor = "TOPRIGHT"
anchorAlt = "BOTTOMRIGHT"
if MultiBarRight:IsShown() then
x = x - MultiBarRight:GetWidth() * MultiBarRight:GetScale()
if MultiBarLeft:IsShown() then
x = x - MultiBarLeft:GetWidth() * MultiBarLeft:GetScale()
if MinimapBorderTop ~= nil then
if frame == MinimapCluster and not MinimapBorderTop:IsShown() then
offset = offset + MinimapBorderTop:GetHeight() * 3/5
elseif frame == ConsolidatedBuffs and TicketStatusFrame:IsShown() then
offset = offset - TicketStatusFrame:GetHeight() * TicketStatusFrame:GetScale()
elseif frame == DEFAULT_CHAT_FRAME then
y = MainMenuBar:GetHeight() * MainMenuBar:GetScale() + 32
if StanceBarFrame and (PetActionBarFrame:IsShown() or StanceBarFrame:IsShown()) then
offset = offset + StanceBarFrame:GetHeight() * StanceBarFrame:GetScale()
end
if MultiBarBottomLeft:IsShown() then
offset = offset + MultiBarBottomLeft:GetHeight() * MultiBarBottomLeft:GetScale() - 21
end
elseif frame == ChatFrame2 then
y = MainMenuBar:GetHeight() * MainMenuBar:GetScale() + 32
if MultiBarBottomRight:IsShown() then
offset = offset + MultiBarBottomRight:GetHeight() * MultiBarBottomRight:GetScale() - 21
end
elseif frame == GroupLootFrame1 or frame == TutorialFrameParent or frame == FramerateLabel then
if MultiBarBottomLeft:IsShown() or MultiBarBottomRight:IsShown() then
offset = offset + MultiBarBottomLeft:GetHeight() * MultiBarBottomLeft:GetScale()
end
elseif frame == DurabilityFrame or frame == WatchFrame then
anchorFrame = MinimapCluster
x = 0
y = 0
offset = 0
if frame == WatchFrame and DurabilityFrame:IsShown() then
y = y - DurabilityFrame:GetHeight() * DurabilityFrame:GetScale()
end
if frame == DurabilityFrame then
x = -20
end
anchor = "TOPRIGHT"
anchorAlt = "BOTTOMRIGHT"
if MultiBarRight:IsShown() then
x = x - MultiBarRight:GetWidth() * MultiBarRight:GetScale()
if MultiBarLeft:IsShown() then
x = x - MultiBarLeft:GetWidth() * MultiBarLeft:GetScale()
end
end
elseif frame == OrderHallCommandBar and OrderHallCommandBar:IsShown() then
anchorAlt = "TOPLEFT"
anchor = "TOPLEFT"
end
elseif frame == OrderHallCommandBar and OrderHallCommandBar:IsShown() then
anchorAlt = "TOPLEFT"
anchor = "TOPLEFT"
end
if frame == FramerateLabel then
anchorFrame = WorldFrame
Expand Down

0 comments on commit 7cd77a2

Please sign in to comment.