From 166a127a5c74a662565fa2c15809f63d368726fb Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 30 Mar 2013 20:40:18 +0100 Subject: [PATCH] Add a notice if there are no items --- HabeebIt.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/HabeebIt.lua b/HabeebIt.lua index 7b5878d..a2920b2 100644 --- a/HabeebIt.lua +++ b/HabeebIt.lua @@ -122,6 +122,12 @@ local function PopulateList() end Frame:SetHeight(math.max(76, 12 + (numItems * 48))) + + if(numItems > 0) then + Frame.Empty:Hide() + else + Frame.Empty:Show() + end end local function InitializeList() @@ -171,6 +177,11 @@ Frame:SetScript('OnEvent', function(self, event, ...) self:SetBackdrop(backdrop) self:SetBackdropColor(0, 0, 0, 0.8) self:SetBackdropBorderColor(0.6, 0.6, 0.6) + + local Empty = self:CreateFontString(nil, 'ARTWORK', 'GameFontHighlight') + Empty:SetPoint('CENTER') + Empty:SetText('This encounter has no possible items for\nyour current class and/or specialization') + self.Empty = Empty end end) -- 1.7.9.5