Skip to content

Commit 806a424

Browse files
committed
Cleaned up code some more and removed old logic that wont be used
1 parent de93d36 commit 806a424

File tree

1 file changed

+0
-81
lines changed

1 file changed

+0
-81
lines changed

Main.lua

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -12,63 +12,6 @@ UI Layers
1212

1313
local height = 32
1414

15-
local x = 0
16-
local y = 0
17-
18-
function OnClickXYPos()
19-
if not UnitExists('target') then
20-
print('You have no target to send location information for')
21-
return
22-
end
23-
if UnitIsPlayer('target') then
24-
SendChatMessage('I am at location [' .. round(x * 100, 2) .. ', '.. round(y * 100, 2) ..']', 'WHISPER', nil, UnitName('target'));
25-
SetRaidTarget('target', 4);
26-
else
27-
local index = GetChannelName("General")
28-
SendChatMessage('%t is at location [' .. round(x * 100, 2) .. ', '.. round(y * 100, 2) ..']', 'CHANNEL', nil, index);
29-
SetRaidTarget('target', 8);
30-
end
31-
end
32-
33-
local frmMain = CreateFrame('Button','XYPos',UIParent)
34-
frmMain:RegisterForClicks('AnyUp')
35-
frmMain:SetScript('OnClick', OnClickXYPos)
36-
frmMain:SetSize(170, height)
37-
frmMain:SetPoint('TOP')
38-
--frmMain:Show()
39-
local backdrop = CreateFrame("Frame", "Backdrop", frmMain, "BackdropTemplate")
40-
backdrop:SetAllPoints()
41-
backdrop.backdropInfo = {
42-
bgFile = "Interface/Tooltips/UI-Tooltip-Background",-- String - Which texture file to use as frame background (.blp or .tga format)
43-
edgeFile = "Interface/Tooltips/UI-Tooltip-Border", -- String- Which texture file to use as frame edge blp or .tga format)
44-
tile = true, -- Boolean - whether background texture is tiled or streched
45-
tileEdge = true, -- Boolean - whether edge texture is tiled or streched
46-
tileSize = 16, -- Number - Control how large each copy of the bgFile becomes on-screen
47-
edgeSize = 16, -- Number - Control how large each copy of the edgeFile becomes on-screen (i.e. border thickness and corner size)
48-
insets = { left = 4, right = 4, top = 4, bottom = 4, },
49-
}
50-
--backdrop:ApplyBackdrop()
51-
---backdrop:SetBackdropColor(0, 0, 1, 0.3)
52-
53-
local xyPos = backdrop:CreateFontString(frmMain, 'OVERLAY', 'GameTooltipText')
54-
xyPos:SetTextColor(1, 1, 1, 1)
55-
xyPos:SetPoint('CENTER',0,0)
56-
57-
local function round(number, precision)
58-
local fmtStr = string.format('%%0.%sf',precision)
59-
number = string.format(fmtStr,number)
60-
return number
61-
end
62-
63-
local function updatePos()
64-
local map = C_Map.GetBestMapForUnit('player')
65-
local position = C_Map.GetPlayerMapPosition(map, 'player')
66-
x, y = position:GetXY()
67-
xyPos:SetText('Location [' .. round(x * 100, 2) .. ', '.. round(y * 100, 2) ..']')
68-
end
69-
70-
--C_Timer.NewTicker(0.1, updatePos)
71-
7215
local parent = CreateFrame('Frame','Mine',UIParent)
7316
parent:SetPoint('TOPRIGHT', MinimapCluster, 'TOPLEFT', 25, 0)
7417
parent:RegisterEvent('ADDON_LOADED')
@@ -79,33 +22,9 @@ parent.t:SetMask('Interface\\Buttons\\buttonhilight-Square')
7922
parent.t:SetAllPoints(parent)
8023
parent:Show()
8124

82-
--local frmMain = CreateFrame('Frame','zzz',UIParent)
83-
--frmMain:SetSize(150, 150)
84-
--frmMain.t = frmMain:CreateTexture()
85-
--frmMain:SetPoint('CENTER', 100, 100)
86-
--frmMain.t:SetTexture('Interface\\DialogFrame\\ui-dialogbox-gold-background.blp')
87-
--frmMain.t:SetMask('interface/buttons/ui-autocastableoverlay.blp')
88-
--frmMain.t:SetAllPoints(frmMain)
89-
--frmMain:Show()
90-
91-
-- Credits: https://git.tukui.org/Azilroka/ProjectAzilroka/-/blob/f13975c053ecbd8f78a4942166947b0902a2606f/Modules/SquareMinimapButtons.lua
92-
--local function SkinMinimapButton()
93-
-- MiniMapTrackingIcon:ClearAllPoints()
94-
-- MiniMapTrackingIcon:SetPoint('CENTER')
95-
-- MiniMapTrackingBackground:SetAlpha(0)
96-
-- MiniMapTrackingIconOverlay:SetAlpha(0)
97-
-- MiniMapTrackingButton:SetAlpha(0)
98-
--end
99-
10025
local movedButtonNames = {}
10126
local movedButtons = {}
10227

103-
local function printParentChildName(button, width, height)
104-
local parentName = button:GetParent():GetName()
105-
local childName = button:GetName()
106-
print(parentName .. '-->' .. childName .. '[' .. width .. ',' .. height .. ']')
107-
end
108-
10928
local function addButton(button)
11029
if button:GetName() == nil then return end
11130
if button:GetParent():GetName() == 'Mine' then return end

0 commit comments

Comments
 (0)