Thread Tools Display Modes
12-22-12, 12:34 PM   #1
xetsog
A Kobold Labourer
 
xetsog's Avatar
Join Date: Jun 2011
Posts: 1
Square Minimap

Hello, was wondering if someone could extract the square minimap from BasicUI for me.

Would really appreciate this.
  Reply With Quote
12-22-12, 02:07 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,909
Try Chinchilla. It does vaious shapes including square.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
12-22-12, 02:33 PM   #3
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
not seeing any dependencies so you should just be able to copy paste the code from the minimap.lua file, seems Cokedrivers used a different file for the border, then again I'm skimming

Lua Code:
  1. local B, C, DB = unpack(select(2, ...)) -- Import:  B - function; C - config; DB - Database
  2.  
  3.  
  4.  
  5. --[[
  6.  
  7.     All Credit for Minimap.lua goes to Neal and ballagarba.
  8.     Neav UI = [url]http://www.wowinterface.com/downloads/info13981-NeavUI.html[/url].
  9.     Edited by Cokedriver.
  10.  
  11. ]]
  12.  
  13. if C['minimap'].enable ~= true then return end
  14.  
  15.     -- Square minimap and create a border
  16.  
  17. Minimap:ClearAllPoints()   
  18.    
  19.     -- Set Minimap to Square
  20. function GetMinimapShape()
  21.     return 'SQUARE'
  22. end
  23.  
  24. -- Set Minimap Position
  25. if C['datatext'].top ~= true then
  26.     Minimap:SetPoint('TOPRIGHT', UIParent, -26, -26)
  27. else
  28.     Minimap:SetPoint('TOPRIGHT', UIParent, -26, -35)
  29. end
  30.  
  31.  
  32.  
  33. -- Create Minimap Border
  34. local Minimapbg = CreateFrame("Frame", nil, Minimap)   
  35. Minimapbg:SetPoint("TOPLEFT", -4, 4);
  36. Minimapbg:SetPoint("BOTTOMRIGHT", 4, -4);  
  37. Minimapbg:SetBackdrop({
  38.     edgeFile = C['minimap'].border,
  39.     edgeSize = 20,
  40. })
  41. if C['general'].classcolor ~= true then
  42.     Minimapbg:SetBackdropBorderColor(C['general'].color.r,C['general'].color.g,C['general'].color.b)
  43. else
  44.     Minimapbg:SetBackdropBorderColor(B.ccolor.r, B.ccolor.g, B.ccolor.b)
  45. end
  46. Minimap:SetMaskTexture('Interface\\ChatFrame\\ChatFrameBackground')
  47.  
  48.     -- A 'new' mail notification
  49.  
  50. MiniMapMailFrame:SetSize(14, 14)
  51. MiniMapMailFrame:ClearAllPoints()
  52. MiniMapMailFrame:SetPoint('BOTTOMRIGHT', Minimap, -4, 5)
  53.  
  54. MiniMapMailBorder:SetTexture(nil)
  55. MiniMapMailIcon:SetTexture(nil)
  56.  
  57. hooksecurefunc(MiniMapMailFrame, 'Show', function()
  58.     MiniMapMailBorder:SetTexture(nil)
  59.     MiniMapMailIcon:SetTexture(nil)
  60. end)
  61.  
  62. MiniMapMailFrame.Text = MiniMapMailFrame:CreateFontString(nil, 'OVERLAY')
  63. MiniMapMailFrame.Text:SetFont(C['media'].font, C['media'].fontLarge, 'OUTLINE')
  64. MiniMapMailFrame.Text:SetPoint('BOTTOMRIGHT', MiniMapMailFrame)
  65. MiniMapMailFrame.Text:SetTextColor(1, 0, 1)
  66. MiniMapMailFrame.Text:SetText('Mail')
  67.  
  68.    -- Modify the lfg frame
  69.  
  70. QueueStatusMinimapButton:ClearAllPoints()
  71. QueueStatusMinimapButton:SetPoint('TOPLEFT', Minimap, 4, -4)
  72. QueueStatusMinimapButton:SetSize(14, 14)
  73. QueueStatusMinimapButton:SetHighlightTexture(nil)
  74.  
  75. QueueStatusMinimapButtonBorder:SetTexture()
  76.  
  77.  
  78.     -- Hide all unwanted things
  79.  
  80. MinimapZoomIn:Hide()
  81. MinimapZoomIn:UnregisterAllEvents()
  82.  
  83. MinimapZoomOut:Hide()
  84. MinimapZoomOut:UnregisterAllEvents()
  85.  
  86. MiniMapWorldMapButton:Hide()
  87. MiniMapWorldMapButton:UnregisterAllEvents()
  88.  
  89. MinimapNorthTag:SetAlpha(0)
  90.  
  91. MinimapBorder:Hide()
  92. MinimapBorderTop:Hide()
  93.  
  94. MinimapZoneText:Hide()
  95.  
  96. MinimapZoneTextButton:Hide()
  97. MinimapZoneTextButton:UnregisterAllEvents()
  98.  
  99.     -- Hide the tracking button
  100.  
  101. MiniMapTracking:UnregisterAllEvents()
  102. MiniMapTracking:Hide()
  103.  
  104.     -- hide the durability frame (the armored man)
  105.  
  106. DurabilityFrame:Hide()
  107. DurabilityFrame:UnregisterAllEvents()
  108.  
  109.     -- Bigger minimap
  110. if C['minimap'].farm == true then
  111.  
  112.     MinimapCluster:SetScale(C['minimap'].farmscale)
  113.     MinimapCluster:EnableMouse(false)
  114. else
  115.     MinimapCluster:SetScale(1.1)
  116.     MinimapCluster:EnableMouse(false)
  117. end
  118.  
  119.  
  120.  
  121.     -- Enable mousewheel zooming
  122.  
  123. Minimap:EnableMouseWheel(true)
  124. Minimap:SetScript('OnMouseWheel', function(self, delta)
  125.     if (delta > 0) then
  126.         _G.MinimapZoomIn:Click()
  127.     elseif delta < 0 then
  128.         _G.MinimapZoomOut:Click()
  129.     end
  130. end)
  131.  
  132.     -- Modify the minimap tracking
  133.  
  134. Minimap:SetScript('OnMouseUp', function(self, button)
  135.     if (button == 'RightButton') then
  136.         ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, self, - (Minimap:GetWidth() * 0.7), -3)
  137.     else
  138.         Minimap_OnClick(self)
  139.     end
  140. end)
  141.  
  142.     -- Skin the ticket status frame
  143.  
  144. TicketStatusFrame:ClearAllPoints()
  145. TicketStatusFrame:SetPoint('BOTTOMRIGHT', UIParent, -25, -33)
  146. TicketStatusFrameButton:HookScript('OnShow', function(self)
  147.     self:SetBackdrop({
  148.         bgFile = C['minimap'].background,
  149.         edgeFile = C['minimap'].border,
  150.         insets = {left = 3, right = 3, top = 3, bottom = 3}
  151.     })
  152. end)
  153.  
  154. local function GetZoneColor()
  155.     local zoneType = GetZonePVPInfo()
  156.     if (zoneType == 'sanctuary') then
  157.         return 0.4, 0.8, 0.94
  158.     elseif (zoneType == 'arena') then
  159.         return 1, 0.1, 0.1
  160.     elseif (zoneType == 'friendly') then
  161.         return 0.1, 1, 0.1
  162.     elseif (zoneType == 'hostile') then
  163.         return 1, 0.1, 0.1
  164.     elseif (zoneType == 'contested') then
  165.         return 1, 0.8, 0
  166.     else
  167.         return 1, 1, 1
  168.     end
  169. end
  170.  
  171.     -- Mouseover zone text
  172.  
  173. if (C['minimap'].zoneText) then
  174.     local MainZone = Minimap:CreateFontString(nil, 'OVERLAY')
  175.     MainZone:SetFont(C['media'].font, C['media'].fontLarge, 'THINOUTLINE')
  176.     MainZone:SetPoint('TOP', Minimap, 0, -22)
  177.     MainZone:SetTextColor(1, 1, 1)
  178.     MainZone:SetAlpha(0)
  179.     MainZone:SetSize(130, 32)
  180.     MainZone:SetJustifyV('BOTTOM')
  181.  
  182.     local SubZone = Minimap:CreateFontString(nil, 'OVERLAY')
  183.     SubZone:SetFont(C['media'].font, C['media'].fontSmall, 'THINOUTLINE')
  184.     SubZone:SetPoint('TOP', MainZone, 'BOTTOM', 0, -1)
  185.     SubZone:SetTextColor(1, 1, 1)
  186.     SubZone:SetAlpha(0)
  187.     SubZone:SetSize(130, 26)
  188.     SubZone:SetJustifyV('TOP')
  189.  
  190.     Minimap:HookScript('OnEnter', function()
  191.         if (not IsShiftKeyDown()) then
  192.             SubZone:SetTextColor(GetZoneColor())
  193.             SubZone:SetText(GetSubZoneText())
  194.             securecall('UIFrameFadeIn', SubZone, 0.15, SubZone:GetAlpha(), 1)
  195.  
  196.             MainZone:SetTextColor(GetZoneColor())
  197.             MainZone:SetText(GetRealZoneText())
  198.             securecall('UIFrameFadeIn', MainZone, 0.15, MainZone:GetAlpha(), 1)
  199.         end
  200.     end)
  201.  
  202.     Minimap:HookScript('OnLeave', function()
  203.         securecall('UIFrameFadeOut', SubZone, 0.15, SubZone:GetAlpha(), 0)
  204.         securecall('UIFrameFadeOut', MainZone, 0.15, MainZone:GetAlpha(), 0)
  205.     end)
  206. end
  207.  
  208. -- Mouseover Instance Difficulty
  209.  
  210. local isGuildGroup = isGuildGroup
  211.  
  212. local function HideDifficultyFrame()
  213.     GuildInstanceDifficulty:EnableMouse(false)
  214.     GuildInstanceDifficulty:SetAlpha(0)
  215.  
  216.     MiniMapInstanceDifficulty:EnableMouse(false)
  217.     MiniMapInstanceDifficulty:SetAlpha(0)
  218. end
  219.  
  220. function GetDifficultyText()
  221.     local inInstance, instancetype = IsInInstance()
  222.     local _, _, difficultyIndex, _, maxPlayers, playerDifficulty, isDynamic = GetInstanceInfo()
  223.  
  224.     local guildStyle
  225.     local heroStyle = '|cffff00ffH|r'
  226.  
  227.     if (isGuildGroup or GuildInstanceDifficulty:IsShown()) then
  228.         guildStyle = '|cffffff00G|r'
  229.     else
  230.         guildStyle = ''
  231.     end
  232.  
  233.     if (inInstance and instancetype == 'raid') then
  234.         if (isDynamic) then
  235.             if (difficultyIndex == 4 or difficultyIndex == 3) then
  236.                 if (playerDifficulty == 0) then
  237.                     return maxPlayers..guildStyle..heroStyle
  238.                 end
  239.             end
  240.  
  241.             if (difficultyIndex == 2) then
  242.                 return maxPlayers..guildStyle
  243.             end
  244.  
  245.             if (difficultyIndex == 1) then
  246.                 if (playerDifficulty == 0) then
  247.                     return maxPlayers..guildStyle
  248.                 end
  249.  
  250.                 if (playerDifficulty == 1) then
  251.                     return maxPlayers..guildStyle..heroStyle
  252.                 end
  253.             end
  254.         end
  255.  
  256.         if (not isDynamic) then
  257.             if (difficultyIndex == 1 or difficultyIndex == 2) then
  258.                 return maxPlayers..guildStyle
  259.             end
  260.  
  261.             if (difficultyIndex == 3 or difficultyIndex == 4) then
  262.                 return maxPlayers..guildStyle..heroStyle
  263.             end
  264.         end
  265.     end
  266.  
  267.     if (inInstance and instancetype == 'party') then
  268.         if (difficultyIndex == 2)then
  269.             return maxPlayers..guildStyle..heroStyle
  270.         elseif (difficultyIndex == 1)then
  271.             return maxPlayers..guildStyle
  272.         end
  273.     end
  274.  
  275.     if (not inInstance) then
  276.         return ''
  277.     end
  278. end
  279.  
  280. local f = Minimap
  281. f.InstanceText = f:CreateFontString(nil, 'OVERLAY')
  282. f.InstanceText:SetFont(C['media'].font, C['media'].fontLarge, 'OUTLINE')
  283. f.InstanceText:SetPoint('TOP', Minimap, 0, -3.5)
  284. f.InstanceText:SetTextColor(1, 1, 1)
  285. f.InstanceText:Show()
  286.  
  287. --[[
  288. MiniMapInstanceDifficulty:UnregisterAllEvents()
  289. MiniMapInstanceDifficulty:Hide()
  290. MiniMapInstanceDifficulty:ClearAllPoints()
  291. MiniMapInstanceDifficulty:SetPoint('TOPLEFT', Minimap, 1, 5)
  292. MiniMapInstanceDifficulty:SetScale(0.9)
  293.  
  294. GuildInstanceDifficulty:UnregisterAllEvents()
  295. GuildInstanceDifficulty:Hide()
  296. GuildInstanceDifficulty:Show()
  297. GuildInstanceDifficulty:ClearAllPoints()
  298. GuildInstanceDifficulty:SetPoint('TOPLEFT', Minimap, 1, 5)
  299. GuildInstanceDifficulty:SetScale(0.9)  
  300. --]]
  301.  
  302. hooksecurefunc(GuildInstanceDifficulty, 'Show', function()
  303.     isGuildGroup = true
  304.     HideDifficultyFrame()
  305. end)
  306.  
  307. hooksecurefunc(GuildInstanceDifficulty, 'Hide', function()
  308.     isGuildGroup = false
  309. end)
  310.  
  311. hooksecurefunc(MiniMapInstanceDifficulty, 'Show', function()
  312.     HideDifficultyFrame()
  313. end)
  314.  
  315. GuildInstanceDifficulty:HookScript('OnEvent', function(self)
  316.     if (self:IsShown()) then
  317.         isGuildGroup = true
  318.     else
  319.         isGuildGroup = false
  320.     end
  321.  
  322.     Minimap.InstanceText:SetText(GetDifficultyText())
  323. end)
  324.  
  325. MiniMapInstanceDifficulty:HookScript('OnEvent', function(self)
  326.     Minimap.InstanceText:SetText(GetDifficultyText())
  327. end)
  328.  
  329. if (C['minimap'].instanceDifficulty) then
  330.     Minimap.InstanceText:SetAlpha(0)
  331.  
  332.     Minimap:HookScript('OnEnter', function(self)
  333.         securecall('UIFrameFadeIn', self.InstanceText, 0.235, 0, 1)
  334.     end)
  335.  
  336.     Minimap:HookScript('OnLeave', function(self)
  337.         securecall('UIFrameFadeOut', self.InstanceText, 0.235, 1, 0)
  338.     end)
  339. end
  340.  
  341. -- Calender
  342. if (not IsAddOnLoaded('Blizzard_TimeManager')) then
  343.     LoadAddOn('Blizzard_TimeManager')
  344. end
  345.  
  346. for i = 1, select('#', GameTimeFrame:GetRegions()) do
  347.     local texture = select(i, GameTimeFrame:GetRegions())
  348.     if (texture and texture:GetObjectType() == 'Texture') then
  349.         texture:SetTexture(nil)
  350.     end
  351. end
  352.  
  353. GameTimeFrame:SetSize(14, 14)
  354. GameTimeFrame:SetHitRectInsets(0, 0, 0, 0)
  355. GameTimeFrame:ClearAllPoints()
  356. GameTimeFrame:SetPoint('TOPRIGHT', Minimap, -3.5, -3.5)
  357.  
  358. GameTimeFrame:GetFontString():SetFont(C['media'].font, C['media'].fontLarge, 'OUTLINE')
  359. GameTimeFrame:GetFontString():SetShadowOffset(0, 0)
  360. GameTimeFrame:GetFontString():SetPoint('TOPRIGHT', GameTimeFrame)
  361.  
  362. for _, texture in pairs({
  363.     GameTimeCalendarEventAlarmTexture,
  364.     GameTimeCalendarInvitesTexture,
  365.     GameTimeCalendarInvitesGlow,
  366.     TimeManagerAlarmFiredTexture,
  367. }) do
  368.     texture:SetTexture(nil)
  369.  
  370.  
  371.     if (texture:IsShown()) then
  372.         GameTimeFrame:GetFontString():SetTextColor(1, 0, 1)
  373.     else
  374.         GameTimeFrame:GetFontString():SetTextColor(B.ccolor.r, B.ccolor.g, B.ccolor.b)
  375.     end
  376.  
  377.     hooksecurefunc(texture, 'Show', function()
  378.         GameTimeFrame:GetFontString():SetTextColor(1, 0, 1)
  379.     end)
  380.  
  381.     hooksecurefunc(texture, 'Hide', function()
  382.         GameTimeFrame:GetFontString():SetTextColor(B.ccolor.r, B.ccolor.g, B.ccolor.b)
  383.     end)
  384. end
  385.  
  386. -- Minimap Clock
  387. TimeManagerClockTicker:SetFont(C['media'].font, C['media'].fontLarge, 'OUTLINE')
  388. TimeManagerClockTicker:SetShadowOffset(0, 0)
  389. TimeManagerClockTicker:SetTextColor(B.ccolor.r, B.ccolor.g, B.ccolor.b)
  390. TimeManagerClockTicker:SetPoint('TOPRIGHT', TimeManagerClockButton, 0, 0)
  391.  
  392. TimeManagerClockButton:GetRegions():Hide()
  393. TimeManagerClockButton:ClearAllPoints()
  394. TimeManagerClockButton:SetWidth(40)
  395. TimeManagerClockButton:SetHeight(18)
  396. TimeManagerClockButton:SetPoint('BOTTOM', Minimap, 0, 2)
  397.  
  398. TimeManagerAlarmFiredTexture:SetTexture(nil)
  399.  
  400. hooksecurefunc(TimeManagerAlarmFiredTexture, 'Show', function()
  401.     TimeManagerClockTicker:SetTextColor(1, 0, 1)
  402. end)
  403.  
  404. hooksecurefunc(TimeManagerAlarmFiredTexture, 'Hide', function()
  405.     TimeManagerClockTicker:SetTextColor(B.ccolor.r, B.ccolor.g, B.ccolor.b)
  406. end)
  407.  
  408. if C['minimap'].gameclock == true then
  409.     TimeManagerClockButton:Show()
  410. else
  411.     TimeManagerClockButton:Hide()
  412. end

