Hey! I dislike the new 5.0 "feature" that changed the minimap button in battlegrounds which you use to show the scoreboard, and right click to for example leave the BG or interact with your queue to other BGs and so on. It no longer simply shows the scoreboard with a left click, it has an annoying menu with the scoreboard button way too close to the "Leave Battleground" button, and what I wanted to do was simply change it so that with the left mouse button you open the scoreboard, but with the right mouse button you open the regular menu as you normally would. For LFG instances (which now uses the same button) it should open the menu regardless of which button was used.
The first part was easy, getting the scoreboard to open with the left button, that part is working fine. However, the right mouse button simply does nothing, since my OnClick function doesn't have any code for it, but is there a simple way to make it work like it normally would, either by simply adding it into my if-clause, or having OnClick only registering the left mouse button.
Here's my code:
Lua Code:
local frameCurrentlyShown = false
QueueStatusMinimapButton:SetScript("OnClick", function(self, button)
isInstance, instanceType = IsInInstance()
if isInstance and instanceType == "pvp" and button == "LeftButton" then
if frameCurrentlyShown then
WorldStateScoreFrame:Hide()
frameCurrentlyShown = false
else
WorldStateScoreFrame:Show()
frameCurrentlyShown = true
end
else
-- Show the regular menu
end
end)
Simply running DropDownList1:Show() (DropDownList1 is the name of the regular frame that pops up...) doesn't work, I assume since the frame also has to be filled with information.