Still Questing A WoW journey and its addons
Still running from Hogger Settings

← Back

Still Questing / Discoveries

Secure buttons and the combat lock

A button that drinks for you has to be one of the game's secure buttons, and a secure button placed on a window locks that whole window during a fight. The answer that worked in game was an invisible secure button, kept apart from the party window and laid over a drawn one. Getting the click to reach it took three changes at once, and which of the three did the job is not known.

Proved in game OAP Party Utilities

Concluded Written up Updated

The question

Can the party window carry a button that drinks (out of a fight) and warns the party (in a fight), without the window itself being frozen every time a fight starts?

Why it mattered

OAP Party Utilities has an out-of-mana button on its party window. One click warns the party if you are too dry to cast, then drinks the drink you chose.

Addon code may not use an item by itself. The comment at the top of DrinkButton.lua puts it this way: using an item takes the game's secure button, and a secure button is a protected frame. One placed on the party window would make the whole window protected: no moving, showing or hiding it in a fight.

The same day, 2026-10-14, the Buffs helper box met the second rule. Its cast buttons were to sit after a line of text, and the game refused with the message "Cannot anchor protected frames to regions". A secure button can be fixed to a frame, but not to a piece of text or a picture.

What could have been done

Put the secure button on the window and accept the lock: fine for a box that is put away for fights anyway, such as the Buffs helper. Or keep the window free: draw an ordinary button on it and lay a separate, invisible secure button over the top, belonging to the screen and following the drawn one about while no fight is on.

How it was done

The overlay was built and tried in game on 2026-10-14. It did not work: the secure button never got a click.

The OAP Debug log showed why, up to a point. Both buttons were in the same place and the same size, the secure one at level 7 over the drawn one at level 2, shown, with the mouse switched on. The game still gave every click to the drawn button underneath.

Three things were then changed together. The drawn button stops taking the mouse while the secure one is over it. The secure button was given something to hit: a black texture at 1 percent, too faint to see. The code calls this "one guess at why it never got a click". And the secure button was registered for both the press and the release, so the press is not left for a frame underneath.

A fourth fix carries the same date. Clicking the party window could raise it after the secure button was made, and then the drawn button was on top and took the click; the code's note quotes the report as "clicking the oom button does nothing". The secure button's level is now kept five above the drawn one's.

What was seen

After the overlay fix the button drank, out of combat. The plan ticks this off with the drink used in the test, Sweet Nectar.

In boss fights a new problem appeared on 2026-10-16. The warning is party chat sent by the addon, and all three clicks in one boss fight were blocked: the log showed ADDON_ACTION_BLOCKED at SendChatMessage. On ordinary enemies the same click had worked.

The secure button was then given a second job. As a fight starts it becomes a macro that types the party message, and after the fight it goes back to the drink. On 2026-10-18 I pressed it once in a boss fight and the party saw the message.

On 2026-11-11 I confirmed in game: too dry in a party, one click warns then drinks, and the message is said once, not twice. In a fight a click only warns, and after the fight it drinks again.

On 2026-11-12 the order of events was measured from the log for the Buffs helper box: the game's fight-start event (PLAYER_REGEN_DISABLED) arrived while the combat lock was still off. The whole design leans on that gap, because it is the last moment a protected frame can be changed.

Measured on 2026-11-13 with a probe over eight fights: the lock comes on the next drawn frame, 4 to 13 ms after the fight-start event. With it on, moving the Buffs box on its Give page (cast buttons showing) was refused, and so was hiding it; fading it worked.

The same day showed what makes a frame protected. The box stayed protected with no cast button shown, then with none left inside it; it was freed only when the unused buttons were moved out into a hidden holder and their anchors to the box's lines were cleared too. On Forever a frame counts as protected while a secure button is inside it or anchored to it, shown or not. I wrote: "done: slides all round that time".

The decision

Put secure buttons inside a frame only if that frame is put away for every fight, and put it away at the fight-start event, just before the lock.

On a frame that stays up, such as the party window, the secure button is a separate invisible button over the drawn one, never anchored to the window. Keep all three overlay changes, because nobody knows which one made the click arrive.

One cost is accepted: in a fight the secure button cannot move. If the party window is moved or hidden mid-fight, the button stays where the window was until the fight ends.

Since 2026-11-13: cast buttons not in use are kept outside the Buffs box, unanchored, so the box is protected only while they show. A box that is still protected when a fight starts stops taking the mouse in the fight-start handler and fades out where it is.

Ways tried

WayOutcomeNote
Invisible secure button on the screen, laid over the drawn button Retained Works in game; the party window stays an ordinary frame.
Secure buttons inside a box that is put away at the fight-start event Retained Used by the Buffs helper box, which is not wanted in a fight anyway.
Secure button placed directly on the always-on party window Rejected It would make the whole window protected: no moving, showing or hiding it in a fight.
Anchoring a secure button to a line of text Rejected The game refused in game on 2026-10-14: "Cannot anchor protected frames to regions".
Secure button simply stacked above the drawn one, both taking the mouse Rejected The drawn button underneath took every click, as the OAP Debug log showed.
Addon-sent party chat for the in-fight warning Rejected Blocked in boss fights; replaced by a macro run by the secure button.
Sliding the Buffs box off the screen for a fight Executed Built on 2026-11-12; works in game since 2026-11-13. A box still holding cast buttons fades instead (see Sliding a window off the screen).

Never give up, never surrender

Where the AI stalled, and what it took to get past it.

The plan's note of 2026-10-16 on the blocked boss-fight chat reads: "It cannot be got round". The addon was changed to say in the chat window why the warning was not sent, and that was where it rested.

