From 6fcbdeef057407914b44decc1a2e59cc0406e286 Mon Sep 17 00:00:00 2001 From: Brandon Talbot Date: Wed, 29 Jun 2016 21:46:55 +0200 Subject: [PATCH] dded missing file for setting category --- src/lua/elements/categorydialog.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lua/elements/categorydialog.lua b/src/lua/elements/categorydialog.lua index 7f6e1bb..c49f5f5 100644 --- a/src/lua/elements/categorydialog.lua +++ b/src/lua/elements/categorydialog.lua @@ -53,15 +53,23 @@ function InitDropDown(self, level) end function dialog:Init(id) - -- local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(id) + local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(id) - self.title:SetText(string.format('Change %s\'s category?', 'Test Name')) + self.title:SetText(string.format('Change %s\'s category?', name)) -- TODO add texture UIDropDownMenu_Initialize(self.dropDown, InitDropDown) self.errorText:Hide() local text = ADDON.settings.categories.userDefined[id] or '' self:SetText(text) + + self.frame:SetHeight(75 + self.title:GetStringHeight()) +end + +function dialog:Setup() + if self.frame then + self.frame:Setup() + end end function dialog:SetText(text) @@ -171,7 +179,6 @@ function dialog:CreateFrame() dialog.frame:Hide() end) - self.frame:SetWidth(350) - self.frame:SetHeight(90) + self.frame:SetSize(350, 90) end -- 1.7.9.5