Hi all
I am looking for some help in regards to getting an itemID when I click an item in the adventure guide, my bags and my bank.
I have worked out how to get the itemID of items in my bags and bank but it requires that I have to pick up the item first.
Lua Code:
local btn = CreateFrame("BUTTON", "myTest")
SetBindingClick("ALT-CTRL-BUTTON1", "myTest","b1")
SetBindingClick("BUTTON2", "myTest","b2")
SetBindingClick("ALT-SHIFT-T", "myTest","st")
btn:SetScript("OnClick", function(self, button)
if button == "b1" then
local cursorItemType, cursorItemID = GetCursorInfo()
print("mouse button 1 clicked",cursorItemType,cursorItemLink)
elseif button == "b2" then
print( "The mouse is over " .. GetMouseFocus():GetName() );
local cursorItemType, cursorItemID = GetCursorInfo()
print("mouse button 2 clicked",cursorItemType,cursorItemLink)
elseif button == "st" then
local cursorItemType, cursorItemID, cursorItemLink = GetCursorInfo()
print("Shift-T buttons clicked",cursorItemType,cursorItemLink)
end
end)
Is there a way to get an itemID on a down press or under the cursor rather than having to pick up the item first? and/or is there a call such as
GetItemDetailsUnderCursor()?
Also, I have had little luck finding a good tutorial on how to add keybindings to the binding UI so any help with pointing me to such an example/tutorial would be great.
Cheers