Originally Posted by Starinnia
You need to explicitly update the frame after a new color value is picked. I.E. make sure you're adjusting the frame in the "Set" handler.
|
Not sure if I understand. The frame is in the same section of code as all code for the MiniMap.
Code:
function Map()
if db.MM.Enable then
Minimap:ClearAllPoints()
Minimap:SetPoint(db.MM.anchor, UIParent, db.MM.anchor,db.MM.offsetX, db.MM.offsetY)
Minimap:SetScale(db.MM.Scale)
Minimap:SetFrameStrata(db.MM.Strata)
local f = CreateFrame("Frame", "MM", Minimap)
f:SetParent(Minimap)
f:SetPoint("BOTTOMLEFT", Minimap, -5, -5)
f:SetPoint("TOPRIGHT", Minimap, 5, 5)
f:SetFrameStrata("BACKGROUND")
f:SetBackdrop{
edgeFile = [=[Interface\DialogFrame\UI-DialogBox-Border]=],
tile = false,
tileSize = 0,
edgeSize = 13,
insets = {left = 4, right = 4, top = 4, bottom = 4}
}
f:SetBackdropBorderColor(db.MM.Color.r, db.MM.Color.g, db.MM.Color.b, db.MM.Color.a)
Minimap:SetBlipTexture[=[Interface\Addons\DreamTweaks\Media\ObjectIconsBigOn]=]
Minimap:SetMaskTexture[=[Interface\ChatFrame\ChatFrameBackground]=]
MinimapZoneTextButton:ClearAllPoints()
MinimapZoneTextButton:SetPoint("TOP", Minimap, 0, 15)
MiniMapTracking:ClearAllPoints()
MiniMapTracking:SetPoint("TOPLEFT", Minimap, 0, 0)
MiniMapTrackingButton:SetAlpha(0)
MiniMapBattlefieldFrame:ClearAllPoints()
MiniMapBattlefieldFrame:SetPoint("BOTTOMLEFT", Minimap, 0, 50)
MiniMapLFGFrame:ClearAllPoints()
MiniMapLFGFrame:SetPoint("BOTTOMLEFT", Minimap, 0, 0)
LFDSearchStatus:ClearAllPoints()
LFDSearchStatus:SetPoint("CENTER", UIParent, 0, 0)
LFDSearchStatus:SetScale(0.9)
MiniMapMailFrame:ClearAllPoints()
MiniMapMailFrame:SetPoint("TOPRIGHT", Minimap, 0, 0)
MiniMapMailIcon:SetTexture[=[Interface\AddOns\DreamTweaks\Media\Mail]=]
if not IsAddOnLoaded("Blizzard_TimeManager") then
LoadAddOn("Blizzard_TimeManager")
end
local clockFrame, clockTime = TimeManagerClockButton:GetRegions()
clockFrame:Hide()
clockTime:Show()
clockTime:SetFont(unpack(db.MM.Font))
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint("BOTTOM", Minimap, 0, 0)
Minimap:EnableMouseWheel(true)
Minimap:SetScript("OnMouseWheel", function(self, d)
if d > 0 then
_G.MinimapZoomIn:Click()
elseif d < 0 then
_G.MinimapZoomOut:Click()
end
end)
Minimap:SetScript('OnMouseUp', function(self, button)
if (button == 'MiddleButton') then
ToggleCalendar()
else
Minimap_OnClick(self)
end
end)
end
if not db.MM.Enable then return end
end