After the next blocked boss fight I said what I actually wanted: in a fight, only the party message, no drink. The secure button was then made to carry the message as a macro during fights, since a macro run by a secure button counts as you typing it. My one press in a boss fight on 2026-10-18 showed that it does get through. The record does not say who first suggested the macro.

Still not known

  • Which of the three overlay changes fixed the click (no mouse on the drawn button, the 1 percent texture, registering both press and release) is not known. All three are kept.
  • The plan's item that the party window still moves and hides during a fight is not ticked: not verified in the record.
  • A click passed on to the secure button while it is hidden (from an OAP UnitButtons bar) rests on reading the game's code; the plan marks clicking it hidden as not verified in game, though I confirmed the bar button working with the party window closed on 2026-11-11.
  • Whether the game would let a locked window's height change (for the Collapse style) has not been seen in game.

Sources

The project files and commits this report was written from.

  • OAPPartyUtils: DrinkButton.lua (header comment; drawnTakesMouse, follow, makeSecure, fightStarts, ns.DrinkButtonWhere)
  • OAPPartyUtils: BuffsCast.lua (plainButton, ns.CreateBuffCastButton)
  • OAPPartyUtils: BuffsHelper.lua (comment on 'Cannot anchor protected frames to regions', in game 2026-10-14; hide and fightStarts comments)
  • OAPPartyUtils: PLAN.md, 'Buff helper' step 4 (secure buttons in the box, hiding on PLAYER_REGEN_DISABLED)
  • OAPPartyUtils: PLAN.md, 'Drink button, helper buttons, drink messages (2026-10-14)'
  • OAPPartyUtils: PLAN.md, 'The out-of-mana button on OAP UnitButtons' bars (2026-11-10)'
  • OAPPartyUtils: PLAN.md, 'Windows slide away for a fight (2026-11-12)'
  • OAPPartyUtils: git commit 2026-10-18 'Role ring, Buffs helper fixes, more drink/OOM messages, OAP Debug level' (first commit holding DrinkButton.lua and BuffsCast.lua)
  • OAPPartyUtils: PLAN.md, 'Windows slide away for a fight' (lock probe and putAway, 2026-11-13)
  • OAPPartyUtils: Claude transcript 78db918d, 2026-11-13

In the Quest Log

Happened time from: Claude transcript 78db918d (my message) written up OAP Party Utilities Working in game updated
The Buffs helper slides away for a fight, and back after it

I asked for windows to be animated away when a fight starts, not just hidden, as a module to reuse in other addons. After a day of in-game tests, and one push from me not to give up, the Buffs helper slid away and back on every page.

Read the entry: The Buffs helper slides away for a fight, and back after it

"if you need to hide a window because combat starts can we animate it 'away'. First animation is 'slide off closest edge', and when combat finishes animate it back. Keep this a modular function, I can see me using it in many other addons and places". And the key idea: "why can't it be left visible once it's off screen so the combat lock doesn't upset action buttons?"

The game's own animation left pieces of the window behind, so the window itself is moved instead, a step each frame. But a box holding cast buttons is locked by the game a few milliseconds into a fight, far too soon for any slide, and the Give page just vanished. Claude said fading wouldn't help either.

"you're giving up again - think outside the box", I said: fade it out, then when the fight ends get it off screen, show it, fade it back in and slide it home. The game allowed a fade under the lock, so the box now stops taking clicks before the lock and fades where it is. A few more rounds of tests later: "done: slides all round that time". The slide time was set by eye in game: 0.4 s, then 0.3, then 0.2.

The same evening it grew an Animation setting with six choices, Collapse and Fade among them, for the Buffs helper and the Rolls window. Those had not been tried in game when this was written.

Where this comes from

  • OAPPartyUtils: Claude transcript 78db918d, 2026-11-12 and 2026-11-13
  • OAPPartyUtils: SlideAway.lua
  • OAPPartyUtils: PLAN.md, 'Windows slide away for a fight'
Happened time from: Claude transcript 78db918d (my message) written up OAP Party Utilities Working in game updated
The healer sits down to drink, and says so

When my healer sits down to drink without the mana for a chosen spell, the party is told. Forever keeps your own mana secret, so the warning asks the game whether that spell can be cast instead of reading a percentage.

Read the entry: The healer sits down to drink, and says so

My idea was "a 'your poor stressed healer has just sat down for a long needed drink of Melon Juice at only 5% mana - run off and die at your own risk' type warning when I start drinking".

The first version worked from a mana percentage and never fired: the log said the mana was nil. "mana is secret," I said. On Forever your own mana is a secret number, even out of combat. I pointed Claude to the way other addons shade spells you can't afford, and it rebuilt the warning on the game's yes-or-no answer to whether a spell can be cast, from a list of my own mana spells, cheapest first. "ok that works".

Then the messages became mine to write. I asked for more: "I don't have a drinking problem, but you will have a problem if you pull again", and some that quote the spell's cost, which "makes me look clever". Then: "perfect that will keep my party members entertained while they wait for me to res them".

On 14 October an out-of-mana button followed: one click warns, then drinks; in a fight it only warns. How a button that drinks lives on the party window, and how its warning gets past the game's block on addon chat in boss fights, is in the Discovery linked below.

Where this comes from

  • OAPPartyUtils: Claude transcript 78db918d, 2026-10-12 to 2026-10-17
  • OAPPartyUtils: PLAN.md, 'Drink warning' and 'Drink button, helper buttons, drink messages'
  • OAPPartyUtils: DrinkWarning.lua
  • OAPPartyUtils: git commit 204caf2