mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
Add handlesHookScript capability flag
Introduce pfUI.handlesHookScript boolean in pfUI.lua to signal that this fork's actionbar buttons correctly support the modern HookScript widget method. This prevents ClassicAPI's AddOnCompat shim from shadowing HookScript during actionbar load. The flag documents behavior (not identity): forks that maintain HookScript-correct actionbar code should keep the flag; forks that do not should clear it to opt into the safe compatibility fallback.
This commit is contained in:
@@ -110,6 +110,14 @@ pfUI.movables = {}
|
|||||||
pfUI.version = {}
|
pfUI.version = {}
|
||||||
pfUI.env = {}
|
pfUI.env = {}
|
||||||
|
|
||||||
|
-- Capability flag: this fork's pfActionBar buttons correctly handle the modern
|
||||||
|
-- HookScript widget method, so ClassicAPI's AddOnCompat shim must NOT shadow
|
||||||
|
-- HookScript during actionbar load (older forks branch on `if button.HookScript`
|
||||||
|
-- and take a modern path they were never written for). This describes behavior,
|
||||||
|
-- not identity: a fork that keeps the HookScript-correct actionbar code keeps
|
||||||
|
-- the flag; one that lacks it should drop the flag and get the safe fallback.
|
||||||
|
pfUI.handlesHookScript = true
|
||||||
|
|
||||||
if not pfUI.disabled then
|
if not pfUI.disabled then
|
||||||
pfUI.events = Mixin({}, CallbackRegistryMixin)
|
pfUI.events = Mixin({}, CallbackRegistryMixin)
|
||||||
pfUI.events:OnLoad()
|
pfUI.events:OnLoad()
|
||||||
|
|||||||
Reference in New Issue
Block a user