forked from brittyazel/EnhancedRaidFrames
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneralConfigPanel.lua
199 lines (193 loc) · 6.01 KB
/
GeneralConfigPanel.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
--Enhanced Raid Frames, a World of Warcraft® user interface addon.
--This file is part of Enhanced Raid Frames.
--
--Enhanced Raid Frame is free software: you can redistribute it and/or modify
--it under the terms of the GNU General Public License as published by
--the Free Software Foundation, either version 3 of the License, or
--(at your option) any later version.
--
--Enhanced Raid Frame is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU General Public License for more details.
--
--You should have received a copy of the GNU General Public License
--along with this add-on. If not, see <https://www.gnu.org/licenses/>.
--
--Copyright for Enhanced Raid Frames is held by Britt Yazel (aka Soyier), 2017-2020.
local _, addonTable = ...
local EnhancedRaidFrames = addonTable.EnhancedRaidFrames
-------------------------------------------------------------------------
-------------------------------------------------------------------------
function EnhancedRaidFrames:CreateGeneralOptions()
local THIRD_WIDTH = 1.15
local generalOptions = {
type = "group",
childGroups = "tree",
args = {
instructions = {
type = "description",
name = "Below you will find general configuration options. Please expand the 'Enhanced Raid Frames' menu item in the left-hand column to configure aura indicators, raid icons, and more",
fontSize = "medium",
order = 2,
},
-------------------------------------------------
topSpacer = {
type = "header",
name = "",
order = 3,
},
stockOptionsButton = {
type = 'execute',
name = "Open the Blizzard Raid Profiles Menu",
desc = "Launch the built-in raid profiles interface configuration menu",
func = function() InterfaceOptionsFrame_OpenToCategory("Raid Profiles") end,
width = THIRD_WIDTH * 1.5,
order = 4,
},
-------------------------------------------------
textHeader = {
type = "header",
name = "Default Icon Visibility",
order = 10,
},
showBuffs = {
type = "toggle",
name = "Stock Buff Icons",
desc = "Show the standard raid frame buff icons",
descStyle = "inline",
get = function() return self.db.profile.showBuffs end,
set = function(_, value)
self.db.profile.showBuffs = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 11,
},
showDebuffs = {
type = "toggle",
name = "Stock Debuff Icons",
desc = "Show the standard raid frame debuff icons",
descStyle = "inline",
get = function() return self.db.profile.showDebuffs end,
set = function(_, value)
self.db.profile.showDebuffs = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 12,
},
showDispellableDebuffs = {
type = "toggle",
name = "Stock Dispellable Icons",
desc = "Show the standard raid frame dispellable icons",
descStyle = "inline",
get = function() return self.db.profile.showDispellableDebuffs end,
set = function(_, value)
self.db.profile.showDispellableDebuffs = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 13,
},
-------------------------------------------------
visualOptions = {
type = "header",
name = "General",
order = 30,
},
indicatorFont = {
type = 'select',
dialogControl = "LSM30_Font",
name = "Indicator Font",
desc = "The the font used for the indicators",
values = AceGUIWidgetLSMlists.font,
get = function() return self.db.profile.indicatorFont end,
set = function(_, value)
self.db.profile.indicatorFont = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 31,
},
frameScale = {
name = "Raidframe Scale",
desc = "The the scale of the raidframe from 50% to 200% of the normal size",
type = "range",
min = 0.5,
max = 2,
step = 0.1,
get = function() return self.db.profile.frameScale end,
set = function(_, value)
self.db.profile.frameScale = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 33,
},
backgroundAlpha = {
name = "Background Opacity",
desc = "The opacity percentage of the raid frame background",
type = "range",
min = 0,
max = 1,
step = 0.05,
get = function() return self.db.profile.backgroundAlpha end,
set = function(_, value)
self.db.profile.backgroundAlpha = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 34,
},
-------------------------------------------------
outOfRangeOptions = {
type = "header",
name = "Out-of-Range",
order = 40,
},
customRangeCheck = {
name = "Override Default Distance",
type = "toggle",
desc = "Overrides the default out-of-range indicator distance (default 40 yards)",
get = function() return self.db.profile.customRangeCheck end,
set = function(_, value)
self.db.profile.customRangeCheck = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 41,
},
customRange = {
name = "Select a Custom Distance",
type = "select",
desc = "Changes the default 40 yard out-of-range distance to the specified distance",
values = { [5] = "Melee", [10] = "10 yards", [20] = "20 yards", [30] = "30 yards", [35] = "35 yards"},
get = function() return self.db.profile.customRange end,
set = function(_, value)
self.db.profile.customRange = value
self:RefreshConfig()
end,
disabled = function() return not self.db.profile.customRangeCheck end,
width = THIRD_WIDTH,
order = 42,
},
rangeAlpha = {
name = "Out-of-Range Opacity",
desc = "The opacity percentage of the raid frame when out-of-range",
type = "range",
min = 0,
max = 1,
step = 0.05,
get = function() return self.db.profile.rangeAlpha end,
set = function(_, value)
self.db.profile.rangeAlpha = value
self:RefreshConfig()
end,
width = THIRD_WIDTH,
order = 43,
},
}
}
return generalOptions
end