vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --[[ CornerMinimap ]] |
2 | |||
3 | CornerMinimap = { |
||
4 | version = 1.0 |
||
5 | } |
||
6 | |||
7 | function CornerMinimap.OnLoad() |
||
8 | this:RegisterEvent("PLAYER_ENTERING_WORLD") |
||
9 | end |
||
10 | |||
11 | function CornerMinimap.OnEvent() |
||
12 | CornerMinimap.CornerTheMap() |
||
13 | end |
||
14 | |||
15 | function CornerMinimap.CornerTheMap() |
||
16 | -- moves the minimap |
||
17 | --MinimapCluster:SetPoint("TOPRIGHT","UIParent","TOPRIGHT",15,2) |
||
18 | -- nudges the zone text to center |
||
19 | MinimapZoneText:SetPoint("TOP","MinimapZoneTextButton","TOP",9,1) |
||
20 | |||
21 | -- makes clicking the zone text the "X" (toggle minimap) |
||
22 | MinimapZoneTextButton:SetScript("OnClick",ToggleMinimap) |
||
23 | -- sets the corner border texture |
||
24 | MinimapBorder:SetTexture("Interface\\AddOns\\CornerMinimap\\CornerMinimapBorder") |
||
25 | -- sets the corner title texture |
||
26 | MinimapBorderTop:SetTexture("Interface\\AddOns\\CornerMinimap\\CornerMinimapBorder") |
||
27 | -- sets the corner mask |
||
28 | Minimap:SetMaskTexture("Interface\\AddOns\\CornerMinimap\\CornerMinimapMask") |
||
29 | -- moves the tracking icon |
||
30 | MiniMapTrackingFrame:SetPoint("TOPLEFT","Minimap","TOPLEFT",0,-2) |
||
31 | MiniMapTrackingFrame:SetScale(.75) |
||
32 | end |
||
33 | |||
34 | function MiniMap_OnMouseWheel(value) |
||
35 | if ( value > 0 ) then Minimap_ZoomIn() |
||
36 | elseif ( value < 0 ) then Minimap_ZoomOut() |
||
37 | end |
||
38 | end |
||
39 | |||
40 | function Minimap_ZoomIn() |
||
41 | if Minimap:GetZoom() == 5 then |
||
42 | Minimap:SetZoom(5); |
||
43 | else |
||
44 | Minimap:SetZoom(Minimap:GetZoom() + 1); |
||
45 | end |
||
46 | end |
||
47 | |||
48 | function Minimap_ZoomOut() |
||
49 | if Minimap:GetZoom() == 0 then |
||
50 | Minimap:SetZoom(0); |
||
51 | else |
||
52 | Minimap:SetZoom(Minimap:GetZoom() - 1); |
||
53 | end |
||
54 | end |