lanevegame said: Also I was thinking about lowering the alpha instead of hiding it completelly, and I've found some functions for that. Click to expand...

Code: f.txt = buttonFrame:CreateFontString(nil, 'OVERLAY') f.txt:SetFont(STANDARD_TEXT_FONT, 12, 'OUTLINE') f.txt:SetTextColor(1, 1, 1) --or whatever, I think standard "Blizzard yellow" is (1, .82, 0) f.txt:SetText("Report EFC") --or smth like that

Code: f:SetScript('OnDragStart', function() this:StartMoving() end) f:SetScript('OnDragStop', function() this:StopMovingOrSizing() end)

Code: local function myHandler() local myZone, _, _, _, _ = GetMapInfo(); if (myZone and myZone=="WarsongGulch") then myAddonShouldBeEnabled = true else myAddonShouldBeEnabled = false end end

That's the "correct" way to ago about it, actually, because then the mouse will still register for sure. By the way, you don't want to make the actual bg-map clickable. Make a transparent frame on top of it isntead. Here's what I think you should do:Make a small frame that will function like a button (you can make an actual button but they are somewhat unsightly), call itfor now, and give it background colour smth like (0,0,0,0.2) or smth like that. Then make a stringAnchor the button next to the BGMap text perhaps? Or make it freely movable with something likeIn this case, make the size of f wider than the width of the text. Then either set the show/hide script to f.txt or make another frame of same height that covers only the width of the text and anchor it to f, or make it a child, (so that you can still click on a part of f without clicking on the new frame so that dragging will move them both)Then when clicking f.txt (or the frame that covers it), make the main frame with your clickable buttons appear/disappear on top of the minimap or some location with respect to the location of the frame f. In fact, were I you, I would make another button (or checkbox) just like this that will switch between anchoring to BGmap and being freeky movable. Not everyone wants this on their BGMap. In the anchored mode, you arrange the blocks on top of the BGMap ones, and in the free mode you can make them all same size into two rows under the button or smth like that. You should also f:RegisterEvent("PLAYER_ENTERING_WORLD") and f:SetScript("OnEvent", myHandler) whereand begin your main chunk of code with an if myAddonShouldBeEnabled then... Happy coding.