Possible to re-add minimap resizing via this addon?
Lunaeria opened this issue · 12 comments
Quite a few updates ago, the minimap-resizing functionality for this addon was removed, with the suggestion to use the game's default resizer. However, this addon resizes the whole minimap cluster, including any frames parented to it, which the game's default resizer does not.
Up until recently, I've been able to preserve this functionality simply by copying a chunk of code from an older version and pasting it into the .lua file of the new version of the addon. However, with the 10.1-036 update and onwards, the file structure of the addon has changed significantly and now this method no longer works.
I'm currently using version 10.1-035 of the addon (with aforementioned code changes), and I'm sad that I cannot update lest I lose this functionality.
I was wondering if it was possible for minimap resizing to be re-added to the addon, with perhaps a toggle or something along those lines so that anyone who prefers to use the game's default resizer can do so.
Thank you!
Nope, it was all just one edit box as normal! Very odd. If it proves to be trouble re-implementing this feature, please don't worry too much about it. I can make do with the older version of the addon! Thank you so much for being willing to help, though.
I'm currently using a modified version of 10.1-035.
In EditModeExpanded.lua, I've changed a section of the code (lines 578 to 593) and reverted it to a significantly older version. I'm not sure which version number it was, unfortunately, but it was the version just prior to the removal of the minimap resizing functionality.
Here is the code I am currently using:
if db.EMEOptions.minimap then
lib:RegisterResizable(MinimapCluster)
C_Timer.After(1, function() lib:UpdateFrameResize(MinimapCluster) end)
local isDefault = true
local elpA, elpB, elpC, elpD, elpE = ExpansionLandingPageMinimapButton:GetPoint(1)
lib:RegisterCustomCheckbox(MinimapCluster, "Square",
function()
isDefault = false
Minimap:SetMaskTexture("Interface\\BUTTONS\\WHITE8X8")
ExpansionLandingPageMinimapButton:SetParent(MinimapCluster.MinimapContainer)
MinimapBackdrop:Hide()
ExpansionLandingPageMinimapButton:ClearAllPoints()
ExpansionLandingPageMinimapButton:SetPoint("BOTTOMLEFT", MinimapCluster.MinimapContainer, "BOTTOMLEFT", -10, 0)
end,
function()
-- don't change it to circle if it is already a circle from the last login
if isDefault then return end
Minimap:SetMaskTexture("Interface\\Masks\\CircleMask")
MinimapBackdrop:Show()
end
)
For comparison, this is what the code in an unmodified copy of version 10.1-035 looks like:
if db.EMEOptions.minimap then
local isDefault = true
lib:RegisterCustomCheckbox(MinimapCluster, "Square",
function()
isDefault = false
Minimap:SetMaskTexture("Interface\\BUTTONS\\WHITE8X8")
MinimapBackdrop:Hide()
end,
function()
-- don't change it to circle if it is already a circle from the last login
if isDefault then return end
Minimap:SetMaskTexture("Interface\\Masks\\CircleMask")
MinimapBackdrop:Show()
end
)
Yeah I can add it. As with resizing the menu bar, it will mean you'll have two resize bars for the Minimap, so I'll be leaving it off by default. I'll put the standard option to turn it on accompanied by a warning not to use both resize bars.
If you go into the addon's options, and turn this option on, it will separate the border buttons (map/addon compartment/name/tracking/calendar button/etc) and the expansion button from the Minimap, so resizing the Minimap won't resize them anymore:
If you find something else being resized by MinimapCluster let me know. However, if it comes from another addon I probably won't be able to stop it.
I'll fiddle around with these settings, but really the main reason I hold on to this addon for minimap resizing is because I actually have a couple of non-default things parented to the minimap; the micromenu, a WeakAura, the vehicle exit button, and two buttons added by kgpanels.
Using the older version of this addon's code (that still has minimap resizing implemented), resizing the minimap—in this case, to be slightly smaller!—would also resize all of those frames alongside it.
Not sure if this is a functionality in the current version, but if it is, then I do apologise for the trouble!
In 10.1.5 Blizzard restructured how the Minimap works. Now, the default one we see in Edit Mode is MinimapCluster
, which contains within MinimapContainer
, BorderTop
, and ExpansionLandingPageButton
.
MinimapContainer
now contains Minimap
.
BorderTop
now contains the map button, tracking button, and such.
Can you identify which one of those the buttons you mentioned are parented to?
Okay I think I have it. The default UI gives us options for MinimapCluster
, but the resize bar actually resizes MinimapContainer
, so it doesn't affect the buttons around it.