Leatrix Plus (The War Within)

Leatrix Plus (The War Within)

31M Downloads

[Question] Regarding the Toggle Button Frame

Spiderkeg opened this issue ยท 2 comments

commented

I have my minimap situated at the bottom of my screen, and unfortunately the Toggle Button Frame opens in a less than desirable position. I've had to manually alter the SetPoint in Leatrix Plus to position the Toggle Button Frame directly top center of the minimap.

bFrame:SetPoint("BOTTOM", Minimap, "TOP", 0, 16)

This is obviously not sustainable, considering any Leatrix Plus updates will overwrite my little change. I would prefer to set my change from an outside script, but I don't know how to reference the Toggle Button Frame. The Frame doesn't appear to be named for reference and I can't spot any otherwise global reference.

Is there something I can do?

commented

Awesome, thank you very much.

commented

In 10.0.07.alpha.6 (and the next alpha releases for Wrath Classic and Classic Era), the combined button frame has a global reference of LeaPlusGlobalMinimapCombinedButtonFrame.

So you can add this to your .toc:
## OptionalDeps: Leatrix_Plus

And add this to your .lua after PLAYER_LOGIN fires:

if LeaPlusGlobalMinimapCombinedButtonFrame then
	hooksecurefunc(LeaPlusGlobalMinimapCombinedButtonFrame, "SetHeight", function()
		LeaPlusGlobalMinimapCombinedButtonFrame:ClearAllPoints()
		LeaPlusGlobalMinimapCombinedButtonFrame:SetPoint("BOTTOM", Minimap, "TOP", 0, 16)
	end)
end