tullamods / Dominos

A main actionbar replacement
https://tullamods.com/dominos
BSD 3-Clause "New" or "Revised" License
79 stars 27 forks source link

Key bind color #798

Closed Neokub closed 5 months ago

Neokub commented 5 months ago

how change keybind color?

Neokub commented 5 months ago

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