-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCore.lua
125 lines (99 loc) · 4.5 KB
/
Core.lua
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
-------------------------------------------------------------------------------
-- the play button when the quest is first introduced -------------------------
-------------------------------------------------------------------------------
local f = CreateFrame("Frame", "AQFrame", QuestFrameDetailPanel)
f:SetPoint("BOTTOMLEFT")
f:SetSize(338, 50)
f:Show()
local button = CreateFrame("Button", "AQButton", f)
button:SetPoint("BOTTOMLEFT", QuestFrameDetailPanel, "BOTTOMLEFT", 85, -7)
button:SetWidth(150)
button:SetHeight(32)
button:SetNormalTexture("Interface/Buttons/UI-Panel-Button-Up")
button:SetHighlightTexture("Interface/Buttons/UI-Panel-Button-Highlight")
button:SetPushedTexture("Interface/Buttons/UI-Panel-Button-Down")
function AQ_QuestButton_OnClick()
PlaySoundFile("Interface\\AddOns\\AudioQuests\\sounds\\" .. GetQuestID() .. ".mp3");
end
function AQ_QuestButton_OnEnter()
local fshover = button:CreateFontString("ButtonText2", nil, "GameFontHighlight")
fshover:SetText("Play Audio")
fshover:SetPoint("TOPLEFT",15,-4)
button.text = fshover
end
function AQ_QuestButton_OnLeave()
local fs = button:CreateFontString("ButtonText", nil, "GameFontNormal")
fs:SetText("Play Audio")
fs:SetPoint("TOPLEFT",15,-4)
button.text = fs
end
AQ_QuestButton_OnLeave()
button:SetScript("OnClick", AQ_QuestButton_OnClick)
button:SetScript("OnEnter", AQ_QuestButton_OnEnter)
button:SetScript("OnLeave", AQ_QuestButton_OnLeave)
-------------------------------------------------------------------------------
-- the play button in the quest log -------------------------------------------
-------------------------------------------------------------------------------
local logF = CreateFrame("Frame", "AQFrameLog", QuestLogPopupDetailFrame)
logF:SetPoint("BOTTOMLEFT")
logF:SetSize(338, 50)
logF:Show()
local logButton = CreateFrame("Button", "AQButton", logF)
logButton:SetPoint("TOPLEFT", QuestLogPopupDetailFrame, "TOPLEFT", 5, -35)
logButton:SetWidth(150)
logButton:SetHeight(32)
logButton:SetNormalTexture("Interface/Buttons/UI-Panel-Button-Up")
logButton:SetHighlightTexture("Interface/Buttons/UI-Panel-Button-Highlight")
logButton:SetPushedTexture("Interface/Buttons/UI-Panel-Button-Down")
function AQ_LogQuestButton_OnClick()
PlaySoundFile("Interface\\AddOns\\AudioQuests\\sounds\\" .. QuestLogPopupDetailFrame.questID .. ".mp3");
end
function AQ_LogQuestButton_OnEnter()
local fshover = logButton:CreateFontString("ButtonText2", nil, "GameFontHighlight")
fshover:SetText("Play Audio")
fshover:SetPoint("TOPLEFT",15,-5)
logButton.text = fshover
end
function AQ_LogQuestButton_OnLeave()
local fs = logButton:CreateFontString("ButtonText", nil, "GameFontNormal")
fs:SetText("Play Audio")
fs:SetPoint("TOPLEFT",15,-5)
logButton.text = fs
end
AQ_LogQuestButton_OnLeave()
logButton:SetScript("OnClick", AQ_LogQuestButton_OnClick)
logButton:SetScript("OnEnter", AQ_LogQuestButton_OnEnter)
logButton:SetScript("OnLeave", AQ_LogQuestButton_OnLeave)
-------------------------------------------------------------------------------
-- the play button in the quest map -------------------------------------------
-------------------------------------------------------------------------------
local mapF = CreateFrame("Frame", "AQFrameMap", QuestMapFrame.DetailsFrame)
mapF:SetPoint("BOTTOMLEFT")
mapF:SetSize(338, 50)
mapF:Show()
local mapButton = CreateFrame("Button", "AQButton", mapF)
mapButton:SetPoint("TOPRIGHT", QuestMapFrame.DetailsFrame, "TOPRIGHT", 70, 30)
mapButton:SetWidth(150)
mapButton:SetHeight(32)
mapButton:SetNormalTexture("Interface/Buttons/UI-Panel-Button-Up")
mapButton:SetHighlightTexture("Interface/Buttons/UI-Panel-Button-Highlight")
mapButton:SetPushedTexture("Interface/Buttons/UI-Panel-Button-Down")
function AQ_mapQuestButton_OnClick()
PlaySoundFile("Interface\\AddOns\\AudioQuests\\sounds\\" .. QuestMapFrame.DetailsFrame.questID .. ".mp3");
end
function AQ_mapQuestButton_OnEnter()
local fshover = mapButton:CreateFontString("ButtonText2", nil, "GameFontHighlight")
fshover:SetText("Play Audio")
fshover:SetPoint("TOPLEFT",15,-5)
mapButton.text = fshover
end
function AQ_mapQuestButton_OnLeave()
local fs = mapButton:CreateFontString("ButtonText", nil, "GameFontNormal")
fs:SetText("Play Audio")
fs:SetPoint("TOPLEFT",15,-5)
mapButton.text = fs
end
AQ_mapQuestButton_OnLeave()
mapButton:SetScript("OnClick", AQ_mapQuestButton_OnClick)
mapButton:SetScript("OnEnter", AQ_mapQuestButton_OnEnter)
mapButton:SetScript("OnLeave", AQ_mapQuestButton_OnLeave)