-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadvancedAngling.lua
More file actions
88 lines (80 loc) · 4.45 KB
/
advancedAngling.lua
File metadata and controls
88 lines (80 loc) · 4.45 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
85
86
87
88
function AngleurUI_AdvancedAngling()
local advancedButton = CreateFrame("Button", "$parent_AdvancedButton", Angleur.configPanel.tab2.contents, "GameMenuButtonTemplate")
advancedButton:SetSize(80, 40)
advancedButton:SetPoint("CENTER", Angleur.configPanel.tab2.contents, "CENTER", -48, -50)
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("HOW?")
local advancedPanel = CreateFrame("Frame", "Angleur_AdvancedAnglingPanel", UIParent, "BasicFrameTemplateWithInset")
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("Advanced Angling")
advancedPanel:SetFrameStrata("HIGH")
advancedPanel:SetToplevel(true)
advancedPanel:SetScript("OnShow", function(self)
self:Raise()
end)
advancedPanel:SetScript("OnKeyDown", function(self, key)
if key =="ESCAPE" then
self:Hide()
self:SetPropagateKeyboardInput(false)
else
self:SetPropagateKeyboardInput(true)
end
end)
local texture = advancedPanel:CreateTexture("Angleur_AdvancedAnglingPanel_Texture", "OVERLAY")
texture:SetSize(1024, 512)
texture:SetPoint("CENTER")
texture:SetTexture("Interface/AddOns/AngleurClassic/images/advancedAngling.png")
local colorBlu = CreateColor(0.61, 0.85, 0.92)
local colorWhite = CreateColor(1, 1, 1)
local colorYellow = 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(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(colorYellow:WrapTextInColorCode("Items:\n") ..
"- Any usable item from your bags or character equipment. " ..
"\n\n Whenever:\n\n 1) ".. colorYellow:WrapTextInColorCode("Off-Cooldown\n") .. " 2) " .. colorYellow:WrapTextInColorCode("Aura Inactive") .. " (if present)\n"
.. colorYellow:WrapTextInColorCode("\nMacros:\n") ..
"- Any valid macro that contains a spell or a usable item - /cast or /use. " ..
"\n\n Whenever:\n\n 1) ".. colorYellow:WrapTextInColorCode("Macro Conditions ") .. "are met\n" .. " 2) Spell/Item is " .. colorYellow:WrapTextInColorCode("Off-Cooldown\n")
.. " and their\n 3) " .. colorYellow:WrapTextInColorCode("Auras Inactive") .. " (if present)\n\n" ..
colorYellow: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/AngleurClassic/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("Spell/Item has no Cooldown/Aura?\n" ..
"Click " .. colorYellow:WrapTextInColorCode("the Stopwatch ") .. "to set a manual timer.\n" .. colorYellow:WrapTextInColorCode(" (minutes:seconds)"))
advancedPanel:SetScale(0.85)
end