minor changes

This commit is contained in:
Manuel Simon Hirsig
2016-08-07 07:52:36 +02:00
parent 62da558e7a
commit 1eb24dfc2f
2 changed files with 31 additions and 2 deletions
+30 -1
View File
@@ -45,7 +45,37 @@ public.inline_color = aux.index_function(function(self, key)
return format('|c%02X%02X%02X%02X', unpack(color))
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()
m.initialize_menu()
local backdrop = DropDownList1Backdrop:GetBackdrop()
aux.hook('ToggleDropDownMenu', function(...)
local ret = {aux.orig.ToggleDropDownMenu(unpack(arg))}
@@ -93,7 +123,6 @@ function m.LOAD()
end
return unpack(ret)
end)
end
function public.set_frame_style(frame, backdrop_color, border_color, left, right, top, bottom)
+1 -1
View File
@@ -347,7 +347,7 @@ aux.post_tab.FRAMES(function(m, public, private)
btn:SetWidth(150)
btn:SetHeight(20)
btn:GetFontString():SetJustifyH('RIGHT')
btn:GetFontString():SetPoint('RIGHT', 0, 0)
btn:GetFontString():SetPoint('RIGHT', -2, 0)
btn:SetScript('OnClick', function()
if this.amount then
m.set_unit_start_price(this.amount)