Quantcast

- TitanMovable: Added frame checks for MoP celestial power bar and button for positioning due to bottom bars.

HonorGoG [01-11-26 - 02:31]
- TitanMovable: Added frame checks for MoP celestial power bar and button for positioning due to bottom bars.
Filename
Titan/TitanDebug.lua
Titan/TitanMovable.lua
diff --git a/Titan/TitanDebug.lua b/Titan/TitanDebug.lua
index 66be0a8..ae5b287 100644
--- a/Titan/TitanDebug.lua
+++ b/Titan/TitanDebug.lua
@@ -30,7 +30,7 @@ Titan_Debug.titan.events = false
 Then place calls in code :
 Titan_Debug.Out("titan", "events", debug_str)

-Then set to turn display them.
+Then set to display them.
 Titan_Debug.titan.events = true


diff --git a/Titan/TitanMovable.lua b/Titan/TitanMovable.lua
index 629fe7a..686005b 100755
--- a/Titan/TitanMovable.lua
+++ b/Titan/TitanMovable.lua
@@ -682,6 +682,70 @@ local MData = {
 	[12] = {frameName = "UIWidgetTopCenterContainerFrame",
 		move = function (force) MoveFrame("UIWidgetTopCenterContainerFrame", 0, TITAN_PANEL_PLACE_TOP, force) end,
 		addonAdj = false, },
+	[13] = {frameName = "PlayerPowerBarAlt",
+		move = function (force)
+			-- Only spend cycles if the frame is shown.
+			if PlayerPowerBarAlt
+			and PlayerPowerBarAlt:IsShown() then
+				-- Need to calc Y because Y depends on what else is shown
+				--[=[ UIParent
+				Look at UIParent.lua for logic (UIParent_ManageFramePosition)
+				--]=]
+				local actionBarOffset = 45;
+				local menuBarTop = 55;
+				local overrideActionBarTop = 40;
+				local petBattleTop = 60;
+
+				local yOfs = 48 -- FramePositionDelegate:UIParentManageFramePositions
+				if MainMenuBar and MainMenuBar:IsShown() then
+					yOfs = yOfs + menuBarTop
+				end
+				if (MultiBarBottomLeft and MultiBarBottomLeft:IsShown())
+				or (MultiBarBottomRight and MultiBarBottomRight:IsShown())
+				then
+					yOfs = yOfs + actionBarOffset
+				end
+				if (has_pet_bar())
+				and (MultiBarBottomRight and MultiBarBottomRight:IsShown())
+				then
+					yOfs = yOfs + petBattleTop
+				end
+				MoveFrame("PlayerPowerBarAlt", yOfs, TITAN_PANEL_PLACE_BOTTOM, force)
+			end
+			end,
+		addonAdj = false, },
+	[14] = {frameName = "ExtraActionButton1",
+		move = function (force)
+			-- Only spend cycles if the frame is shown.
+			if ExtraActionButton1
+			and ExtraActionButton1:IsShown() then
+				-- Need to calc Y because Y depends on what else is shown
+				--[=[ UIParent
+				Look at UIParent.lua for logic (UIParent_ManageFramePosition)
+				--]=]
+				local actionBarOffset = 45;
+				local menuBarTop = 55;
+				local overrideActionBarTop = 40;
+				local petBattleTop = 60;
+
+				local yOfs = 30 -- FramePositionDelegate:UIParentManageFramePositions
+				if MainMenuBar and MainMenuBar:IsShown() then
+					yOfs = yOfs + menuBarTop
+				end
+				if (MultiBarBottomLeft and MultiBarBottomLeft:IsShown())
+				or (MultiBarBottomRight and MultiBarBottomRight:IsShown())
+				then
+					yOfs = yOfs + actionBarOffset
+				end
+				if (has_pet_bar())
+				and (MultiBarBottomRight and MultiBarBottomRight:IsShown())
+				then
+					yOfs = yOfs + petBattleTop
+				end
+				MoveFrame("ExtraActionButton1", yOfs, TITAN_PANEL_PLACE_BOTTOM, force)
+			end
+			end,
+		addonAdj = false, },
 }

 --[==[