mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-09-23 08:07:05 +00:00
Animations: add option-tab fade, minimap pulse, zButton expand fade, map-pin drop-in; wire BeastTraining debug log to /mth err
This commit is contained in:
@@ -14,6 +14,19 @@ if not MTH_MinimapButton then
|
||||
MTH_MinimapButton = {}
|
||||
end
|
||||
|
||||
-- Capture our PizzaSauce instance for the click pulse (guarded; may be nil).
|
||||
local MTH_MB_Sauce = PizzaSauce
|
||||
local function MTH_MB_AnimateClick()
|
||||
if not MTH_MB_Sauce then return end
|
||||
if type(MTH_FX_IsEnabled) == "function" and not MTH_FX_IsEnabled("ui.minimap") then return end
|
||||
local icon = MTH_MinimapButton and MTH_MinimapButton.icon
|
||||
if not icon or type(icon.SetWidth) ~= "function" then return end
|
||||
-- Reset to base size first so rapid clicks can't make the icon drift in size.
|
||||
icon:SetWidth(20)
|
||||
icon:SetHeight(20)
|
||||
MTH_MB_Sauce:Pulse(icon, 1.35, 0.28)
|
||||
end
|
||||
|
||||
local function MTH_MB_L(key, default)
|
||||
if MTH and MTH.GetLocalization then
|
||||
return MTH:GetLocalization(key, default)
|
||||
@@ -164,6 +177,7 @@ function MTH_MinimapButton:Initialize()
|
||||
|
||||
button:SetScript("OnClick", function()
|
||||
local mouseButton = arg1
|
||||
MTH_MB_AnimateClick()
|
||||
if mouseButton == "RightButton" then
|
||||
if type(MTH_OpenOptions) == "function" then
|
||||
MTH_OpenOptions("General")
|
||||
|
||||
Reference in New Issue
Block a user