feat(bindings): backport direct-action and override binding APIs - #19
Open
peterkmg wants to merge 1 commit into
Open
feat(bindings): backport direct-action and override binding APIs#19peterkmg wants to merge 1 commit into
peterkmg wants to merge 1 commit into
Conversation
Add SetBindingSpell/Item/Macro/Click plus the owner-scoped SetOverrideBinding family. Store permanent commands through vanilla SetBinding, execute SPELL/ITEM/MACRO/CLICK in the resolved-command hook, and layer priority overrides ahead of the native binding table. Factor raw and saved macro dispatch into Macro::Execute so click attributes and binding commands share the same parser fallback. Preserve key-down/key-up pairing when overrides change during an action. Document return values, persistence, precedence, macro-text usage, and the deliberate 1.12 differences in README and docs/API.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport the WoW 2.0 direct-action and temporary override binding APIs:
SetBindingSpellSetBindingItemSetBindingMacroSetBindingClickSetOverrideBindingSetOverrideBindingSpellSetOverrideBindingItemSetOverrideBindingMacroSetOverrideBindingClickClearOverrideBindingsPermanent helpers construct the standard
SPELL,ITEM,MACRO, andCLICKcommand strings, then delegate to vanillaSetBinding. This preserves the current binding set, return value,UPDATE_BINDINGSnotification, andSaveBindingsbehavior.A resolved-command hook executes the four added command families while delegating existing Bindings.xml commands to the original client executor.
Override bindings are owner-scoped and session-only. Priority overrides take precedence over non-priority overrides, which take precedence over normal bindings. The most recently set override wins when priorities are equal.
Saved and raw macro execution is shared through
Macro::Execute, allowing binding macros and attribute-basedmacrotextactions to use the same parser fallback.