12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

236 Part II ■ <strong>Programming</strong> in <strong>World</strong> <strong>of</strong> <strong>Warcraft</strong>endif entry.quality > 1 thenbutton.glow:SetVertexColor(iGetItemQualityColor(entry.quality))button.glow:Show()elsebutton.glow:Hide()endbutton:Show()elsebutton.link = nilbutton:Hide()endend-- Update page buttonsif min > 1 thenBagBuddy.prev:Enable()elseBagBuddy.prev:Disable()endif max < #sortTbl thenBagBuddy.next:Enable()elseBagBuddy.next:Disable()end-- Update the status textif #sortTbl > 24 thenlocal max = math.min(max, #sortTbl)local msg = string.<strong>for</strong>mat(“Showing items %d - %d <strong>of</strong> %d“, imin, max, #sortTbl)BagBuddy.status:SetText(msg)elseBagBuddy.status:SetText(“Found “ .. #sortTbl .. “ items“)endendfunction BagBuddy_Button_OnEnter(self, motion)if self.link thenGameTooltip:SetOwner(self, “ANCHOR_TOPRIGHT“)GameTooltip:SetHyperlink(self.link)GameTooltip:Show()endendfunction BagBuddy_Button_OnLeave(self, motion)GameTooltip:Hide()

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!