mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-09-23 16:16:58 +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:
@@ -30,6 +30,23 @@ local function MTH_OPT_AnimateOpen(frame)
|
||||
MTH_OPT_Sauce:SlideIn(frame, "UP", 60, 0.4, "outCubic")
|
||||
end
|
||||
|
||||
-- Fade the active settings panel when switching options tabs, unless disabled.
|
||||
local function MTH_OPT_AnimateTabContent(tabKey)
|
||||
if not MTH_OPT_Sauce then return end
|
||||
if type(MTH_FX_IsEnabled) == "function" and not MTH_FX_IsEnabled("ui.optiontabs") then return end
|
||||
if type(MTH_OPTIONS_TABS) ~= "table" then return end
|
||||
for i = 1, table.getn(MTH_OPTIONS_TABS) do
|
||||
if MTH_OPTIONS_TABS[i].key == tabKey then
|
||||
local frame = MTH_GetFrame(MTH_OPTIONS_TABS[i].frame)
|
||||
if frame then
|
||||
if type(frame.SetAlpha) == "function" then frame:SetAlpha(0) end
|
||||
MTH_OPT_Sauce:FadeIn(frame, 0.22)
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function MTH_RegisterEscClose(frameName)
|
||||
if not (frameName and UISpecialFrames) then
|
||||
return
|
||||
@@ -277,6 +294,7 @@ function MTH_SelectOptionsTab(tabKey)
|
||||
end
|
||||
end
|
||||
end
|
||||
MTH_OPT_AnimateTabContent(tabKey)
|
||||
end
|
||||
|
||||
function MTH_ResetAndSelectOptionsTab(tabKey)
|
||||
|
||||
Reference in New Issue
Block a user