Files
ShagaTweaks/mods/minimap-square.lua
T
shagu 6c26bc6190 core: don't rely on sane global environment
some addons like to provide a broken _G variable to
the global environment breaking every other addon that
relies on it if existing. With this commit, make ShaguTweaks
no longer re-use the global _G, even if existing.
2022-11-19 16:59:12 +01:00

31 lines
1.1 KiB
Lua

local _G = ShaguTweaks.GetGlobalEnv()
local module = ShaguTweaks:register({
title = "MiniMap Square",
description = "Draw the mini map in a squared shape instead of a round one.",
expansions = { ["vanilla"] = true, ["tbc"] = true },
category = "World & MiniMap",
enabled = nil,
})
Minimap:SetMaskTexture("Textures\\MinimapMask")
module.enable = function(self)
MinimapBorder:SetTexture(nil)
Minimap:SetPoint("CENTER", MinimapCluster, "TOP", 9, -98)
Minimap:SetMaskTexture("Interface\\BUTTONS\\WHITE8X8")
Minimap.border = CreateFrame("Frame", nil, Minimap)
Minimap.border:SetFrameStrata("BACKGROUND")
Minimap.border:SetFrameLevel(1)
Minimap.border:SetPoint("TOPLEFT", Minimap, "TOPLEFT", -3, 3)
Minimap.border:SetPoint("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", 3, -3)
Minimap.border:SetBackdrop({
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 8, edgeSize = 16,
insets = { left = 3, right = 3, top = 3, bottom = 3 }})
Minimap.border:SetBackdropBorderColor(.9,.8,.5,1)
Minimap.border:SetBackdropColor(.4,.4,.4,1)
end