mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
* feat(addon): backport the Interface Options panel for addon categories Later clients list addon option panels in InterfaceOptionsFrame; addons register them with InterfaceOptions_AddCategory (Ace3's AddToBlizOptions does it for every Ace3 addon) and open them with InterfaceOptionsFrame_OpenToCategory. Vanilla has neither, so Ace3 addons fail while initializing - Zygor Guides Viewer 2.0's OnInitialize stopped there, before its waypoint arrow and taxi data were set up. FrameXML/InterfaceOptions.lua/.xml in the bundled addon: the frame with its background as first region, the AddOns category list (buttons / buttonHeight / update, a FauxScrollFrame named InterfaceOptionsFrameAddOnsList), an empty Categories list, the panel container, Okay / Cancel / Defaults, InterfaceOptionsListButtonTemplate, and the later-client panel protocol (name, parent nesting with collapse, okay / cancel / default / refresh). Names match later clients because addons and libraries use them directly. Vanilla's own options stay where they are. Verified in-game (1.12.1 client via VanillaFixes, Zygor Guides Viewer 2.0): Zygor's AceConfigDialog-3.0 panels register under AddOns and open, and their pages were used throughout testing (with the SetParent level and scroll-clip fixes, sent separately). Not checked specifically: Okay, Cancel and Defaults calling each panel's handlers, and collapsing a category with children. * feat(addon): open Interface Options from the game menu, Escape cancels The backported InterfaceOptionsFrame had no way in for the player and closed on Escape without calling any panel's cancel. Wired the way 3.3.5 does it, with one code path for Stock and Turtle: - AddOn Options button in GameMenuFrame. It takes over Key Bindings' anchor (Interface Options on Stock, Options on Turtle) and Key Bindings moves under it, so pfUI's top-of-menu buttons are untouched. Not "AddOns": later clients use that for the addon list. The window title shares the new ADDON_OPTIONS string. - Native center panel via UIPanelWindows + Show/HideUIPanel instead of UISpecialFrames; closing returns to lastFrame (the game menu), like Turtle's own OptionsFrame. - Escape clicks InterfaceOptionsFrameCancel after static popups, the 3.3.5 ToggleGameMenu order. - Shown panel kept in InterfaceOptionsFramePanelContainer.displayedPanel, where addons read it. Verified in-game on Turtle with pfUI: button placement and menu sizing. * feat(addon): add a ClassicAPI page to AddOn Options Registers ClassicAPI in the backported InterfaceOptionsFrame with Controls, Combat and Text To Speech pages under it: - ClassicAPI: player cache (C_PlayerCache.SetEnabled / SetScanEnabled; scan is greyed out while the cache is off). - Controls: Enable Interact Key, Interact Key Icons, Auto Stand, Auto Dismount, Auto Cancel Form. - Combat: Enable Action Targeting, Enable Friendly Action Targeting, Cast action keybinds on key down, Stop Auto Attack. - Text To Speech: voice, rate, volume. Where retail's Settings has the option, the label, tooltip and value mapping are copied from Blizzard_SettingsDefinitions_Frame (soft targeting toggles 3 = Any / 1 = Gamepad; Interact Key Icons drives the same four cvars as retail's three presets). The 18 retail strings are added to every locale from Blizzard's own translations. Player cache, cast settings and friendly soft targeting have no retail labels, so those strings are ClassicAPI's own (English). Changes apply at once; Cancel / Escape restores each page to what it held when first shown, Defaults resets the shown page via GetCVarDefault. Not yet verified in-game. * docs(readme): drop the InterfaceOptions row from the API table The table lists engine API; the InterfaceOptions functions are FrameXML. They stay documented in docs/API.md. --------- Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>