Dominos

Dominos

19M Downloads

Dominos seems to not respect the 'cast actions keybinds on key down' setting

ben-pickering opened this issue ยท 9 comments

commented

When I have this option checked, keybinds are just being activated on key up as normal.

I disabled Dominos and all its helper addons and with the Blizzard UI it worked on keydown as expected.

commented

More research: this is somewhat fixable by doing the following:
button:RegisterForClicks('anyDown')
However, this causes another undesired behavior: simply attempting to pick up a button will cast its associated spell. So, I'm thinking for now that this goes into the "wont fix" category

commented

Doing more research on this:
Dominos does indeed respect the onkeydown functionality, but only for any button that's not named DominosActionButtonX. This is because Blizzard's functionality for doing secure actionbutton onclick stuff is cointained within this bit of code:

function ActionButtonDown(id)
    local button;
    if ( VehicleMenuBar:IsShown() and id <= VEHICLE_MAX_ACTIONBUTTONS ) then
        button = _G["VehicleMenuBarActionButton"..id];
    elseif ( BonusActionBarFrame:IsShown() ) then
        button = _G["BonusActionButton"..id];
    else
        button = _G["ActionButton"..id];
    end
    if ( button:GetButtonState() == "NORMAL" ) then
        button:SetButtonState("PUSHED");
    end
    if (GetCVarBool("ActionButtonUseKeyDown")) then
        SecureActionButton_OnClick(button, "LeftButton");
        ActionButton_UpdateState(button);
    end
end

function ActionButtonUp(id)
    local button;
    if ( VehicleMenuBar:IsShown() and id <= VEHICLE_MAX_ACTIONBUTTONS ) then
        button = _G["VehicleMenuBarActionButton"..id];
    elseif ( BonusActionBarFrame:IsShown() ) then
        button = _G["BonusActionButton"..id];
    else
        button = _G["ActionButton"..id];
    end
    if ( button:GetButtonState() == "PUSHED" ) then
        button:SetButtonState("NORMAL");
        if (not GetCVarBool("ActionButtonUseKeyDown")) then
            SecureActionButton_OnClick(button, "LeftButton");
            ActionButton_UpdateState(button);
        end
    end
end
commented

Hm, can you tell me how to make this change on my local copy then? I have switched to Bartender and it's much less nice in general but it does have this feature. I notice that in Bartender there's a warning that it will 'cause actions to trigger when used' which is the same as you're describing - so it didn't trouble him to go in production code /shrug

commented

ActionBar.lua in dominos, after line 61:

local b = self:Restore(id) or self:Create(id)
if b then

Add this:

        b:RegisterForClicks('anyDown')
commented

Thanks, works a treat.

I was surprised to find there was a significant difference in 'feel'
between Dominos and Bartender. I'm not sure what accounts for this -
would you say there's any difference in lag between using a bar mod
and the Blizzard UI? For PvP, for example, would you expect to notice
any difference?

On 4 May 2011 00:27, Tuller
[email protected]
wrote:

ActionBar.lua in dominos, after line 61:
       local b = self:Restore(id) or self:Create(id)
       if b then

Add this:
           b:RegisterForClicks('anyDown')

Reply to this email directly or view it on GitHub:
https://github.com/Tuller/Dominos/issues/50#comment_1097085

commented

There shouldn't be a difference in FPS between using a barmod and the stock ui, other than you have the possibility to display many more buttons. In fact, there (at one point at least) were lots of bits where one could actually end up optimizing code vs Blizzards.

Can you provide more information on the differences you're feeling?

commented

I'm not sure it's anything I can really pin down. Like I say, it was
just 'feel'. I also can't rule out that there was a problem in
Bartender with the Shadow Dance bar that also made my character feel a
bit strange (if you remember, you fixed an issue with Shadow Dance
stance in Dominos). It just felt like abilities weren't triggering
properly. It's fine in Dominos -- at least, it feels the same as
before. Maybe it's unrelated to addons. I have noticed some very odd
laggy issues of late - and I don't use anything that parses the combat
log, afaik

On 5 May 2011 12:56, Tuller
[email protected]
wrote:

There shouldn't be a difference in FPS between using a barmod and the stock ui, other than you have the possibility to display many more buttons.  In fact, there (at one point at least) were lots of bits where one could actually end up optimizing code vs Blizzards.

Can you provide more information on the differences you're feeling?

Reply to this email directly or view it on GitHub:
https://github.com/Tuller/Dominos/issues/50#comment_1105240

commented

Do the same instructions apply for recent versions of Dominos?

commented

I made the same change but in ActionButton.lua - guess you refactored it into a new file :)