bugfix
This commit is contained in:
@@ -279,7 +279,7 @@ function private.AuctionFrameAuctions_OnEvent(...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function private.SetItemRef(...)
|
function private.SetItemRef(...)
|
||||||
if arg[3] ~= 'RightButton' or not m.index(m.active_tab.module[1], 'CLICK_LINK') or not strfind(arg[1], '^item:%d+') then
|
if arg[3] ~= 'RightButton' or not m.index(m.active_tab(), 'module', 1, 'CLICK_LINK') or not strfind(arg[1], '^item:%d+') then
|
||||||
return m.orig.SetItemRef(unpack(arg))
|
return m.orig.SetItemRef(unpack(arg))
|
||||||
end
|
end
|
||||||
for _, item_info in {m.info.item(tonumber(({strfind(arg[1], '^item:(%d+)')})[3]))} do
|
for _, item_info in {m.info.item(tonumber(({strfind(arg[1], '^item:(%d+)')})[3]))} do
|
||||||
|
|||||||
@@ -45,32 +45,54 @@ public.inline_color = aux.index_function(function(self, key)
|
|||||||
return format('|c%02X%02X%02X%02X', unpack(color))
|
return format('|c%02X%02X%02X%02X', unpack(color))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
--/run aux.gui.menu('kek', 'kuk', 'kok', function() end)
|
||||||
do
|
do
|
||||||
local dropdown
|
local dropdown
|
||||||
|
|
||||||
function public.menu(...)
|
function public.menu(...)
|
||||||
UIDropDownMenu_Initialize(dropdown, function()
|
local mythis = this
|
||||||
for i=1,arg.n-1 do
|
this = dropdown
|
||||||
UIDropDownMenu_AddButton{
|
UIMenu_Initialize()
|
||||||
text = arg[i],
|
for i=1,arg.n-1 do
|
||||||
value = i,
|
UIMenu_AddButton(
|
||||||
func = function()
|
arg[i],
|
||||||
return arg[arg.n](this.value)
|
i,
|
||||||
end,
|
function()
|
||||||
}
|
return arg[arg.n](this.value)
|
||||||
end
|
end
|
||||||
end, 'MENU')
|
)
|
||||||
|
end
|
||||||
dropdown:SetPoint('BOTTOMLEFT', GetCursorPosition())
|
dropdown:SetPoint('BOTTOMLEFT', GetCursorPosition())
|
||||||
ToggleDropDownMenu(nil, nil, dropdown, nil, 0, 0)
|
dropdown:Show()
|
||||||
|
this = mythis
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- function public.menu(...)
|
||||||
|
-- UIDropDownMenu_Initialize(dropdown, function()
|
||||||
|
-- for i=1,arg.n-1 do
|
||||||
|
-- UIDropDownMenu_AddButton{
|
||||||
|
-- text = arg[i],
|
||||||
|
-- value = i,
|
||||||
|
-- func = function()
|
||||||
|
-- return arg[arg.n](this.value)
|
||||||
|
-- end,
|
||||||
|
-- }
|
||||||
|
-- end
|
||||||
|
-- end, 'MENU')
|
||||||
|
-- dropdown:SetPoint('BOTTOMLEFT', GetCursorPosition())
|
||||||
|
-- ToggleDropDownMenu(nil, nil, dropdown, nil, 0, 0)
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- function private.initialize_menu()
|
||||||
|
-- dropdown = CreateFrame('Frame', 'aux_frame'..aux.id(), UIParent, 'UIDropDownMenuTemplate')
|
||||||
|
-- dropdown:SetWidth(1)
|
||||||
|
-- dropdown:SetHeight(1)
|
||||||
|
-- dropdown:SetAlpha(0)
|
||||||
|
-- end
|
||||||
|
|
||||||
function private.initialize_menu()
|
function private.initialize_menu()
|
||||||
dropdown = CreateFrame('Frame', 'aux_frame'..aux.id(), UIParent, 'UIDropDownMenuTemplate')
|
dropdown = CreateFrame('Frame', 'aux_frame'..aux.id(), UIParent, 'UIMenuTemplate')
|
||||||
dropdown:SetWidth(1)
|
|
||||||
dropdown:SetHeight(1)
|
|
||||||
dropdown:SetAlpha(0)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function m.LOAD()
|
function m.LOAD()
|
||||||
|
|||||||
Reference in New Issue
Block a user