Dominos

Dominos

19M Downloads

Keybinding can't be changed via lua edit

Jeirs opened this issue ยท 5 comments

commented

Just generally towards the end of the file (or even in a separate addon that's dependent on Dominos). I think the call should actually be:

hooksecurefunc(Dominos.BindableButton, "AddQuickBindingSupport", function(self, button)
    button.HotKey:SetFont("Fonts\\FRIZQT__.ttf", 18, "OUTLINE")
end)

Originally posted by @Tuller in #463 (comment)

commented

Thank you Tuller for updating Dominos.
I am re-opening this issue as the previous code snippet is not working anymore. I guess Dragonflight got some changes or something.

commented

I don't know if this is still an issue for you, but I made a Weakaura to manually change the font. This means there's no need problems with changing this addon's files:

https://wago.io/84UxzU_2m

function(event, ...)
    -- addon not loaded
    if not Dominos then return end
    
    local SML = LibStub:GetLibrary("LibSharedMedia-3.0")
    if not SML then print("Dominos change font: Error loading SharedMedia"); return end
    -- evaluates to a path, so alternatively use a path like "Fonts\\FRIZQT__.TTF"
    local sharedFont = SML:Fetch(SML.MediaType.FONT, "Expressway")
    -- see https://warcraft.wiki.gg/wiki/API_FontInstance_SetFont
    local fontOptions = "OUTLINE"
    local fontSize = 16
    -- RGBA
    local fontColour = {1, 1, 1, 1}
    
    for k, v in Dominos.Frame:GetAll() do
        if tonumber(k, 10) then
            for i=1,v:NumButtons() do
                local actionButton = v:AcquireButton(i)
                actionButton.HotKey:SetFont(sharedFont, fontSize, fontOptions)
                actionButton.HotKey:SetTextColor(unpack(fontColour))
                actionButton.Name:SetFont(sharedFont, fontSize, fontOptions)
                actionButton.Name:SetTextColor(unpack(fontColour))
                actionButton.Count:SetFont(sharedFont, fontSize, fontOptions)
                actionButton.Count:SetTextColor(unpack(fontColour))
            end
        end
    end
end
commented

It seems to be working OK for me

commented

Working perfectly this is on my end.
Sorry for creating an issue.

commented

Screenshot_5

Hello Tuller
I am just here to let you know that the code snippet isn't working anymore.