Skip to content

Commit

Permalink
add support for adding color in the replacements like |cffFF0000N|r2 …
Browse files Browse the repository at this point in the history
…would display the N2 as the keybind text with the letter N colored as red
  • Loading branch information
Repooc committed Aug 4, 2024
1 parent d964688 commit b715dcb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ElvUI_KeybindDisplay/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ if E.Retail then
}
end

local function escapeSequence(a) return format('|%s', a) end

local function GetOptions()
for _, func in pairs(KD.Configs) do
func()
Expand Down Expand Up @@ -158,6 +160,7 @@ function KD:FixKeybindText(button)

if E.db.kd.replacements[currentText] then
currentText = E.db.kd.replacements[currentText]
currentText = currentText:gsub('||([TCRAtncra])', escapeSequence)
end

hotkey:SetText(currentText)
Expand Down

0 comments on commit b715dcb

Please sign in to comment.