Skip to content

Commit

Permalink
map: allow to overwrite default node textures
Browse files Browse the repository at this point in the history
  • Loading branch information
shagu committed Aug 27, 2022
1 parent 019310a commit 0e62391
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -694,15 +694,21 @@ function pfMap:UpdateNode(frame, node, color, obj)
end

if ( frame.updateColor or frame.updateTexture or not frame.tex:GetTexture() ) and not frame.texture then
local r,g,b = str2rgb(frame.color)

if obj == "minimap" and pfQuest_config["cutoutminimap"] == "1" then
frame.tex:SetTexture(pfQuestConfig.path.."\\img\\nodecut")
frame.tex:SetVertexColor(r,g,b,1)
elseif obj ~= "minimap" and pfQuest_config["cutoutworldmap"] == "1" then
frame.tex:SetTexture(pfQuestConfig.path.."\\img\\nodecut")
frame.tex:SetVertexColor(r,g,b,1)
elseif frame.title and pfQuest.icons[frame.title] then
frame.tex:SetTexture(pfQuest.icons[frame.title])
frame.tex:SetVertexColor(1,1,1,1)
else
frame.tex:SetTexture(pfQuestConfig.path.."\\img\\node")
frame.tex:SetVertexColor(r,g,b,1)
end
local r,g,b = str2rgb(frame.color)
frame.tex:SetVertexColor(r,g,b,1)
end

if frame.updateLayer then
Expand Down
1 change: 1 addition & 0 deletions quest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local _, _, _, client = GetBuildInfo()
client = client or 11200

pfQuest = CreateFrame("Frame")
pfQuest.icons = {}

function pfQuest:Debug(msg)
-- only show debug output if enabled
Expand Down

0 comments on commit 0e62391

Please sign in to comment.