minor changes
This commit is contained in:
@@ -45,7 +45,37 @@ 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)
|
||||||
|
|
||||||
|
do
|
||||||
|
local dropdown
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
function m.LOAD()
|
function m.LOAD()
|
||||||
|
m.initialize_menu()
|
||||||
|
|
||||||
local backdrop = DropDownList1Backdrop:GetBackdrop()
|
local backdrop = DropDownList1Backdrop:GetBackdrop()
|
||||||
aux.hook('ToggleDropDownMenu', function(...)
|
aux.hook('ToggleDropDownMenu', function(...)
|
||||||
local ret = {aux.orig.ToggleDropDownMenu(unpack(arg))}
|
local ret = {aux.orig.ToggleDropDownMenu(unpack(arg))}
|
||||||
@@ -93,7 +123,6 @@ function m.LOAD()
|
|||||||
end
|
end
|
||||||
return unpack(ret)
|
return unpack(ret)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function public.set_frame_style(frame, backdrop_color, border_color, left, right, top, bottom)
|
function public.set_frame_style(frame, backdrop_color, border_color, left, right, top, bottom)
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ aux.post_tab.FRAMES(function(m, public, private)
|
|||||||
btn:SetWidth(150)
|
btn:SetWidth(150)
|
||||||
btn:SetHeight(20)
|
btn:SetHeight(20)
|
||||||
btn:GetFontString():SetJustifyH('RIGHT')
|
btn:GetFontString():SetJustifyH('RIGHT')
|
||||||
btn:GetFontString():SetPoint('RIGHT', 0, 0)
|
btn:GetFontString():SetPoint('RIGHT', -2, 0)
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
if this.amount then
|
if this.amount then
|
||||||
m.set_unit_start_price(this.amount)
|
m.set_unit_start_price(this.amount)
|
||||||
|
|||||||
Reference in New Issue
Block a user