Dominos

Dominos

19M Downloads

Key bind color

Neokub opened this issue ยท 1 comments

commented

how change keybind color?

commented

I already found it and did it this way

\Dominos\core> bindableButton.lua

function BindableButton:UpdateHotkeys()
    local key = getButtonHotkey(self)
    if key ~= '' and Addon:ShowBindingText() then
        -- Set the color you desire (RGBA values)
        local bindColor = {1, 0.82, 0, 1}  -- color 
        self.HotKey:SetText("|c" .. format("%02x%02x%02x%02x", bindColor[4] * 255, bindColor[1] * 255, bindColor[2] * 255, bindColor[3] * 255) .. key .. "|r")
        self.HotKey:Show()
    else
        -- Blank out non-blank text, such as RANGE_INDICATOR
        self.HotKey:SetText('')
        self.HotKey:Hide()
    end
end