Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

Pings: Add a way to set up a pending ping #478

Open Meorawr opened 9 months ago

Meorawr commented 9 months ago

To permit addons to create a custom ping wheel we need a way to set up a pending ping - one that functions similarly to when you press and hold the ping hotkey to open the default radial wheel UI.

If we only care about making this available to secure action buttons for now then I believe all that's needed is the following:

  1. Add a new secure action ("startping") that internally routes a call through to C_PingSecure.GetTargetWorldPing with the current cursor position.
  2. Add a new secure action ("cancelping") that internally calls C_PingSecure.ClearPendingPingInfo.
  3. Add the new secure action discussed in #477 that allows submitting a ping with a nil unit, so as to consume the pending world ping.
  4. Add a new function to the restricted environment (and possibly C_Ping?) that allows querying if a world ping interaction is currently pending - that is to say, it should return true so long as C_PingSecure.ClearPendingPingInfo would actually do something.