-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathadvancedAngling.lua
More file actions
84 lines (76 loc) · 4.27 KB
/
advancedAngling.lua
File metadata and controls
84 lines (76 loc) · 4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
local T = Angleur_Translate
function AngleurUI_AdvancedAngling()
local advancedButton = CreateFrame("Button", "$parent_AdvancedButton", Angleur.configPanel.tab2.contents, "GameMenuButtonTemplate")
advancedButton:SetSize(85, 45)
advancedButton:SetPoint("BOTTOM", Angleur.configPanel.tab2.contents, "BOTTOM", -12, 20)
advancedButton:SetScript("OnClick", function()
Angleur_AdvancedAnglingPanel:Show()
end)
advancedButton.text = advancedButton:CreateFontString("Angleur_AdvancedButton_Text", "ARTWORK", "SplashHeaderFont")
advancedButton.text:SetPoint("CENTER", advancedButton, "CENTER", 2, -2)
advancedButton.text:SetText(T["HOW?"])
local advancedPanel = CreateFrame("Frame", "Angleur_AdvancedAnglingPanel", UIParent, "BasicFrameTemplateWithInset")
tinsert(UISpecialFrames, "Angleur_AdvancedAnglingPanel")
advancedPanel:Hide()
advancedPanel:SetPoint("CENTER", UIParent, "CENTER")
advancedPanel:SetSize(1100, 560)
advancedPanel:SetMovable(true)
advancedPanel:RegisterForDrag("LeftButton")
advancedPanel:SetScript("OnDragStart", function(self)
self:StartMoving()
end)
advancedPanel:SetScript("OnDragStop", function(self)
self:StopMovingOrSizing()
end)
advancedPanel:SetScript("OnMouseDown", function(self)
self:Raise()
end)
advancedPanel.TitleText:SetText(T["Advanced Angling"])
advancedPanel:SetFrameStrata("HIGH")
advancedPanel:SetToplevel(true)
advancedPanel:SetScript("OnShow", function(self)
self:Raise()
end)
local texture = advancedPanel:CreateTexture("Angleur_AdvancedAnglingPanel_Texture", "OVERLAY")
texture:SetSize(1024, 512)
texture:SetPoint("CENTER")
texture:SetTexture("Interface/AddOns/Angleur/images/advancedAngling.png")
local colorBlu = CreateColor(0.61, 0.85, 0.92)
local colorWhite = CreateColor(1, 1, 1)
local colorYello = CreateColor(1.0, 0.82, 0.0)
local title = advancedPanel:CreateFontString(nil, "OVERLAY", "Game15Font")
title:SetPoint("TOP", advancedPanel, "TOP", 320, -50)
title:SetWordWrap(true)
title:SetJustifyH("LEFT")
title:SetJustifyV("TOP")
title:SetText(T[colorBlu:WrapTextInColorCode("Angleur ") .. "will have you cast the dragged item/macro\nif all of their below listed conditions are met."])
local explanation = advancedPanel:CreateFontString(nil, "OVERLAY", "Game15Font")
explanation:SetPoint("TOPLEFT", title, "BOTTOMLEFT", 0, -20)
explanation:SetWordWrap(true)
explanation:SetJustifyH("LEFT")
explanation:SetJustifyV("TOP")
explanation:SetSize(380, 1000)
explanation:SetText(T[colorYello:WrapTextInColorCode("Items:\n")
.. "- Any usable item from your bags or character equipment. " .. "\n\n Whenever:\n\n 1) "
.. colorYello:WrapTextInColorCode("Off-Cooldown\n") .. " 2) " .. colorYello:WrapTextInColorCode("Aura Inactive")
.. " (if present)\n" .. colorYello:WrapTextInColorCode("\nMacros:\n")
.. "- Any valid macro that contains a spell or a usable item - /cast or /use. "
.. "\n\n Whenever:\n\n 1) ".. colorYello:WrapTextInColorCode("Macro Conditions ")
.. "are met\n" .. " 2) Spell/Item is " .. colorYello:WrapTextInColorCode("Off-Cooldown\n")
.. " and their\n 3) " .. colorYello:WrapTextInColorCode("Auras Inactive")
.. " (if present)\n\n" .. colorYello:WrapTextInColorCode("IMPORTANT: ")
.. "If you are using Macro Conditionals, they need to be ACTIVE when you drag the macro to the slot.\n"
.. "_____________________________________________"])
local clock = advancedPanel:CreateTexture("Angleur_AdvancedAnglingPanel_TimerTexture", "OVERLAY")
clock:SetSize(64, 64)
clock:SetPoint("BOTTOMLEFT", texture, "BOTTOMRIGHT", -390, 10)
clock:SetTexture("Interface/AddOns/Angleur/images/timeIcon.png")
local clockText = advancedPanel:CreateFontString(nil, "OVERLAY", "Game15Font")
clockText:SetPoint("LEFT", clock, "RIGHT", 0, 0)
clockText:SetWordWrap(true)
clockText:SetJustifyH("LEFT")
clockText:SetJustifyV("TOP")
clockText:SetText(T["Spell/Item has no Cooldown/Aura?\n"
.. "Click " .. colorYello:WrapTextInColorCode("the Stopwatch ") .. "to set a manual timer.\n"
.. colorYello:WrapTextInColorCode(" (minutes:seconds)")])
end