Skip to content

Instantly share code, notes, and snippets.

@LiQiuDGG
Last active December 25, 2025 20:40
Show Gist options
  • Select an option

  • Save LiQiuDGG/de36ca5af7351ba815a401d90e39f609 to your computer and use it in GitHub Desktop.

Select an option

Save LiQiuDGG/de36ca5af7351ba815a401d90e39f609 to your computer and use it in GitHub Desktop.
QuaziiUI Action Bar Lock - Two Options for Pickup Modifier Fix

QuaziiUI Action Bar Lock - Pickup Modifier Fix

Fixes the "Lock Action Buttons" setting to respect user's preferred drag modifier instead of blocking all dragging.


Issue

When "Lock Action Buttons" is enabled, SetModifiedClick('PICKUPACTION', 'NONE') completely blocks ALL ability dragging, overriding the user's WoW setting for "Pick Up Action Key" (Game Options → Action Bars).


Option A: Simple Removal

Use WoW's native setting - just remove the SetModifiedClick calls and let WoW handle the modifier.

1. Replace ApplyButtonLock Function

File: utils/qui_actionbars.lua (lines 704-723)

Replace the entire ApplyButtonLock function with:

local function ApplyButtonLock()
    local settings = GetGlobalSettings()
    if not settings then return end

    local locked = settings.lockButtons or false

    -- Use Blizzard's native CVar - user's "Pick Up Action Key" setting handles the modifier
    SetCVar('lockActionBars', locked and 1 or 0)
    LOCK_ACTIONBAR = locked and '1' or '0'
end

Summary (Option A)

Aspect Implementation
Change Remove SetModifiedClick calls
Modifier Config WoW's Game Options → Action Bars
Files Changed 1 (qui_actionbars.lua)

Option B: Add Dropdown Setting

Add a dropdown in QuaziiUI so users can choose their pickup modifier directly.

1. Add Default Setting

File: utils/quicore_main.lua (around line 853, after lockButtons)

lockButtons = false,        -- Prevent dragging abilities off buttons
pickupModifier = "SHIFT",   -- Modifier key for dragging (SHIFT, CTRL, ALT, NONE)

2. Update ApplyButtonLock Function

File: utils/qui_actionbars.lua (lines 704-723)

local function ApplyButtonLock()
    local settings = GetGlobalSettings()
    if not settings then return end

    local locked = settings.lockButtons or false

    SetCVar('lockActionBars', locked and 1 or 0)
    LOCK_ACTIONBAR = locked and '1' or '0'

    -- Apply pickup modifier setting (only when locked)
    if locked then
        local modifier = settings.pickupModifier or "SHIFT"
        SetModifiedClick('PICKUPACTION', modifier)
    else
        SetModifiedClick('PICKUPACTION', 'SHIFT')
    end
end

3. Add Dropdown in Options Panel

File: utils/qui_options.lua (after line 6725, after the lockCheck)

-- Pickup modifier dropdown (add after lockCheck)
local pickupModifierOptions = {
    {value = "SHIFT", text = "Shift (Default)"},
    {value = "CTRL", text = "Ctrl"},
    {value = "ALT", text = "Alt"},
    {value = "NONE", text = "None (Complete Block)"},
}
local pickupDropdown = GUI:CreateFormDropdown(tabContent, "Pickup Modifier (when locked)",
    pickupModifierOptions, "pickupModifier", global, RefreshActionBars)
pickupDropdown:SetPoint("TOPLEFT", PAD, y)
pickupDropdown:SetPoint("RIGHT", tabContent, "RIGHT", -PAD, 0)
y = y - FORM_ROW

Summary (Option B)

Aspect Implementation
Setting pickupModifier in global settings
Options Shift, Ctrl, Alt, None
Files Changed 3 (quicore_main.lua, qui_actionbars.lua, qui_options.lua)

Users get a dropdown under "Lock Action Buttons" to choose Shift/Ctrl/Alt/None for dragging abilities when locked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment