WeakAuras

WeakAuras

206M Downloads

Global text replacement patterns

emptyrivers opened this issue · 2 comments

commented

Is your feature request related to a problem? Please describe.

It's common for users to want to add a raid marker to text, e.g. "STACK ON {rt1}". Currently this must be done using code of some kind, which is not helpful for people who have no ability or wish to write code.

Describe the solution you'd like

When I write {rt1} (or perhaps %{rt1} or {star} or whatever) in a textbox for WeakAuras to display, I would like for WeakAuras to replace that pattern with |TInterface\TargetingFrame\UI-RaidTargetingIcon_1:0|t, to display a star in the string.

Describe alternatives you've considered

¯\_(ツ)_/¯

Additional context

¯\_(ツ)_/¯

commented

Another option would be to have a "global" state space for replacements like this, and draw on the language that the recent text rewrite introduced. %1.unitName translates to trigger # 1, key "unitName". We could interpret 0 (or maybe g) as the so-called global space, and then %0.rt1 (or %g.rt1) would (with relatively little work) just be the star icon.

But I am not sure if this would be the nicest to use for people who don't know WeakAuras as well as I or other developers do.

commented

I feel like we talked about that before, when I suggested adding %coloredName tokens.