1. #1

    LF Help making my Minimap's border 1 px thick.

    This is what I am using ATM.
    It is a combination of things I have found from websites and gotten help with.
    I am looking to change my border to a 1 px thick border though.

    Any help is greatly appreciated!

    Thank you!



    Code:
    MinimapCluster:ClearAllPoints()
    MinimapCluster:SetPoint("TOPRIGHT",UIParent,"TOPRIGHT", 5, 10)
    MinimapCluster.SetPoint = function() end
    
    -- Clean up the minimap
    MinimapCluster:SetScale(1.2)
    Minimap:SetMaskTexture('Interface\\Buttons\\WHITE8x8')
    MinimapBorder:SetTexture("Interface\\Textures\\UI-MINIMAP-BORDER.blp")
    MinimapNorthTag:SetAlpha(0)
    MinimapBorderTop:Hide()
    MinimapZoneTextButton:Hide()
    MiniMapWorldMapButton:Hide()
    
    
    --[[ Random Group icon ]]
    QueueStatusMinimapButton:ClearAllPoints()
    QueueStatusMinimapButton:SetParent(Minimap)
    QueueStatusMinimapButton:SetPoint('BOTTOMLEFT', 0, 0)
    QueueStatusMinimapButton:SetHighlightTexture(nil)
    
    
    -- Calendar button
    GameTimeFrame:ClearAllPoints()
    GameTimeFrame:SetPoint("BOTTOMRIGHT", Minimap, -2, 0)
    GameTimeFrame:SetScale(0.8)
    
    
    -- Zoom buttons
    MinimapZoomIn:Hide()
    MinimapZoomOut:Hide()
    
    
    -- Tracking button
    MiniMapTracking:ClearAllPoints()
    MiniMapTracking:SetPoint("TOPLEFT", Minimap, -4, 2)
    select(1, MiniMapTracking:GetRegions()):SetTexture(nil)
    select(1, MiniMapTrackingButton:GetRegions()):SetTexture(nil)
    
    
    --Mail icon
    MiniMapMailIcon:SetTexture("Interface\\Textures\\Minimap-Mail-Icon.blp")
    MiniMapMailFrame:ClearAllPoints()
    MiniMapMailFrame:SetPoint("TOPLEFT", Minimap, -3, -20)
    MiniMapMailBorder:Hide()
    
    
    -- Clock
    local minimapClock = CreateFrame("Frame")
    local function fixMinimapClock(minimapClock, event, addon)
    	if addon == "Blizzard_TimeManager" then
    		select(1, TimeManagerClockButton:GetRegions()):SetTexture(nil)
    		TimeManagerClockButton:ClearAllPoints()
    		TimeManagerClockButton:SetPoint("TOPRIGHT", 5, 0)
    		TimeManagerClockTicker:SetFont("Fonts\\MORPHEUS.TTF", 12, "OUTLINE")
    	end
    end
    minimapClock:RegisterEvent("ADDON_LOADED")
    minimapClock:SetScript("OnEvent", fixMinimapClock)
    
    
    -- Allows mousewheel scrolling to zoom in and out
    Minimap:EnableMouseWheel(true)
    Minimap:SetScript('OnMouseWheel', function(self, delta)
    	if delta > 0 then
    		Minimap_ZoomIn()
    	else
    		Minimap_ZoomOut() 
    	end
    end)

  2. #2
    Field Marshal Kalandrios's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    United States of America
    Posts
    70
    Code:
    			
    local blanktex = "Interface\\Buttons\\WHITE8x8"
    local insetsize = 1 -- This is so you can perform arithmetic on the border size to configure the inset size.
    Minimap:SetBackdrop{
        edgeFile = blanktex,
        edgeSize = 1,
        insets = { -- These may not be adequate, hard to say with pixel smudging.
            left = insetsize,
            right = insetsize,
            top = insetsize,
            bottom = insetsize,
        },
    }
    Minimap:SetBackdropBorderColor(0, 0, 0, 1)

    So what is going on here is that you are setting a backdrop for the minimap, and leaving the background empty, but drawing a 1px border around the outside.

    EDIT: I realized that the edge file's path variable was not defined, added to prevent any confusion.
    Last edited by Kalandrios; 2012-10-10 at 02:23 PM.
    Gladiator Clamsodad the Celestial Defender
    Gladiator Zerstiren, Hand of A'dal

  3. #3
    Deleted
    Note regarding your in-line comment: Performing arithmetic on the 'insetsize' upvalue will obviously only influence actual layout if done before the :SetBackdrop call. Just to prevent any misconceptions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •