diff --git a/.luacheckrc b/.luacheckrc index 341764b..5c9ccab 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -27,6 +27,8 @@ globals = { "CharacterBag1Slot", "CharacterBag0Slot", "MainMenuBarBackpackButton", + + "UIParentBottomManagedFrameContainer", } read_globals = { @@ -89,6 +91,7 @@ read_globals = { "AutoCastShine_AutoCastStart", "AutoCastShine_AutoCastStop", "CooldownFrame_Set", + "EditModeMagnetismManager", "GridLayoutUtil", "HasMultiCastActionBar", "MainMenuBarVehicleLeaveButton_Update", diff --git a/ExtraActionBar.lua b/ExtraActionBar.lua index 14ac7cb..3db4d64 100644 --- a/ExtraActionBar.lua +++ b/ExtraActionBar.lua @@ -37,7 +37,11 @@ function ExtraActionBarMod:OnEnable() self.bar = setmetatable(Bartender4.Bar:Create("ExtraActionBar", self.db.profile, L["Extra Action Bar"], 2), {__index = ExtraActionBar}) self.bar.content = ExtraAbilityContainer - self.bar.content.ignoreFramePositionManager = true + -- remove EditMode hooks + self.bar.content.ClearAllPoints = nil + self.bar.content.SetPoint = nil + self.bar.content.SetScale = nil + self.bar.content:SetToplevel(false) self.bar.content:SetParent(self.bar) self.bar.content:SetScript("OnShow", nil) @@ -51,6 +55,11 @@ function ExtraActionBarMod:OnEnable() self:SecureHook(ZoneAbilityFrame, "UpdateDisplayedZoneAbilities") if ExtraAbilityContainer.ApplySystemAnchor then self:SecureHook(ExtraAbilityContainer, "ApplySystemAnchor") + self:SecureHook(ExtraAbilityContainer, "HighlightSystem") + end + + if UIParentBottomManagedFrameContainer then + UIParentBottomManagedFrameContainer.showingFrames[ExtraAbilityContainer] = nil end end @@ -74,7 +83,16 @@ function ExtraActionBarMod:UpdateDisplayedZoneAbilities() ZoneAbilityFrame.Style:SetShown(not self.db.profile.hideArtwork) end +function ExtraActionBarMod:HighlightSystem() + ExtraAbilityContainer.Selection:Hide() + EditModeMagnetismManager:UnregisterFrame(ExtraAbilityContainer) +end + function ExtraActionBarMod:ApplySystemAnchor() + if UIParentBottomManagedFrameContainer then + UIParentBottomManagedFrameContainer.showingFrames[ExtraAbilityContainer] = nil + end + self.bar:PerformLayout() end @@ -95,6 +113,7 @@ end function ExtraActionBar:PerformLayout() self:SetSize(128, 128) local bar = self.content + bar:SetParent(self) bar:ClearAllPoints() bar:SetPoint("CENTER", self, "TOPLEFT", 64, -64) end diff --git a/VehicleBar.lua b/VehicleBar.lua index e25a6c2..608e77f 100644 --- a/VehicleBar.lua +++ b/VehicleBar.lua @@ -34,18 +34,36 @@ end function VehicleBarMod:OnEnable() if not self.bar then self.bar = setmetatable(Bartender4.Bar:Create("Vehicle", self.db.profile, L["Vehicle Bar"]), {__index = VehicleBar}) - self.bar.content = MainMenuBarVehicleLeaveButton + self.bar.content = MainMenuBarVehicleLeaveButton + + -- remove EditMode hooks + self.bar.content.ClearAllPoints = nil + self.bar.content.SetPoint = nil + self.bar.content.SetScale = nil + self.bar.content:SetParent(self.bar) - self.bar.content.ClearSetPoint = self.bar.ClearSetPoint + self.bar.content:SetScript("OnShow", nil) + self.bar.content:SetScript("OnHide", nil) end if MainMenuBarVehicleLeaveButton_Update then self:RawHook("MainMenuBarVehicleLeaveButton_Update", true) else self:SecureHook(MainMenuBarVehicleLeaveButton, "Update", "MainMenuBarVehicleLeaveButton_Update") end + + if MainMenuBarVehicleLeaveButton.ApplySystemAnchor then + self:SecureHook(MainMenuBarVehicleLeaveButton, "ApplySystemAnchor") + self:SecureHook(MainMenuBarVehicleLeaveButton, "HighlightSystem") + end + if EditModeManagerFrame then - self:SecureHook(EditModeManagerFrame, "UpdateBottomActionBarPositions") + self:SecureHook(EditModeManagerFrame, "UpdateBottomActionBarPositions", "ApplySystemAnchor") end + + if UIParentBottomManagedFrameContainer then + UIParentBottomManagedFrameContainer.showingFrames[MainMenuBarVehicleLeaveButton] = nil + end + self.bar:Enable() self:ToggleOptions() self:ApplyConfig() @@ -75,10 +93,15 @@ function VehicleBarMod:MainMenuBarVehicleLeaveButton_Update() end end -function VehicleBarMod:UpdateBottomActionBarPositions() +function VehicleBarMod:ApplySystemAnchor() self.bar:PerformLayout() end +function VehicleBarMod:HighlightSystem() + MainMenuBarVehicleLeaveButton.Selection:Hide() + EditModeMagnetismManager:UnregisterFrame(MainMenuBarVehicleLeaveButton) +end + function VehicleBar:ApplyConfig(config) Bar.ApplyConfig(self, config)