Skip to content

Commit

Permalink
Add a print if a texture is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Justw8 committed Aug 21, 2024
1 parent f2c93db commit 4970186
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions TeleportMenu.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
local _, addonTbl = ...



local APPEND = "\124cFFFF0000TeleportMenu:\124r "

local validHearthstoneToys = {
[54452] = true, -- Ethereal Portal
[64488] = true, -- The Innkeeper's Daughter
Expand Down Expand Up @@ -129,7 +133,11 @@ local function createAnchors()
local button = CreateFrame("Button", nil, buttonsFrame," SecureActionButtonTemplate");
local yOffset = 40 + (-40 * created)
button:SetSize(40, 40)
button:SetNormalTexture(texture or "Interface\\Icons\\INV_Misc_QuestionMark")
if not texture then
print(APPEND.."a texture is missing for itemID: "..tp.id..", please report this to the author.")
texture = "Interface\\Icons\\INV_Misc_QuestionMark"
end
button:SetNormalTexture(texture)
if tp.type == "item" then
button:SetAttribute("type", tp.type)
button:SetAttribute(tp.type, "item:"..tp.id)
Expand Down Expand Up @@ -237,7 +245,6 @@ local function createAnchors()
end

-- Slash Commands
local APPEND = "\124cFFFF0000TeleportMenu:\124r "
SLASH_TPMENU1 = "/tp"
SLASH_TPMENU2 = "/tpmenu"
SlashCmdList["TPMENU"] = function(msg)
Expand Down

0 comments on commit 4970186

Please sign in to comment.