Skip to content

Commit

Permalink
Another attempt to fix issue #140
Browse files Browse the repository at this point in the history
  • Loading branch information
IrcDirk committed Jan 8, 2019
1 parent 0b2f967 commit 12f3487
Showing 1 changed file with 47 additions and 9 deletions.
56 changes: 47 additions & 9 deletions NxMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,9 @@ function Nx.Map:InitFrames()
else
t:SetTexture ("Interface\\WorldMap\\"..mapFileName.."\\"..mapFileName..i)
end

t:SetSnapToPixelGrid(false)
t:SetTexelSnappingBias(0)
end
end
end
Expand All @@ -1777,6 +1780,9 @@ function Nx.Map:InitFrames()
local t = tf:CreateTexture()
tf.texture = t
t:SetAllPoints (tf)

t:SetSnapToPixelGrid(false)
t:SetTexelSnappingBias(0)
end

self:InitHotspots()
Expand Down Expand Up @@ -7211,7 +7217,10 @@ function Nx.Map:ClipFrameW (frm, bx, by, w, h, dir)
-- Nx.prt (" T1 "..t1x.." "..t1y)
-- Nx.prt (" T2 "..t2x.." "..t2y)
end


frm.texture:SetSnapToPixelGrid(false)
frm.texture:SetTexelSnappingBias(0)

frm:Show()

return true
Expand Down Expand Up @@ -7295,7 +7304,10 @@ function Nx.Map:ClipFrameWChop (frm, bx, by, w, h)
frm:SetHeight (h)

frm.texture:SetTexCoord (texX1 * .9 + .05, texX2 * .9 + .05, texY1 * .9 + .05, texY2 * .9 + .05)


frm.texture:SetSnapToPixelGrid(false)
frm.texture:SetTexelSnappingBias(0)

frm:Show()

return true
Expand Down Expand Up @@ -7462,7 +7474,10 @@ function Nx.Map:ClipFrameTL (frm, bx, by, w, h)
frm:SetHeight (h)

frm.texture:SetTexCoord (Nx.Util_NanToZero(texX1), Nx.Util_NanToZero(texX2), Nx.Util_NanToZero(texY1), Nx.Util_NanToZero(texY2))


frm.texture:SetSnapToPixelGrid(false)
frm.texture:SetTexelSnappingBias(0)

frm:Show()

return true
Expand Down Expand Up @@ -7551,6 +7566,10 @@ function Nx.Map:ClipFrameMF (frm, bx, by, w, h, dir)
end
end
frm:SetFrameLevel(50)

frm.texture:SetSnapToPixelGrid(false)
frm.texture:SetTexelSnappingBias(0)

frm:Show()

return true, x, y
Expand Down Expand Up @@ -8311,7 +8330,9 @@ function Nx.Map:GetIconWQ (levelAdd)
local t = f:CreateTexture()
f.texture = t
t:SetAllPoints (f)

f.texture:SetSnapToPixelGrid(false)
f.texture:SetTexelSnappingBias(0)

f:SetFlattensRenderLayers(true);

--[[f:RegisterForClicks("LeftButtonUp", "RightButtonUp");
Expand All @@ -8326,25 +8347,35 @@ function Nx.Map:GetIconWQ (levelAdd)
f.Glow:SetPoint("CENTER");
f.Glow:SetTexture("Interface/WorldMap/UI-QuestPoi-IconGlow.tga");
f.Glow:SetBlendMode("ADD");

f.Glow:SetSnapToPixelGrid(false)
f.Glow:SetTexelSnappingBias(0)

f.SelectedGlow = f:CreateTexture(f:GetName().."SelectedGlow", "OVERLAY", 2);
f.SelectedGlow:SetBlendMode("ADD");

f.SelectedGlow:SetSnapToPixelGrid(false)
f.SelectedGlow:SetTexelSnappingBias(0)

f.CriteriaMatchGlow = f:CreateTexture(f:GetName().."CriteriaMatchGlow", "BACKGROUND", -1);
f.CriteriaMatchGlow:SetAlpha(.6);
f.CriteriaMatchGlow:SetBlendMode("ADD");

f.CriteriaMatchGlow:SetSnapToPixelGrid(false)
f.CriteriaMatchGlow:SetTexelSnappingBias(0)

f.SpellTargetGlow = f:CreateTexture(f:GetName().."SpellTargetGlow", "OVERLAY", 1);
f.SpellTargetGlow:SetAtlas("worldquest-questmarker-abilityhighlight", true);
f.SpellTargetGlow:SetAlpha(.6);
f.SpellTargetGlow:SetBlendMode("ADD");
f.SpellTargetGlow:SetPoint("CENTER", 0, 0);

f.SpellTargetGlow:SetSnapToPixelGrid(false)
f.SpellTargetGlow:SetTexelSnappingBias(0)

f.Underlay = f:CreateTexture(f:GetName().."Underlay", "BACKGROUND");
f.Underlay:SetWidth(34);
f.Underlay:SetHeight(34);
f.Underlay:SetPoint("CENTER", 0, -1);

f.Underlay:SetSnapToPixelGrid(false)
f.Underlay:SetTexelSnappingBias(0)

f.TimeLowFrame = CreateFrame("Frame", nil, f);
f.TimeLowFrame:SetSize(22, 22);
f.TimeLowFrame:SetPoint("CENTER", -10, -10);
Expand All @@ -8365,8 +8396,13 @@ function Nx.Map:GetIconWQ (levelAdd)
f.Texture:SetTexture("Interface\\Minimap\\ObjectIconsAtlas");
if f.HighlightTexture then
f.HighlightTexture:SetTexture("Interface\\Minimap\\ObjectIconsAtlas");
f.HighlightTexture:SetSnapToPixelGrid(false)
f.HighlightTexture:SetTexelSnappingBias(0)
end

f.Texture:SetSnapToPixelGrid(false)
f.Texture:SetTexelSnappingBias(0)

--[[f:SetScript ("OnMouseDown", self.IconOnMouseDown)
f:SetScript ("OnMouseUp", self.IconOnMouseUp)]]--
f:SetScript ("OnEnter", function (self)
Expand Down Expand Up @@ -10496,6 +10532,8 @@ function Nx.Map.Dock:MinimapOwnInit()
for k, v in ipairs (reg) do

if v:IsObjectType ("Texture") then
v:SetSnapToPixelGrid(false)
v:SetTexelSnappingBias(0)
local tname = v:GetTexture()
if tname and texnames[tname] then
-- if tname and strfind (tname, "CT") then
Expand Down

0 comments on commit 12f3487

Please sign in to comment.