Or if you wanna have something extremely simple and have just a square map with default buttons and everything
Lua Code:
  1. MinimapBorderTop:Hide()
  2. MinimapBorder:Hide()
  3. Minimap:SetMaskTexture('Interface\\ChatFrame\\ChatFrameBackground')
__________________
Tweets YouTube Website

Last edited by 10leej : 12-22-12 at 02:55 PM.
  Reply With Quote
12-22-12, 07:39 PM   #4
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
While there are plenty of minimap addons, before I started using Carbonite I used Squeenix. It still works fine, and, basically, all it does is make the minimap square.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!
  Reply With Quote
12-23-12, 12:59 AM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,336
Originally Posted by 10leej View Post
not seeing any dependencies so you should just be able to copy paste the code from the minimap.lua file, seems Cokedrivers used a different file for the border, then again I'm skimming

Code:
local B, C, DB = unpack(select(2, ...)) -- Import:  B - function; C - config; DB - Database
This at the top of the file is a dependency upon values set in another file in the addon. Copying the entire code will cause problems since the local variables B, C, and DB will all be nil or contain unexpected values.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-24-12, 12:05 AM   #6
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by SDPhantom View Post
This at the top of the file is a dependency upon values set in another file in the addon. Copying the entire code will cause problems since the local variables B, C, and DB will all be nil or contain unexpected values.
0.0 your right I should stop skimming
__________________
Tweets YouTube Website
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Square Minimap


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