Somethng to start with.
Place a button that looks like the keyring button in the TOPLEFT of the screen:
Lua Code:
-- Create the frame
local frame = CreateFrame("Button", nil, UIParent)
frame.Texture = frame:CreateTexture()
frame.Texture:SetAllPoints()
frame.Texture:SetTexture("Interface\\Buttons\\UI-Button-KeyRing")
frame:SetSize(40, 40)
frame:SetPoint("TOPLEFT", 5, -5)
frame:RegisterForClicks("RightButtonDown")
frame:SetScript("OnClick", function(self, button, down)
print(format("Shift Key is: %s!", IsLeftShiftKeyDown() and "DOWN" or "UP"))
if IsLeftShiftKeyDown() then
print(format("Bank is: %s!", self.isBankOpen and "OPEN" or "CLOSED"))
end
end)
frame:RegisterEvent("BANKFRAME_OPENED")
frame:RegisterEvent("BANKFRAME_CLOSED")
frame:SetScript("OnEvent", function(self, event)
if event == "BANKFRAME_OPENED" then
self.isBankOpen = true
else
self.isBankOpen = false
end
end)
This won't do anything with information about bank items as they are their own separate buttons and it depends on what information you want and what you want to do with it as the buttons are already placing the items on the cursor or opening the stack count selector.