WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MozzFullWorldMap: Technical Support (https://www.wowinterface.com/forums/forumdisplay.php?f=132)
-   -   Dynamic Updating (https://www.wowinterface.com/forums/showthread.php?t=36235)

RVCA18 10-25-10 02:09 PM

Dynamic Updating
 
Hi spiel2001,

I reworked some of the code to allow the map to be updated on the fly while you are in rainbow mode or as soon as you have entered one of the other slash commands.

This works out well when using the map in mini-mode.

The changes are below in red:

Code:

function worldMapFrame_UpdateOverlays(dtlFrame, ovrLay, scalingFactor, oAlpha)
    ...
    if(MozzFullWorldMap.colorStyle == 0) then
        texture:SetVertexColor(0.2,0.6,1.0) -- EMERALD
        MozzFullWorldMap.colorArray = {r=0.2,g=0.6,b=1.0}
    ...
end

Code:

function MozzFullWorldMap_Command(msg)
    ...
    WorldMapFrame_Update()
end

Code:

function MFWM_SetUpColourPicker()
    local col = MozzFullWorldMap.colorArray;
    ColorPickerFrame.hasOpacity = true;
    ColorPickerFrame.opacity = 1 - MozzFullWorldMap.transparency;
    ColorPickerFrame.func = MFWM_AcceptColour;
    ColorPickerFrame.opacityFunc = MFWM_AcceptColour;
    ColorPickerFrame.cancelFunc = MFWM_CancelColourPicker;
    -- if statement removed
    ColorPickerFrame.previousValues = { col.r, col.g, col.b, MozzFullWorldMap.transparency };
    ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG");
    ColorPickerFrame:SetColorRGB( col.r, col.g, col.b );
    OpacitySliderFrame:SetValue(ColorPickerFrame.opacity);
    ColorPickerFrame:Show();
end

Code:

function MFWM_AcceptColour()
    ...
    WorldMapFrame_Update()
end

Code:

function MFWM_CancelColourPicker(col)
    MozzFullWorldMap.transparency = tonumber(col[4]);
    -- if statement removed
    MozzFullWorldMap.colorArray = {};
    MozzFullWorldMap.colorArray.r = col[1];
    MozzFullWorldMap.colorArray.g = col[2];
    MozzFullWorldMap.colorArray.b = col[3];

    MozzFullWorldMap.colorStyle = 2;
    WorldMapFrame_Update()
end

Let me know if you have an issues trying this out, you may have to delete the saved variable file.

ps, I was wondering if you had a repository, maybe I could submit my file.

RVCA18 10-30-10 10:49 PM

MozzFullWorldMap taint.log
 
Hello again,

I just thought I'd post what the taint.log caught from MozzFullWorldMap.

This causes the "Interface action failed because of an AddOn"

taint.log:
10/30 17:55:29.045 An action was blocked in combat because of taint from MozzFullWorldMap - WorldMapBlobFrame:Hide()
10/30 17:55:29.045 Interface\FrameXML\WorldMapFrame.lua:1630 WorldMapFrame_DisplayQuests()
10/30 17:55:29.045 Interface\FrameXML\WorldMapFrame.lua:1686 WorldMapFrame_UpdateMap()
10/30 17:55:29.045 Interface\FrameXML\WorldMapFrame.lua:190
10/30 17:57:12.073 An action was blocked in combat because of taint from MozzFullWorldMap - WorldMapBlobFrame:Hide()
10/30 17:57:12.073 Interface\FrameXML\WorldMapFrame.lua:1630 WorldMapFrame_DisplayQuests()
10/30 17:57:12.073 Interface\FrameXML\WorldMapFrame.lua:1686 WorldMapFrame_UpdateMap()
10/30 17:57:12.073 Interface\FrameXML\WorldMapFrame.lua:190
10/30 17:57:12.073 SetMapToCurrentZone()
10/30 17:57:12.073 Interface\FrameXML\WorldMapFrame.lua:157
10/30 17:57:12.073 WorldMapFrame:Show()
10/30 17:57:12.073 Interface\FrameXML\UIParent.lua:1467 <unnamed>:SetUIPanel()
10/30 17:57:12.073 Interface\FrameXML\UIParent.lua:1288 <unnamed>:ShowUIPanel()
10/30 17:57:12.073 Interface\FrameXML\UIParent.lua:1198
10/30 17:57:12.073 <unnamed>:SetAttribute()
10/30 17:57:12.073 Interface\FrameXML\UIParent.lua:1873 ShowUIPanel()
10/30 17:57:12.073 Interface\FrameXML\UIParent.lua:1857 ToggleFrame()
10/30 17:57:12.073 TOGGLEWORLDMAP:1

spiel2001 10-31-10 08:42 AM

Yeah... this problem has been around as long as I can remember... since long before I took over the addon. I have yet to have found a working solution to it, as was the case for the prior author.


All times are GMT -6. The time now is 10:28 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI