Advertisement
Guest User

iMinimap.lua

a guest
Oct 31st, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.13 KB | None | 0 0
  1. -- little config
  2. local scale = 0.8
  3. local position = "TOPRIGHT"
  4. local position_x = -14
  5. local position_y = -10
  6.  
  7. local quest_pos_1 = "TOPRIGHT" -- Anchor 1
  8. local quest_pos_2 = "TOPRIGHT" -- and 2
  9. local quest_anchorframe = "UIParent"
  10. local quest_pos_x = -50
  11. local quest_pos_y = -250
  12. -- config end
  13.  
  14. local m = Minimap
  15. local mc = MinimapCluster
  16. m:SetMaskTexture("Interface\\Addons\\iMinimap\\media\\mask")
  17.  
  18. m:EnableMouseWheel()
  19. m:SetScript("OnMouseWheel", function(self, direction)
  20. if(direction > 0) then
  21. Minimap_ZoomIn()
  22. else
  23. Minimap_ZoomOut()
  24. end
  25. end)
  26.  
  27. --Questtracker
  28. ObjectiveTrackerFrame:ClearAllPoints()
  29. ObjectiveTrackerFrame:SetPoint(quest_pos_1, quest_anchorframe, quest_pos_2, quest_pos_x, quest_pos_y)
  30. ObjectiveTrackerFrame:SetHeight(600)
  31. ObjectiveTrackerFrame.ClearAllPoints = function() end
  32. ObjectiveTrackerFrame.SetPoint = function() end
  33. ObjectiveTrackerFrame.SetAllPoints = function() end
  34.  
  35. -- hide some stuff
  36. local stuff = {
  37. "MinimapBorder",
  38. "MinimapBorderTop",
  39. "MinimapNorthTag",
  40. "MiniMapWorldMapButton",
  41. "MinimapZoneTextButton",
  42. "MinimapZoomIn",
  43. "MinimapZoomOut",
  44. }
  45. for i,v in pairs(stuff) do
  46. getglobal(v).Show = function() end
  47. getglobal(v):Hide()
  48. end
  49.  
  50. -- Position & Scaling
  51. m:SetScale(scale)
  52. m:SetFrameStrata("MEDIUM")
  53. m:ClearAllPoints()
  54. m:SetPoint(position, UIParent, position_x, position_y)
  55. mc:ClearAllPoints()
  56. mc:SetAllPoints(m)
  57.  
  58. -- Slahscommand for calendar
  59. SlashCmdList["CALENDAR"] = function()
  60. ToggleCalendar()
  61. end
  62. SLASH_CALENDAR1 = "/cl"
  63. SLASH_CALENDAR2 = "/calendar"
  64.  
  65. -- Slahscommand for hiding
  66. SlashCmdList["HIDEMINIMAP"] = function()
  67. if m:IsShown() == 1 then
  68. m:Hide()
  69. ChatFrame1:AddMessage("Minimap is now |cffff0000hidden|r!")
  70. else
  71. m:Show()
  72. ChatFrame1:AddMessage("Minimap is now |cff00ff00shown|r!")
  73. end
  74. end
  75. SLASH_HIDEMINIMAP1 = "/mm"
  76. SLASH_HIDEMINIMAP2 = "/mmhide"
  77.  
  78. -- Icons
  79. local mt = MiniMapTracking
  80. mt:ClearAllPoints()
  81. mt:SetPoint("TOPLEFT", m, 2, -4)
  82. mt:SetScale(.7)
  83. MiniMapTrackingBackground:Hide()
  84. MiniMapTrackingButtonBorder:Hide()
  85. MiniMapTrackingButton:SetHighlightTexture("")
  86. MiniMapTrackingIcon:SetTexCoord(0.07, 0.93, 0.07, 0.93)
  87.  
  88. local mb = MiniMapBattlefieldFrame
  89. mb:ClearAllPoints()
  90. mb:SetPoint("TOPRIGHT", m, -28, -3)
  91. mb:SetScale(.9)
  92. MiniMapBattlefieldBorder:Hide()
  93.  
  94. local ml = MiniMapLFGFrame
  95. ml:ClearAllPoints()
  96. ml:SetParent(Minimap)
  97. ml:SetPoint("TOPRIGHT", m, -30, -1)
  98. ml:SetScale(.9)
  99. MiniMapLFGFrameBorder:Hide()
  100.  
  101. local mm = MiniMapMailFrame
  102. mm:ClearAllPoints()
  103. mm:SetPoint("TOPLEFT", m, 27, 0)
  104. MiniMapMailBorder:Hide()
  105. MiniMapMailIcon:SetTexture("Interface\\AddOns\\iMinimap\\media\\mail")
  106.  
  107. GameTimeFrame:SetWidth(19) -- Took this from Maneut's Version of nMinimap
  108. GameTimeFrame:SetHeight(19)
  109. GameTimeFrame:ClearAllPoints()
  110. GameTimeFrame:SetPoint("TOPRIGHT", Minimap, -6, -4)
  111. GameTimeFrame:SetHitRectInsets(0, 0, 0, 0)
  112. GameTimeFrame:GetRegions():Hide()
  113.  
  114. local color = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
  115. local text = select(5, GameTimeFrame:GetRegions())
  116. text:SetFont("Fonts\\ARIALN.ttf", 15, "THINOUTLINE")
  117. text:SetTextColor(color.r, color.g, color.b)
  118. text:SetShadowOffset(0, 0)
  119.  
  120. LoadAddOn('Blizzard_TimeManager')
  121. TimeManagerClockButton:Hide()
  122.  
  123. for i = 6, 8 do
  124. select(i, GameTimeFrame:GetRegions()):SetTexture(nil)
  125. end
  126.  
  127. TimeManagerClockButton:Hide()
  128.  
  129. local pos = 1
  130. local scale = 1
  131. local frame = m
  132. local color = {r = 0, g = 0, b = 0}
  133. local tex = "Interface\\ChatFrame\\ChatFrameBackground"
  134.  
  135. local TopLeft = frame:CreateTexture(nil, "BORDER")
  136. TopLeft:SetTexture(tex)
  137. TopLeft:SetTexCoord(0, 1/3, 0, 1/3)
  138. TopLeft:SetPoint("TOPLEFT", frame, -pos, pos)
  139. TopLeft:SetWidth(scale) TopLeft:SetHeight(scale)
  140. TopLeft:SetVertexColor(color.r,color.g,color.b)
  141. TopLeft:SetDrawLayer("BORDER")
  142.  
  143. local TopRight = frame:CreateTexture(nil, "BORDER")
  144. TopRight:SetTexture(tex)
  145. TopRight:SetTexCoord(2/3, 1, 0, 1/3)
  146. TopRight:SetPoint("TOPRIGHT", frame, pos, pos)
  147. TopRight:SetWidth(scale) TopRight:SetHeight(scale)
  148. TopRight:SetVertexColor(color.r,color.g,color.b)
  149. TopRight:SetDrawLayer("BORDER")
  150.  
  151. local BottomLeft = frame:CreateTexture(nil, "BORDER")
  152. BottomLeft:SetTexture(tex)
  153. BottomLeft:SetTexCoord(0, 1/3, 2/3, 1)
  154. BottomLeft:SetPoint("BOTTOMLEFT", frame, -pos, -pos)
  155. BottomLeft:SetWidth(scale) BottomLeft:SetHeight(scale)
  156. BottomLeft:SetVertexColor(color.r,color.g,color.b)
  157. BottomLeft:SetDrawLayer("BORDER")
  158.  
  159. local BottomRight = frame:CreateTexture(nil, "BORDER")
  160. BottomRight:SetTexture(tex)
  161. BottomRight:SetTexCoord(2/3, 1, 2/3, 1)
  162. BottomRight:SetPoint("BOTTOMRIGHT", frame, pos, -pos)
  163. BottomRight:SetWidth(scale) BottomRight:SetHeight(scale)
  164. BottomRight:SetVertexColor(color.r,color.g,color.b)
  165. BottomRight:SetDrawLayer("BORDER")
  166.  
  167. local TopEdge = frame:CreateTexture(nil, "BORDER")
  168. TopEdge:SetTexture(tex)
  169. TopEdge:SetTexCoord(1/3, 2/3, 0, 1/3)
  170. TopEdge:SetPoint("TOPLEFT", TopLeft, "TOPRIGHT")
  171. TopEdge:SetPoint("TOPRIGHT", TopRight, "TOPLEFT")
  172. TopEdge:SetHeight(scale)
  173. TopEdge:SetVertexColor(color.r,color.g,color.b)
  174. TopEdge:SetDrawLayer("BORDER")
  175.  
  176. local BottomEdge = frame:CreateTexture(nil, "BORDER")
  177. BottomEdge:SetTexture(tex)
  178. BottomEdge:SetTexCoord(1/3, 2/3, 2/3, 1)
  179. BottomEdge:SetPoint("BOTTOMLEFT", BottomLeft, "BOTTOMRIGHT")
  180. BottomEdge:SetPoint("BOTTOMRIGHT", BottomRight, "BOTTOMLEFT")
  181. BottomEdge:SetHeight(scale)
  182. BottomEdge:SetVertexColor(color.r,color.g,color.b)
  183. BottomEdge:SetDrawLayer("BORDER")
  184.  
  185. local LeftEdge = frame:CreateTexture(nil, "BORDER")
  186. LeftEdge:SetTexture(tex)
  187. LeftEdge:SetTexCoord(0, 1/3, 1/3, 2/3)
  188. LeftEdge:SetPoint("TOPLEFT", TopLeft, "BOTTOMLEFT")
  189. LeftEdge:SetPoint("BOTTOMLEFT", BottomLeft, "TOPLEFT")
  190. LeftEdge:SetWidth(scale)
  191. LeftEdge:SetVertexColor(color.r,color.g,color.b)
  192. LeftEdge:SetDrawLayer("BORDER")
  193.  
  194. local RightEdge = frame:CreateTexture(nil, "BORDER")
  195. RightEdge:SetTexture(tex)
  196. RightEdge:SetTexCoord(2/3, 1, 1/3, 2/3)
  197. RightEdge:SetPoint("TOPRIGHT", TopRight, "BOTTOMRIGHT")
  198. RightEdge:SetPoint("BOTTOMRIGHT", BottomRight, "TOPRIGHT")
  199. RightEdge:SetWidth(scale)
  200. RightEdge:SetVertexColor(color.r,color.g,color.b)
  201. RightEdge:SetDrawLayer("BORDER")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement