From cefd4f5441b3d05e5d6dc39674ce9db7f88af472 Mon Sep 17 00:00:00 2001 From: urnati Date: Mon, 18 Mar 2019 21:33:17 -0400 Subject: [PATCH] Revert "#1219 : Change to move extra action button above Blizzard menu bar" This reverts commit fdae3ed828b80f9bafce747a465409b3fe18159b. --- Titan/TitanMovable.lua | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Titan/TitanMovable.lua b/Titan/TitanMovable.lua index dc74828..ae92ad2 100755 --- a/Titan/TitanMovable.lua +++ b/Titan/TitanMovable.lua @@ -281,9 +281,8 @@ local function MoveFrame(frame_ptr, start_y, top_bottom, force) -- check for nil which will cause an error if point and relativeTo and relativePoint and xOfs then -- do not care about yOfs -- should be safe... --- frame:ClearAllPoints(); --- frame:SetPoint(point, relativeTo:GetName(), relativePoint, xOfs, y) - SetPosition(frame, point, relativeTo:GetName(), relativePoint, xOfs, y) + frame:ClearAllPoints(); + frame:SetPoint(point, relativeTo:GetName(), relativePoint, xOfs, y) else -- do not proceed --[[ @@ -306,8 +305,7 @@ end xx_xOfs = 0 --[[ local NAME: MoveMenuFrame -DESC: Adjust the MainMenuBar frame. Needed because :GetPoint does NOT always work for MainMenuBar. -This is modeled after MoveFrame to keep it similar. +DESC: Adjust the MainMenuBar frame. Needed because :GetPoint does NOT work. This is modeled after MoveFrame to keep it similar. Titan sets the IsUserPlaced for the MainMenuBar frame so Titan needs to adjust. VAR: frame_ptr - Text string of the frame name VAR: start_y - Any offset due to the specific frame @@ -330,6 +328,20 @@ local function MoveMenuFrame(frame_ptr, start_y, top_bottom, force) end xOfs = TitanPanelGetVar("MainMenuBarXAdj") +--[[ + -- This is a hack because GetPoint on MainMenuBar often returns all nil + -- If the scale is is around .85 or higher the bag menu overlaps the main menu + local fscale = tonumber(GetCVar("uiScale")) + local xadj = (fscale * 100) - 85 + if xadj <= 0 then + xOfs = 0 + else + -- Slide the menu bar left depending on scaling to allow bag menu room + xOfs = xadj * 6 * -1 + end +--]] +-- frame:ClearAllPoints(); +-- frame:SetPoint("BOTTOM", "UIParent", "BOTTOM", xOfs, yOffset); SetPosition(frame, "BOTTOM", "UIParent", "BOTTOM", xOfs, yOffset) adj = true else @@ -506,15 +518,6 @@ local MData = { move = function (force) MoveMenuFrame("MainMenuBar", 0, TITAN_PANEL_PLACE_BOTTOM, force) end, addonAdj = false, }, - [11] = {frameName = "ExtraActionBarFrame", - move = function (force) - MoveFrame("ExtraActionBarFrame", 120, TITAN_PANEL_PLACE_BOTTOM, force) end, - addonAdj = false, }, ---[[ - [12] = {frameName = "OrderHallCommandBar", - move = function (force) - MoveFrame("OrderHallCommandBar", 0, TITAN_PANEL_PLACE_TOP, force) end, - addonAdj = false, }, --]] } -- 1.7.9.5