General.lua 30.4 KB
Newer Older
Azilroka's avatar
Azilroka committed
1 2
local E, _, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local C, L = unpack(select(2, ...))
Simpy's avatar
:L  
Simpy committed
3 4 5 6
local Misc = E:GetModule('Misc')
local Layout = E:GetModule('Layout')
local Totems = E:GetModule('Totems')
local Blizzard = E:GetModule('Blizzard')
7 8
local NP = E:GetModule('NamePlates')
local UF = E:GetModule('UnitFrames')
Simpy's avatar
:L  
Simpy committed
9
local AFK = E:GetModule('AFK')
10
local ACH = E.Libs.ACH
11

12
local _G = _G
Simpy's avatar
boop  
Simpy committed
13
local IsAddOnLoaded = IsAddOnLoaded
Simpy's avatar
Simpy committed
14
local IsMouseButtonDown = IsMouseButtonDown
15 16
local FCF_GetNumActiveChatFrames = FCF_GetNumActiveChatFrames

Azilroka's avatar
Azilroka committed
17 18 19
local function GetChatWindowInfo()
	local ChatTabInfo = {}
	for i = 1, FCF_GetNumActiveChatFrames() do
20
		ChatTabInfo['ChatFrame'..i] = _G['ChatFrame'..i..'Tab']:GetText()
Azilroka's avatar
Azilroka committed
21 22 23 24
	end
	return ChatTabInfo
end

