View Single Post
07-25-12, 03:32 PM   #3
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 89
I know changing the scale on the fly works. This does scale up POI icons and other things which can look pretty bad at a very large scale though. I use the following extremely rudimentary code in my own UI which simply scales it straight up to 2x, 3x, etc. size for help when herbing or mining by using Alt+Mousewheel.

Lua Code:
  1. local function onMouseWheel(self, dir)
  2.     if IsAltKeyDown() then
  3.         if (dir < 0) then
  4.             local newscale = Minimap:GetScale() - 1
  5.             if (newscale < 1.5) then
  6.                 newscale = 1
  7.             end
  8.             Minimap:SetScale(newscale)
  9.         else
  10.             local newscale = Minimap:GetScale() + 1
  11.             Minimap:SetScale(newscale)
  12.         end
  13.     else
  14.         if (dir > 0) then
  15.             MinimapZoomIn:Click()
  16.         else
  17.             MinimapZoomOut:Click()
  18.         end
  19.     end
  20. end
  21.  
  22. --
  23.  
  24. Minimap:EnableMouseWheel()
  25. Minimap:SetScript('OnMouseWheel', onMouseWheel)

Obviously if you wanted it to have smooth transitions or draggable handles or smaller step sizes you'd need to do some more work there.
  Reply With Quote