Quantcast
Minimap Scroll not working after 4.0.1 - WoWInterface
Thread Tools Display Modes
10-27-10, 07:00 AM   #1
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Minimap Scroll not working after 4.0.1

This worked fine before, now it does not.
I know that I have to replace arg1 with something, but I really do not know what? Can anyone point me in the right direction here?

Code:
----------------------------------
-- Zoom
----------------------------------
Minimap:EnableMouseWheel(true)
Minimap:SetScript('OnMouseWheel', function()
    if (arg1 > 0) then
        Minimap_ZoomIn()
    else
        Minimap_ZoomOut()
    end
end)
__________________

  Reply With Quote
10-27-10, 07:03 AM   #2
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
Read How to Deal With Loss of "this", "event", "arg#"
and wowwiki.com/UIHANDLER_OnMouseWheel or wowprogramming.com/docs/scripts/OnMouseWheel


Code:
----------------------------------
-- Zoom
----------------------------------
Minimap:EnableMouseWheel(true)
Minimap:SetScript('OnMouseWheel', function(self, direction)
    if (direction > 0) then
        Minimap_ZoomIn()
    else
        Minimap_ZoomOut()
    end
end)
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.

Last edited by v6o : 10-27-10 at 07:09 AM. Reason: better link names
  Reply With Quote
10-27-10, 07:11 AM   #3
Nuggs
A Deviate Faerie Dragon
 
Nuggs's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 19
This is what I do. No clue why I use MinimapZoomIn/Out:Click but it works.

Code:
Minimap:SetScript("OnMouseWheel", function(self, delta)
	if (delta == 1) then
		_G.MinimapZoomIn:Click()
	else
		_G.MinimapZoomOut:Click()
	end
end)
As for the argX changes and other information with a few examples, you can check out this thread:

http://forums.worldofwarcraft.com/th...26580975&sid=1

And I was beat.
  Reply With Quote
10-27-10, 07:12 AM   #4
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Oh I see, I have to name the arg1 manually now.

Thanks man.
__________________

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Minimap Scroll not working after 4.0.1

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off