tukui-org / ElvUI

User Interface replacement AddOn for World of Warcraft.
https://tukui.org
Other
398 stars 136 forks source link

Keybinds not showing up in options #1179

Closed sp00n closed 3 months ago

sp00n commented 3 months ago

Troubleshooting Steps

Not sure if this is intended or not, but not all of the action bars are being displayed in the game options when you expand the extra section for ElvUI. It starts with ActionBar 2 Button x and then goes directly to ActionBar 7 [...] (up to 10), skipping the action bars 1, 3, 4, 5 & 6.

Setting the keybinds with the custom ElvUI keybinder works fine, and /framestack also shows that I have keybinds on e.g. ElvUI_Bar3, so I assumed these should show up in the options, but they don't. I also couldn't find the keybinds for this ElvUI_Bar3 in the keybinds for the default WoW bars (there the Action Bar 1 equals Elv_UI_Bar1 and Action Bar 2 equals Elv_UI_Bar6 for me, but that's it).

In the ElvUI settings I have enabled the Player Bars 1-6.

image image

Describe the expected behavior and what actually happened?

Not all action bars showing up in the game options. I expected to see all of them there.

Reproducing the issue.

Open the game options. Go to "Keybindings" and expand the "ElvUI" dropdown.

Lua Errors

No response

Verification Steps

Repooc commented 3 months ago

Since our bars do not equate to blizzard bars 1 to 1 (ie: our bar 1 may not be their bar 1 for example) so the bars image I have bars 1-10, 13-15 (13 bars on the left top to bottom)

https://github.com/tukui-org/ElvUI/assets/1479745/8a4bbdc2-d486-463b-8758-956d7f59d988

as you can see some of the binds are going to show on the "Blizzard's" part and some are in ElvUI section, not a bug just a quirk how it is

sp00n commented 3 months ago

The problem was that only Action Bar and Action Bar 2 showed up for the Blizzard default action bars, and only ActionBar 2 and ActionBar 7 (up to 10) under the ElvUI section (see my original post), so a whole set of action bars was just completely missing.

Here are the Blizzard entries: image

After looking through the code this seems to be intentional: \Core\Modules\ActionBars\ActionBars.lua:1696

function AB:Initialize()
    AB.db = E.db.actionbar

    _G.BINDING_HEADER_ELVUI = E.title

    for _, barNumber in pairs({2, 7, 8, 9, 10}) do
        for slot = 1, 12 do
            _G[format('BINDING_NAME_ELVUIBAR%dBUTTON%d', barNumber, slot)] = format('ActionBar %d Button %d', barNumber, slot)
        end
    end

And the other bars seem to make use of the MULTIACTIONBAR one (see line 76 in the same file, AB.barDefaults).

The use of MULTIACTIONBAR however lead me to a solution of some sorts. (Since 2023?) These MULTIACTIONBAR entries are only being displayed in the game options / Keybindings if the corresponding entry is also selected in the game options / Action Bars section. And confusingly the option to make them display is labelled as "Remove Bar X Action Page", which sounds like it would do something else entirely.

Here's a screenshot of the setting that caused the first screenshot in this post, where only Blizzard's Action Bar and Action Bar 2 show up: image

And only if I enable the tick box for each of these entries, the other Blizzard action bars also show up in the game options: image image

These "Remove Bar X Action Page" entries are being set in the AB:BlizzardOptionsPanel_OnEvent() (line 76) function of the same file. I don't know if the functionality for these entries have changed or if these were intended to do something else, but I was not expecting that "removing the action page for bar 3" would make bar 3 show up in the game options. 👀