25
E.Options.args.general = {
26
	type = 'group',
27 28
	name = L["General"],
	order = 1,
29
	childGroups = 'tab',
Simpy's avatar
Simpy committed
30 31
	get = function(info) return E.db.general[info[#info]] end,
	set = function(info, value) E.db.general[info[#info]] = value end,
32 33
	args = {
		general = {
34
			order = 5,
35
			type = 'group',
36 37
			name = L["General"],
			args = {
38 39
				loginmessage = {
					order = 4,
40
					type = 'toggle',
41
					name = L["Login Message"],
42 43
				},
				taintLog = {
44
					order = 5,
45
					type = 'toggle',
46 47 48 49
					name = L["Log Taints"],
					desc = L["Send ADDON_ACTION_BLOCKED errors to the Lua Error frame. These errors are less important in most cases and will not effect your game performance. Also a lot of these errors cannot be fixed. Please only report these errors if you notice a Defect in gameplay."],
				},
				bottomPanel = {
50
					order = 6,
51 52 53
					type = 'toggle',
					name = L["Bottom Panel"],
					desc = L["Display a panel across the bottom of the screen. This is for cosmetic only."],
Simpy's avatar
:L  
Simpy committed
54
					set = function(info, value) E.db.general.bottomPanel = value; Layout:BottomPanelVisibility() end
55 56
				},
				topPanel = {
57
					order = 7,
58 59 60
					type = 'toggle',
					name = L["Top Panel"],
					desc = L["Display a panel across the top of the screen. This is for cosmetic only."],
Simpy's avatar
:L  
Simpy committed
61
					set = function(info, value) E.db.general.topPanel = value; Layout:TopPanelVisibility() end
62 63
				},
				afk = {
64
					order = 8,
65 66 67
					type = 'toggle',
					name = L["AFK Mode"],
					desc = L["When you go AFK display the AFK screen."],
Simpy's avatar
:L  
Simpy committed
68
					set = function(info, value) E.db.general.afk = value; AFK:Toggle() end
69
				},
70 71 72 73
				eyefinity = {
					order = 9,
					name = L["Multi-Monitor Support"],
					desc = L["Attempt to support eyefinity/nvidia surround."],
74
					type = 'toggle',
75
					get = function(info) return E.global.general.eyefinity end,
76
					set = function(info, value) E.global.general.eyefinity = value; E:StaticPopup_Show('GLOBAL_RL') end
77 78
				},
				autoAcceptInvite = {
79
					order = 10,
80 81 82
					name = L["Accept Invites"],
					desc = L["Automatically accept invites from guild/friends."],
					type = 'toggle',
83
				},
84
				autoRoll = {
85
					order = 11,
86 87 88 89 90
					name = L["Auto Greed/DE"],
					desc = L["Automatically select greed or disenchant (when available) on green quality items. This will only work if you are the max level."],
					type = 'toggle',
					disabled = function() return not E.private.general.lootRoll end
				},
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
				autoTrackReputation = {
					order = 12,
					name = L["Auto Track Reputation"],
					type = 'toggle',
				},
				spacer1 = ACH:Spacer(15, 'full'),
				locale = {
					order = 16,
					type = 'select',
					name = L["LANGUAGE"],
					get = function(info) return E.global.general.locale end,
					set = function(info, value)
						E.global.general.locale = value
						E:StaticPopup_Show('CONFIG_RL')
					end,
					values = {
						deDE = 'Deutsch',
						enUS = 'English',
						esMX = 'Español',
						frFR = 'Français',
						ptBR = 'Português',
						ruRU = 'Русский',
						zhCN = '简体中文',
						zhTW = '正體中文',
						koKR = '한국어',
						itIT = 'Italiano',
					},
				},
119
				messageRedirect = {
120
					order = 17,
121 122 123 124 125 126
					name = L["Chat Output"],
					desc = L["This selects the Chat Frame to use as the output of ElvUI messages."],
					type = 'select',
					values = GetChatWindowInfo()
				},
				numberPrefixStyle = {
127
					order = 18,
128
					type = 'select',
129
					name = L["Unit Prefix Style"],
130
					desc = L["The unit prefixes you want to use when values are shortened in ElvUI. This is mostly used on UnitFrames."],
Simpy's avatar
Simpy committed
131 132
					set = function(info, value)
						E.db.general.numberPrefixStyle = value
Simpy's avatar
Simpy committed
133
						E:BuildPrefixValues()
134
						E:StaticPopup_Show('CONFIG_RL')
Simpy's avatar
Simpy committed
135
					end,
136
					values = {
Simpy's avatar
Simpy committed
137 138 139 140 141 142
						TCHINESE = '萬, 億',
						CHINESE = '万, 亿',
						ENGLISH = 'K, M, B',
						GERMAN = 'Tsd, Mio, Mrd',
						KOREAN = '천, 만, 억',
						METRIC = 'k, M, G'
143 144
					},
				},
145
				interruptAnnounce = {
146
					order = 19,
147 148 149 150
					name = L["Announce Interrupts"],
					desc = L["Announce when you interrupt a spell to the specified chat channel."],
					type = 'select',
					values = {
Simpy's avatar
Simpy committed
151 152 153 154 155 156 157
						NONE = L["NONE"],
						SAY = L["SAY"],
						YELL = L["YELL"],
						PARTY = L["Party Only"],
						RAID = L["Party / Raid"],
						RAID_ONLY = L["Raid Only"],
						EMOTE = L["CHAT_MSG_EMOTE"],
158 159 160 161 162 163 164 165 166 167 168
					},
					set = function(info, value)
						E.db.general[info[#info]] = value
						if value == 'NONE' then
							Misc:UnregisterEvent('COMBAT_LOG_EVENT_UNFILTERED')
						else
							Misc:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED')
						end
					end,
				},
				autoRepair = {
169
					order = 20,
170 171 172 173
					name = L["Auto Repair"],
					desc = L["Automatically repair using the following method when visiting a merchant."],
					type = 'select',
					values = {
Simpy's avatar
Simpy committed
174 175 176
						NONE = L["NONE"],
						GUILD = L["GUILD"],
						PLAYER = L["PLAYER"],
177 178
					},
				},
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
				spacer2 = ACH:Spacer(25, 'full'),
				decimalLength = {
					order = 26,
					type = 'range',
					name = L["Decimal Length"],
					desc = L["Controls the amount of decimals used in values displayed on elements like NamePlates and UnitFrames."],
					min = 0, max = 4, step = 1,
					set = function(info, value)
						E.db.general.decimalLength = value
						E:BuildPrefixValues()
						E:StaticPopup_Show('CONFIG_RL')
					end,
				},
				smoothingAmount = {
					order = 27,
					type = 'range',
					isPercent = true,
					name = L["Smoothing Amount"],
					desc = L["Controls the speed at which smoothed bars will be updated."],
					min = 0.2, max = 0.8, softMax = 0.75, softMin = 0.25, step = 0.01,
					set = function(info, value)
						E.db.general.smoothingAmount = value
						E:SetSmoothingAmount(value)
					end,
				},
				UIScale = {
					order = 28,
					type = 'range',
					name = L["UI_SCALE"],
					min = 0.1, max = 1.25, step = 0.000000000000001,
					softMin = 0.40, softMax = 1.15, bigStep = 0.01,
					get = function(info) return E.global.general.UIScale end,
					set = function(info, value)
						E.global.general.UIScale = value
						if not IsMouseButtonDown() then
							E:PixelScaleChanged()
						end
					end
				},
				AutoScale = {
					order = 29,
					type = 'execute',
					name = L["Auto Scale"],
					func = function()
						E.global.general.UIScale = E:PixelBestSize()
						E:PixelScaleChanged()
					end,
Azilroka's avatar
Azilroka committed
226
				},
227 228
				totems = {
					order = 55,
229
					type = 'group',
230
					inline = true,
231 232 233 234 235 236
					name = L["Class Totems"],
					get = function(info) return E.db.general.totems[info[#info]] end,
					set = function(info, value) E.db.general.totems[info[#info]] = value; Totems:PositionAndSize() end,
					args = {
						enable = {
							order = 2,
237
							type = 'toggle',
238 239
							name = L["Enable"],
							get = function() return E.private.general.totemBar end,
240
							set = function(_, value) E.private.general.totemBar = value; E:StaticPopup_Show('PRIVATE_RL') end,
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
						},
						size = {
							order = 3,
							type = 'range',
							name = L["Button Size"],
							min = 24, max = 60, step = 1,
							disabled = function() return not E.private.general.totemBar end,
						},
						spacing = {
							order = 4,
							type = 'range',
							name = L["Button Spacing"],
							min = 1, max = 10, step = 1,
							disabled = function() return not E.private.general.totemBar end,
						},
						sortDirection = {
							order = 5,
							type = 'select',
							name = L["Sort Direction"],
							disabled = function() return not E.private.general.totemBar end,
							values = {
Simpy's avatar
Simpy committed
262 263
								ASCENDING = L["Ascending"],
								DESCENDING = L["Descending"],
264 265 266 267 268 269 270 271
							},
						},
						growthDirection = {
							order = 6,
							type = 'select',
							name = L["Bar Direction"],
							disabled = function() return not E.private.general.totemBar end,
							values = {
Simpy's avatar
Simpy committed
272 273
								VERTICAL = L["Vertical"],
								HORIZONTAL = L["Horizontal"],
274 275 276
							},
						},
					},
277
				},
278 279 280
			},
		},
		media = {
Simpy's avatar
order  
Simpy committed
281
			order = 10,
282
			type = 'group',
283
			name = L["Media"],
Simpy's avatar
Simpy committed
284 285
			get = function(info) return E.db.general[info[#info]] end,
			set = function(info, value) E.db.general[info[#info]] = value end,
286
			args = {
Azilroka's avatar
Azilroka committed
287
				fontGroup = {
288
					order = 50,
Azilroka's avatar
Azilroka committed
289 290
					name = L["Font"],
					type = 'group',
291
					inline = true,
Azilroka's avatar
Azilroka committed
292
					args = {
Azilroka's avatar
Azilroka committed
293
						main = {
Azilroka's avatar
Azilroka committed
294
							order = 1,
Azilroka's avatar
Azilroka committed
295 296 297 298
							type = 'group',
							name = ' ',
							args = {
								font = {
299
									type = 'select', dialogControl = 'LSM30_Font',
Azilroka's avatar
Azilroka committed
300 301 302 303 304 305 306 307 308 309
									order = 1,
									name = L["Default Font"],
									desc = L["The font that the core of the UI will use."],
									values = AceGUIWidgetLSMlists.font,
									set = function(info, value) E.db.general[info[#info]] = value; E:UpdateMedia(); E:UpdateFontTemplates(); end,
								},
								fontSize = {
									order = 2,
									name = L["FONT_SIZE"],
									desc = L["Set the font size for everything in UI. Note: This doesn't effect somethings that have their own seperate options (UnitFrame Font, Datatext Font, ect..)"],
310
									type = 'range',
Simpy's avatar
Simpy committed
311 312
									min = 4, max = 48, step = 1,
									softMin = 10, softMax = 32,
Azilroka's avatar
Azilroka committed
313 314 315
									set = function(info, value) E.db.general[info[#info]] = value; E:UpdateMedia(); E:UpdateFontTemplates(); end,
								},
								fontStyle = {
316
									type = 'select',
Azilroka's avatar
Azilroka committed
317 318 319 320 321 322 323 324 325 326
									order = 3,
									name = L["Font Outline"],
									values = C.Values.FontFlags,
									set = function(info, value) E.db.general[info[#info]] = value; E:UpdateMedia(); E:UpdateFontTemplates(); end,
								},
								applyFontToAll = {
									order = 4,
									type = 'execute',
									name = L["Apply Font To All"],
									desc = L["Applies the font and font size settings throughout the entire user interface. Note: Some font size settings will be skipped due to them having a smaller font size by default."],
327
									func = function() E:StaticPopup_Show('APPLY_FONT_WARNING'); end,
Azilroka's avatar
Azilroka committed
328 329 330 331 332 333 334
								},
								replaceBlizzFonts = {
									order = 5,
									type = 'toggle',
									name = L["Replace Blizzard Fonts"],
									desc = L["Replaces the default Blizzard fonts on various panels and frames with the fonts chosen in the Media section of the ElvUI Options. NOTE: Any font that inherits from the fonts ElvUI usually replaces will be affected as well if you disable this. Enabled by default."],
									get = function(info) return E.private.general[info[#info]] end,
335
									set = function(info, value) E.private.general[info[#info]] = value; E:StaticPopup_Show('PRIVATE_RL'); end,
Azilroka's avatar
Azilroka committed
336 337
								},
							},
Azilroka's avatar
Azilroka committed
338 339 340 341
						},
						replaceCombatFont = {
							order = 6,
							type = 'toggle',
Azilroka's avatar
Azilroka committed
342
							name = L["Replace Combat Font"],
Azilroka's avatar
Azilroka committed
343
							get = function(info) return E.private.general[info[#info]] end,
344
							set = function(info, value) E.private.general[info[#info]] = value; E:StaticPopup_Show('PRIVATE_RL'); end,
Azilroka's avatar
Azilroka committed
345
						},
Azilroka's avatar
Azilroka committed
346
						dmgfont = {
347
							type = 'select', dialogControl = 'LSM30_Font',
Azilroka's avatar
Azilroka committed
348
							order = 7,
Azilroka's avatar
Azilroka committed
349 350
							name = L["CombatText Font"],
							desc = L["The font that combat text will use. |cffFF0000WARNING: This requires a game restart or re-log for this change to take effect.|r"],
Azilroka's avatar
Azilroka committed
351
							disabled = function() return not E.private.general.replaceCombatFont end,
Azilroka's avatar
Azilroka committed
352
							values = AceGUIWidgetLSMlists.font,
Simpy's avatar
Simpy committed
353
							get = function(info) return E.private.general[info[#info]] end,
354
							set = function(info, value) E.private.general[info[#info]] = value; E:UpdateMedia(); E:UpdateFontTemplates(); E:StaticPopup_Show('PRIVATE_RL'); end,
Azilroka's avatar
Azilroka committed
355
						},
Azilroka's avatar
Azilroka committed
356 357 358 359 360
						replaceNameFont = {
							order = 8,
							type = 'toggle',
							name = L["Replace Name Font"],
							get = function(info) return E.private.general[info[#info]] end,
361
							set = function(info, value) E.private.general[info[#info]] = value; E:StaticPopup_Show('PRIVATE_RL'); end,
Azilroka's avatar
Azilroka committed
362
						},
Azilroka's avatar
Azilroka committed
363
						namefont = {
364
							type = 'select', dialogControl = 'LSM30_Font',
Azilroka's avatar
Azilroka committed
365
							order = 9,
Azilroka's avatar
Azilroka committed
366 367
							name = L["Name Font"],
							desc = L["The font that appears on the text above players heads. |cffFF0000WARNING: This requires a game restart or re-log for this change to take effect.|r"],
Azilroka's avatar
Azilroka committed
368
							disabled = function() return not E.private.general.replaceNameFont end,
Azilroka's avatar
Azilroka committed
369
							values = AceGUIWidgetLSMlists.font,
Simpy's avatar
Simpy committed
370
							get = function(info) return E.private.general[info[#info]] end,
371
							set = function(info, value) E.private.general[info[#info]] = value; E:UpdateMedia(); E:UpdateFontTemplates(); E:StaticPopup_Show('PRIVATE_RL'); end,
Azilroka's avatar
Azilroka committed
372
						},
Azilroka's avatar
Azilroka committed
373
					},
374
				},
Azilroka's avatar
Azilroka committed
375
				textureGroup = {
376
					order = 51,
377
					name = L["Textures"],
Azilroka's avatar
Azilroka committed
378
					type = 'group',
379
					inline = true,
Simpy's avatar
Simpy committed
380
					get = function(info) return E.private.general[info[#info]] end,
Azilroka's avatar
Azilroka committed
381 382
					args = {
						normTex = {
383
							type = 'select', dialogControl = 'LSM30_Statusbar',
Azilroka's avatar
Azilroka committed
384 385 386 387 388
							order = 1,
							name = L["Primary Texture"],
							desc = L["The texture that will be used mainly for statusbars."],
							values = AceGUIWidgetLSMlists.statusbar,
							set = function(info, value)
Simpy's avatar
Simpy committed
389
								E.private.general[info[#info]] = value;
390 391
								E:UpdateMedia()
								E:UpdateStatusBars()
Azilroka's avatar
Azilroka committed
392 393 394
							end
						},
						glossTex = {
395
							type = 'select', dialogControl = 'LSM30_Statusbar',
Azilroka's avatar
Azilroka committed
396 397 398 399 400
							order = 2,
							name = L["Secondary Texture"],
							desc = L["This texture will get used on objects like chat windows and dropdown menus."],
							values = AceGUIWidgetLSMlists.statusbar,
							set = function(info, value)
Simpy's avatar
Simpy committed
401
								E.private.general[info[#info]] = value;
Azilroka's avatar
Azilroka committed
402 403 404 405 406 407 408
								E:UpdateMedia()
								E:UpdateFrameTemplates()
							end
						},
						applyTextureToAll = {
							order = 3,
							type = 'execute',
409 410
							name = L["Copy Primary Texture"],
							desc = L["Replaces the StatusBar texture setting on Unitframes and Nameplates with the primary texture."],
Azilroka's avatar
Azilroka committed
411
							func = function()
412
								E.db.unitframe.statusbar = E.private.general.normTex
413
								UF:Update_StatusBars()
414 415

								E.db.nameplates.statusbar = E.private.general.normTex
416
								NP:ConfigureAll()
Azilroka's avatar
Azilroka committed
417 418 419
							end,
						},
					},
420
				},
421 422 423 424
				bordersGroup = {
					order = 52,
					name = L["Borders"],
					type = 'group',
425
					inline = true,
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
					args = {
						uiThinBorders = {
							order = 1,
							name = L["Thin Borders"],
							desc = L["The Thin Border Theme option will change the overall apperance of your UI. Using Thin Border Theme is a slight performance increase over the traditional layout."],
							type = 'toggle',
							get = function(info) return E.private.general.pixelPerfect end,
							set = function(info, value)
								E.private.general.pixelPerfect = value
								E:StaticPopup_Show('PRIVATE_RL')
							end
						},
						ufThinBorders = {
							order = 2,
							name = L["Unitframe Thin Borders"],
							desc = L["Use thin borders on certain unitframe elements."],
							type = 'toggle',
							get = function(info) return E.db.unitframe.thinBorders end,
							set = function(info, value)
								E.db.unitframe.thinBorders = value
								E:StaticPopup_Show('CONFIG_RL')
							end,
						},
						cropIcon = {
							order = 3,
							type = 'toggle',
							tristate = true,
							name = L["Crop Icons"],
							desc = L["This is for Customized Icons in your Interface/Icons folder."],
							get = function(info)
								local value = E.db.general[info[#info]]
								if value == 2 then return true
								elseif value == 1 then return nil
								else return false end
							end,
							set = function(info, value)
								E.db.general[info[#info]] = (value and 2) or (value == nil and 1) or 0
								E:StaticPopup_Show('PRIVATE_RL')
							end,
						},
					}
				},
Azilroka's avatar
Azilroka committed
468
				colorsGroup = {
469
					order = 52,
Azilroka's avatar
Azilroka committed
470 471
					name = L["Colors"],
					type = 'group',
472
					inline = true,
473
					get = function(info)
Simpy's avatar
Simpy committed
474
						local t = E.db.general[info[#info]]
475
						local d = P.general[info[#info]]
476
						return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a
477
					end,
478
					set = function(info, r, g, b, a)
Azilroka's avatar
Azilroka committed
479 480
						local setting = info[#info]
						local t = E.db.general[setting]
481
						t.r, t.g, t.b, t.a = r, g, b, a
482
						E:UpdateMedia()
483 484 485 486 487
						if setting == 'bordercolor' then
							E:UpdateBorderColors()
						elseif setting == 'backdropcolor' or setting == 'backdropfadecolor' then
							E:UpdateBackdropColors()
						end
488
					end,
Azilroka's avatar
Azilroka committed
489 490
					args = {
						backdropcolor = {
491
							type = 'color',
492
							order = 1,
Azilroka's avatar
Azilroka committed
493 494 495 496 497
							name = L["Backdrop Color"],
							desc = L["Main backdrop color of the UI."],
							hasAlpha = false,
						},
						backdropfadecolor = {
498
							type = 'color',
499
							order = 2,
Azilroka's avatar
Azilroka committed
500 501 502 503 504
							name = L["Backdrop Faded Color"],
							desc = L["Backdrop color of transparent frames"],
							hasAlpha = true,
						},
						valuecolor = {
505
							type = 'color',
506
							order = 3,
Azilroka's avatar
Azilroka committed
507 508 509 510
							name = L["Value Color"],
							desc = L["Color some texts use."],
							hasAlpha = false,
						},
511 512 513
						spacer1 = ACH:Spacer(9, 'full'),
						uiBorderColors = {
							type = 'color',
Azilroka's avatar
Azilroka committed
514
							order = 10,
515 516
							name = L["Border Color"],
							desc = L["Main border color of the UI."],
517
							get = function(info)
518 519 520
								local t = E.db.general.bordercolor
								local d = P.general.bordercolor
								return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a
521
							end,
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542
							set = function(info, r, g, b, a)
								local t = E.db.general.bordercolor
								t.r, t.g, t.b, t.a = r, g, b, a
								E:UpdateMedia()
								E:UpdateBorderColors()
							end,
						},
						ufBorderColors = {
							order = 11,
							type = 'color',
							name = L["Unitframes Border Color"],
							get = function(info)
								local t = E.db.unitframe.colors.borderColor
								local d = P.unitframe.colors.borderColor
								return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a
							end,
							set = function(info, r, g, b, a)
								local t = E.db.unitframe.colors.borderColor
								t.r, t.g, t.b, t.a = r, g, b, a
								E:UpdateMedia()
								E:UpdateBorderColors()
543
							end,
Azilroka's avatar
Azilroka committed
544 545
						},
					},
Azilroka's avatar
Azilroka committed
546
				},
547
			}
548
		},
549
		alternativePowerGroup = {
550
			order = 15,
551
			type = 'group',
552
			name = L["Alternative Power"],
Simpy's avatar
Simpy committed
553
			get = function(info) return E.db.general.altPowerBar[info[#info]] end,
Simpy's avatar
Simpy committed
554
			set = function(info, value)
Simpy's avatar
Simpy committed
555
				E.db.general.altPowerBar[info[#info]] = value;
Simpy's avatar
:L  
Simpy committed
556
				Blizzard:UpdateAltPowerBarSettings();
Simpy's avatar
Simpy committed
557
			end,
558 559 560
			args = {
				enable = {
					order = 2,
561
					type = 'toggle',
Rubgrsch's avatar
Rubgrsch committed
562
					name = L["Enable"],
563 564
					desc = L["Replace Blizzard's Alternative Power Bar"],
					width = 'full',
565
					set = function(info, value)
Simpy's avatar
Simpy committed
566
						E.db.general.altPowerBar[info[#info]] = value;
567
						E:StaticPopup_Show('PRIVATE_RL');
568
					end,
569 570
				},
				width = {
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
571
					order = 3,
572
					type = 'range',
573
					name = L["Width"],
574
					min = 50, max = 1000, step = 1,
575
				},
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
576 577
				height = {
					order = 4,
578
					type = 'range',
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
579 580
					name = L["Height"],
					min = 5, max = 100, step = 1,
581
				},
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
582 583 584 585
				statusBarGroup = {
					order = 5,
					name = L["Status Bar"],
					type = 'group',
586
					inline = true,
Azilroka's avatar
Fix PR  
Azilroka committed
587
					set = function(info, value)
Simpy's avatar
Simpy committed
588
						E.db.general.altPowerBar[info[#info]] = value;
Azilroka's avatar
Fix PR  
Azilroka committed
589 590 591
						Blizzard:UpdateAltPowerBarColors();
					end,
					get = function(info)
Simpy's avatar
Simpy committed
592
						return E.db.general.altPowerBar[info[#info]]
Azilroka's avatar
Fix PR  
Azilroka committed
593
					end,
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
594
					args = {
595 596
						smoothbars = {
							type = 'toggle',
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
597
							order = 1,
598 599 600 601 602
							name = L["Smooth Bars"],
							desc = L["Bars will transition smoothly."],
						},
						statusBar = {
							order = 2,
603
							type = 'select', dialogControl = 'LSM30_Statusbar',
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
604 605 606 607
							name = L["StatusBar Texture"],
							values = AceGUIWidgetLSMlists.statusbar,
						},
						statusBarColorGradient = {
608
							order = 3,
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
609 610 611 612 613
							name = L["Color Gradient"],
							type = 'toggle',
						},
						statusBarColor = {
							type = 'color',
614
							order = 4,
Simpy's avatar
Simpy committed
615
							name = L["COLOR"],
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
616 617 618 619
							disabled = function()
								return E.db.general.altPowerBar.statusBarColorGradient
							end,
							get = function(info)
Simpy's avatar
Simpy committed
620 621
								local t = E.db.general.altPowerBar[info[#info]]
								local d = P.general.altPowerBar[info[#info]]
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
622 623 624
								return t.r, t.g, t.b, t.a, d.r, d.g, d.b
							end,
							set = function(info, r, g, b)
Simpy's avatar
Simpy committed
625
								local t = E.db.general.altPowerBar[info[#info]]
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
626
								t.r, t.g, t.b = r, g, b
627
								Blizzard:UpdateAltPowerBarColors()
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
628 629
							end,
						},
630 631
					},
				},
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
632 633 634 635
				textGroup = {
					order = 6,
					name = L["Text"],
					type = 'group',
636
					inline = true,
Azilroka's avatar
Fix PR  
Azilroka committed
637
					set = function(info, value)
Simpy's avatar
Simpy committed
638
						E.db.general.altPowerBar[info[#info]] = value;
639
						Blizzard:UpdateAltPowerBarSettings()
Azilroka's avatar
Fix PR  
Azilroka committed
640 641
					end,
					get = function(info)
Simpy's avatar
Simpy committed
642
						return E.db.general.altPowerBar[info[#info]]
Azilroka's avatar
Fix PR  
Azilroka committed
643
					end,
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
644 645
					args = {
						font = {
646
							type = 'select', dialogControl = 'LSM30_Font',
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
647 648 649 650 651 652
							order = 1,
							name = L["Font"],
							values = AceGUIWidgetLSMlists.font,
						},
						fontSize = {
							order = 2,
Simpy's avatar
Simpy committed
653
							name = L["FONT_SIZE"],
654
							type = 'range',
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
655 656 657 658
							min = 6, max = 22, step = 1,
						},
						fontOutline = {
							order = 3,
659
							type = 'select',
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
660
							name = L["Font Outline"],
Azilroka's avatar
Azilroka committed
661
							values = C.Values.FontFlags,
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
662 663 664 665 666 667 668
						},
						textFormat = {
							order = 4,
							type = 'select',
							name = L["Text Format"],
							sortByValue = true,
							values = {
Simpy's avatar
Simpy committed
669 670
								NONE = L["NONE"],
								NAME = L["NAME"],
Sean Anderson / Shrom's avatar
Sean Anderson / Shrom committed
671 672 673 674 675 676 677 678
								NAMEPERC = L["Name: Percent"],
								NAMECURMAX = L["Name: Current / Max"],
								NAMECURMAXPERC = L["Name: Current / Max - Percent"],
								PERCENT = L["Percent"],
								CURMAX = L["Current / Max"],
								CURMAXPERC = L["Current / Max - Percent"],
							},
						},
Simpy's avatar
Simpy committed
679 680
					},
				},
681 682
			},
		},
683
		blizzUIImprovements = {
684
			order = 20,
685
			type = 'group',
686 687 688 689
			name = L["BlizzUI Improvements"],
			args = {
				loot = {
					order = 1,
690
					type = 'toggle',
691 692 693
					name = L["Loot"],
					desc = L["Enable/Disable the loot frame."],
					get = function(info) return E.private.general.loot end,
694
					set = function(info, value) E.private.general.loot = value; E:StaticPopup_Show('PRIVATE_RL') end
695 696 697
				},
				lootRoll = {
					order = 2,
698
					type = 'toggle',
699 700 701
					name = L["Loot Roll"],
					desc = L["Enable/Disable the loot roll frame."],
					get = function(info) return E.private.general.lootRoll end,
702
					set = function(info, value) E.private.general.lootRoll = value; E:StaticPopup_Show('PRIVATE_RL') end
703 704 705 706 707
				},
				hideErrorFrame = {
					order = 3,
					name = L["Hide Error Text"],
					desc = L["Hides the red error text at the top of the screen while in combat."],
708
					type = 'toggle'
709 710 711 712 713 714 715 716 717
				},
				enhancedPvpMessages = {
					order = 4,
					type = 'toggle',
					name = L["Enhanced PVP Messages"],
					desc = L["Display battleground messages in the middle of the screen."],
				},
				showMissingTalentAlert = {
					order = 5,
718
					type = 'toggle',
719 720 721
					name = L["Missing Talent Alert"],
					desc = L["Show an alert frame if you have unspend talent points."],
					get = function(info) return E.global.general.showMissingTalentAlert end,
722
					set = function(info, value) E.global.general.showMissingTalentAlert = value; E:StaticPopup_Show('GLOBAL_RL') end,
723 724 725
				},
				raidUtility = {
					order = 6,
726
					type = 'toggle',
Simpy's avatar
Simpy committed
727
					name = L["RAID_CONTROL"],
728 729
					desc = L["Enables the ElvUI Raid Control panel."],
					get = function(info) return E.private.general.raidUtility end,
730
					set = function(info, value) E.private.general.raidUtility = value; E:StaticPopup_Show('PRIVATE_RL') end
731 732 733
				},
				voiceOverlay = {
					order = 7,
734
					type = 'toggle',
735 736 737
					name = L["Voice Overlay"],
					desc = L["Replace Blizzard's Voice Overlay."],
					get = function(info) return E.private.general.voiceOverlay end,
738
					set = function(info, value) E.private.general.voiceOverlay = value; E:StaticPopup_Show('PRIVATE_RL') end
739 740
				},
				disableTutorialButtons = {
Simpy's avatar
Simpy committed
741
					order = 8,
742 743 744 745
					type = 'toggle',
					name = L["Disable Tutorial Buttons"],
					desc = L["Disables the tutorial button found on some frames."],
					get = function(info) return E.global.general.disableTutorialButtons end,
746
					set = function(info, value) E.global.general.disableTutorialButtons = value; E:StaticPopup_Show('GLOBAL_RL') end,
Rubgrsch's avatar
Cleanup  
Rubgrsch committed
747
				},
748
				resurrectSound = {
Simpy's avatar
Simpy committed
749
					order = 9,
750 751 752 753
					type = 'toggle',
					name = L["Resurrect Sound"],
					desc = L["Enable to hear sound if you receive a resurrect."],
				},
Simpy's avatar
Simpy committed
754 755
				vehicleSeatIndicatorSize = {
					order = 10,
756
					type = 'range',
Simpy's avatar
Simpy committed
757 758 759 760 761
					name = L["Vehicle Seat Indicator Size"],
					min = 64, max = 128, step = 4,
					get = function(info) return E.db.general.vehicleSeatIndicatorSize end,
					set = function(info, value) E.db.general.vehicleSeatIndicatorSize = value; Blizzard:UpdateVehicleFrame() end,
				},
762
				durabilityScale = {
Simpy's avatar
Simpy committed
763
					order = 11,
764
					type = 'range',
765 766 767
					name = L["Durability Scale"],
					min = 0.5, max = 8, step = 0.5,
					get = function(info) return E.db.general.durabilityScale end,
768
					set = function(info, value) E.db.general.durabilityScale = value; E:StaticPopup_Show('PRIVATE_RL') end,
769
				},
Simpy's avatar
Simpy committed
770 771
				commandBarSetting = {
					order = 12,
772
					type = 'select',
Simpy's avatar
Simpy committed
773 774
					name = L["Order Hall Command Bar"],
					get = function(info) return E.global.general.commandBarSetting end,
775 776
					set = function(info, value) E.global.general.commandBarSetting = value; E:StaticPopup_Show('GLOBAL_RL') end,
					width = 'normal',
Simpy's avatar
Simpy committed
777
					values = {
Simpy's avatar
Simpy committed
778 779 780
						DISABLED = L["Disable"],
						ENABLED = L["Enable"],
						ENABLED_RESIZEPARENT = L["Enable + Adjust Movers"],
Simpy's avatar
Simpy committed
781 782
					},
				},
783
				questRewardMostValueIcon = {
784
					order = 13,
785
					type = 'toggle',
786 787
					name = L["Mark Quest Reward"],
					desc = L["Marks the most valuable quest reward with a gold coin."],
Repooc's avatar
Repooc committed
788
				},
789 790
				itemLevelInfo = {
					order = 14,
791 792
					name = L["Item Level"],
					type = 'group',
793
					inline = true,
Simpy's avatar
Simpy committed
794
					get = function(info) return E.db.general.itemLevel[info[#info]] end,
795 796 797
					args = {
						displayCharacterInfo = {
							order = 1,
798
							type = 'toggle',
799 800 801 802
							name = L["Display Character Info"],
							desc = L["Shows item level of each item, enchants, and gems on the character page."],
							set = function(info, value)
								E.db.general.itemLevel.displayCharacterInfo = value;
Simpy's avatar
:L  
Simpy committed
803
								Misc:ToggleItemLevelInfo()
804 805 806 807
							end
						},
						displayInspectInfo = {
							order = 2,
808
							type = 'toggle',
809 810 811 812
							name = L["Display Inspect Info"],
							desc = L["Shows item level of each item, enchants, and gems when inspecting another player."],
							set = function(info, value)
								E.db.general.itemLevel.displayInspectInfo = value;
Simpy's avatar
:L  
Simpy committed
813
								Misc:ToggleItemLevelInfo()
814 815
							end
						},
816
						fontGroup = {
817 818 819
							order = 3,
							type = 'group',
							name = L["Fonts"],
820
							disabled = function() return not E.db.general.itemLevel.displayCharacterInfo and not E.db.general.itemLevel.displayInspectInfo end,
Simpy's avatar
Simpy committed
821
							get = function(info) return E.db.general.itemLevel[info[#info]] end,
822
							set = function(info, value)
Simpy's avatar
Simpy committed
823
								E.db.general.itemLevel[info[#info]] = value
824 825
								Misc:UpdateInspectPageFonts('Character')
								Misc:UpdateInspectPageFonts('Inspect')
826
							end,
827
							args = {
828
								itemLevelFont = {
829
									order = 1,
830
									type = 'select',
831 832 833
									name = L["Font"],
									dialogControl = 'LSM30_Font',
									values = AceGUIWidgetLSMlists.font,
834
								},
835
								itemLevelFontSize = {
836
									order = 2,
837
									type = 'range',
Simpy's avatar
Simpy committed
838
									name = L["FONT_SIZE"],
839 840 841 842
									min = 4, max = 40, step = 1,
								},
								itemLevelFontOutline = {
									order = 3,
843
									type = 'select',
844
									name = L["Font Outline"],
Azilroka's avatar
Azilroka committed
845
									values = C.Values.FontFlags,
846 847 848 849 850
								},
							},
						},
					},
				},
851
				objectiveFrameGroup = {
Elv's avatar