View Single Post
02-20-24, 04:01 PM   #1
atshn
A Deviate Faerie Dragon
Join Date: Feb 2024
Posts: 19
How to change pet bar hotkey color?

I'm using this code to change the color of hotkeys for all my bars. Works fine for everything except the pet bar. Is "PetActionButton" not the correct name or am I completely off and the code doesn't work for the pet bar at all?

Code:
for i = 1, NUM_ACTIONBAR_BUTTONS do
   local hotkey = _G["PetActionButton"..i.."HotKey"]
   hotkey:SetFont("Fonts\\FRIZQT__.ttf", 12, "THICKOUTLINE")
end

local function CustomizeHotkey(self)
   local hotkey = _G[self:GetName().."HotKey"]
   hotkey:SetTextColor(1, 1, 1, 1)
end

hooksecurefunc("ActionButton_Update", CustomizeHotkey)
hooksecurefunc("ActionButton_OnUpdate", CustomizeHotkey)
  Reply With Quote