Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 195.65 KB | None | 0 0
  1. local E, L, V, P, G = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
  2. local UF = E:GetModule('UnitFrames');
  3. local NP = E:GetModule("NamePlates")
  4. local _, ns = ...
  5. local ElvUF = ns.oUF
  6.  
  7. local tinsert = table.insert
  8. local twipe = table.wipe
  9. local RAID_CLASS_COLORS = RAID_CLASS_COLORS
  10. local CUSTOM_CLASS_COLORS = CUSTOM_CLASS_COLORS
  11.  
  12. local ACD = LibStub("AceConfigDialog-3.0-ElvUI")
  13. local fillValues = {
  14. ['fill'] = L["Filled"],
  15. ['spaced'] = L["Spaced"],
  16. ['inset'] = L["Inset"]
  17. };
  18.  
  19. local positionValues = {
  20. TOPLEFT = 'TOPLEFT',
  21. LEFT = 'LEFT',
  22. BOTTOMLEFT = 'BOTTOMLEFT',
  23. RIGHT = 'RIGHT',
  24. TOPRIGHT = 'TOPRIGHT',
  25. BOTTOMRIGHT = 'BOTTOMRIGHT',
  26. CENTER = 'CENTER',
  27. TOP = 'TOP',
  28. BOTTOM = 'BOTTOM',
  29. };
  30.  
  31. local threatValues = {
  32. ['GLOW'] = L["Glow"],
  33. ['BORDERS'] = L["Borders"],
  34. ['HEALTHBORDER'] = L["Health Border"],
  35. ["INFOPANELBORDER"] = L["InfoPanel Border"],
  36. ['ICONTOPLEFT'] = L["Icon: TOPLEFT"],
  37. ['ICONTOPRIGHT'] = L["Icon: TOPRIGHT"],
  38. ['ICONBOTTOMLEFT'] = L["Icon: BOTTOMLEFT"],
  39. ['ICONBOTTOMRIGHT'] = L["Icon: BOTTOMRIGHT"],
  40. ['ICONLEFT'] = L["Icon: LEFT"],
  41. ['ICONRIGHT'] = L["Icon: RIGHT"],
  42. ['ICONTOP'] = L["Icon: TOP"],
  43. ['ICONBOTTOM'] = L["Icon: BOTTOM"],
  44. ['NONE'] = NONE
  45. }
  46.  
  47. local petAnchors = {
  48. TOPLEFT = 'TOPLEFT',
  49. LEFT = 'LEFT',
  50. BOTTOMLEFT = 'BOTTOMLEFT',
  51. RIGHT = 'RIGHT',
  52. TOPRIGHT = 'TOPRIGHT',
  53. BOTTOMRIGHT = 'BOTTOMRIGHT',
  54. TOP = 'TOP',
  55. BOTTOM = 'BOTTOM',
  56. };
  57.  
  58. local auraBarsSortValues = {
  59. ['TIME_REMAINING'] = L["Time Remaining"],
  60. ['TIME_REMAINING_REVERSE'] = L["Time Remaining Reverse"],
  61. ['TIME_DURATION'] = L["Duration"],
  62. ['TIME_DURATION_REVERSE'] = L["Duration Reverse"],
  63. ['NAME'] = NAME,
  64. ['NONE'] = NONE,
  65. }
  66.  
  67. local auraSortValues = {
  68. ['TIME_REMAINING'] = L["Time Remaining"],
  69. ['DURATION'] = L["Duration"],
  70. ['NAME'] = NAME,
  71. ['INDEX'] = L["Index"],
  72. ["PLAYER"] = PLAYER,
  73. }
  74.  
  75. local auraSortMethodValues = {
  76. ['ASCENDING'] = L["Ascending"],
  77. ['DESCENDING'] = L["Descending"]
  78. }
  79.  
  80. local CUSTOMTEXT_CONFIGS = {}
  81.  
  82. -----------------------------------------------------------------------
  83. -- OPTIONS TABLES
  84. -----------------------------------------------------------------------
  85. local filters;
  86. local function GetOptionsTable_AuraBars(friendlyOnly, updateFunc, groupName)
  87. local config = {
  88. order = 1100,
  89. type = 'group',
  90. name = L["Aura Bars"],
  91. get = function(info) return E.db.unitframe.units[groupName]['aurabar'][ info[#info] ] end,
  92. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'][ info[#info] ] = value; updateFunc(UF, groupName) end,
  93. args = {
  94. enable = {
  95. type = 'toggle',
  96. order = 1,
  97. name = L["Enable"],
  98. },
  99. configureButton1 = {
  100. order = 2,
  101. name = L["Coloring"],
  102. desc = L["This opens the UnitFrames Color settings. These settings affect all unitframes."],
  103. type = 'execute',
  104. func = function() ACD:SelectGroup("ElvUI", "unitframe", "general", "allColorsGroup", "auraBars") end,
  105. },
  106. configureButton2 = {
  107. order = 3,
  108. name = L["Coloring (Specific)"],
  109. type = 'execute',
  110. func = function() E:SetToFilterConfig('AuraBar Colors') end,
  111. },
  112. anchorPoint = {
  113. type = 'select',
  114. order = 4,
  115. name = L["Anchor Point"],
  116. desc = L["What point to anchor to the frame you set to attach to."],
  117. values = {
  118. ['ABOVE'] = L["Above"],
  119. ['BELOW'] = L["Below"],
  120. },
  121. },
  122. attachTo = {
  123. type = 'select',
  124. order = 5,
  125. name = L["Attach To"],
  126. desc = L["The object you want to attach to."],
  127. values = {
  128. ['FRAME'] = L["Frame"],
  129. ['DEBUFFS'] = L["Debuffs"],
  130. ['BUFFS'] = L["Buffs"],
  131. },
  132. },
  133. height = {
  134. type = 'range',
  135. order = 6,
  136. name = L["Height"],
  137. min = 6, max = 40, step = 1,
  138. },
  139. maxBars = {
  140. type = 'range',
  141. order = 7,
  142. name = L["Max Bars"],
  143. min = 1, max = 40, step = 1,
  144. },
  145. sort = {
  146. type = 'select',
  147. order = 8,
  148. name = L["Sort Method"],
  149. values = auraBarsSortValues,
  150. },
  151. filters = {
  152. name = L["Filters"],
  153. guiInline = true,
  154. type = 'group',
  155. order = 500,
  156. args = {},
  157. },
  158. friendlyAuraType = {
  159. type = 'select',
  160. order = 16,
  161. name = L["Friendly Aura Type"],
  162. desc = L["Set the type of auras to show when a unit is friendly."],
  163. values = {
  164. ['HARMFUL'] = L["Debuffs"],
  165. ['HELPFUL'] = L["Buffs"],
  166. },
  167. },
  168. enemyAuraType = {
  169. type = 'select',
  170. order = 17,
  171. name = L["Enemy Aura Type"],
  172. desc = L["Set the type of auras to show when a unit is a foe."],
  173. values = {
  174. ['HARMFUL'] = L["Debuffs"],
  175. ['HELPFUL'] = L["Buffs"],
  176. },
  177. },
  178. uniformThreshold = {
  179. order = 18,
  180. type = "range",
  181. name = L["Uniform Threshold"],
  182. desc = L["Seconds remaining on the aura duration before the bar starts moving. Set to 0 to disable."],
  183. min = 0, max = 3600, step = 1,
  184. },
  185. },
  186. }
  187.  
  188. if groupName == "target" then
  189. config.args.attachTo.values['PLAYER_AURABARS'] = L["Player Frame Aura Bars"]
  190. end
  191.  
  192. if friendlyOnly then
  193. config.args.filters.args.playerOnly = {
  194. order = 10,
  195. type = 'toggle',
  196. name = L["Block Non-Personal Auras"],
  197. desc = L["Don't display auras that are not yours."],
  198. }
  199. config.args.filters.args.useBlacklist = {
  200. order = 11,
  201. type = 'toggle',
  202. name = L["Block Blacklisted Auras"],
  203. desc = L["Don't display any auras found on the 'Blacklist' filter."],
  204. }
  205. config.args.filters.args.useWhitelist = {
  206. order = 12,
  207. type = 'toggle',
  208. name = L["Allow Whitelisted Auras"],
  209. desc = L["If no other filter options are being used then it will block anything not on the 'Whitelist' filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  210. }
  211. config.args.filters.args.noDuration = {
  212. order = 13,
  213. type = 'toggle',
  214. name = L["Block Auras Without Duration"],
  215. desc = L["Don't display auras that have no duration."],
  216. }
  217. config.args.filters.args.onlyDispellable = {
  218. order = 14,
  219. type = 'toggle',
  220. name = L["Block Non-Dispellable Auras"],
  221. desc = L["Don't display auras that cannot be purged or dispelled by your class."],
  222. }
  223. --[[config.args.filters.args.selfBuffs = {
  224. order = 15,
  225. type = 'toggle',
  226. name = L["Allow Self Buffs"],
  227. }]]
  228. config.args.filters.args.useFilter = {
  229. order = 17,
  230. name = L["Additional Filter"],
  231. desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Block Non-Personal Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  232. type = 'select',
  233. values = function()
  234. filters = {}
  235. filters[''] = NONE
  236. for filter in pairs(E.global.unitframe['aurafilters']) do
  237. filters[filter] = filter
  238. end
  239. return filters
  240. end,
  241. }
  242. config.args.filters.args.additionalFilterAllowNonPersonal = {
  243. order = 18,
  244. type = 'toggle',
  245. name = L["Additional Filter Override"],
  246. desc = L["Allow non-personal auras from additional filter when 'Block Non-Personal Auras' is enabled."],
  247. }
  248. else
  249. config.args.filters.args.playerOnly = {
  250. order = 10,
  251. guiInline = true,
  252. type = 'group',
  253. name = L["Block Non-Personal Auras"],
  254. args = {
  255. friendly = {
  256. order = 2,
  257. type = 'toggle',
  258. name = L["Friendly"],
  259. desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."],
  260. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].playerOnly.friendly end,
  261. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].playerOnly.friendly = value; updateFunc(UF, groupName) end,
  262. },
  263. enemy = {
  264. order = 3,
  265. type = 'toggle',
  266. name = L["Enemy"],
  267. desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."],
  268. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].playerOnly.enemy end,
  269. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].playerOnly.enemy = value; updateFunc(UF, groupName) end,
  270. }
  271. },
  272. }
  273. config.args.filters.args.useBlacklist = {
  274. order = 11,
  275. guiInline = true,
  276. type = 'group',
  277. name = L["Block Blacklisted Auras"],
  278. args = {
  279. friendly = {
  280. order = 2,
  281. type = 'toggle',
  282. name = L["Friendly"],
  283. desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the 'Blacklist' filter."],
  284. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].useBlacklist.friendly end,
  285. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].useBlacklist.friendly = value; updateFunc(UF, groupName) end,
  286. },
  287. enemy = {
  288. order = 3,
  289. type = 'toggle',
  290. name = L["Enemy"],
  291. desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the 'Blacklist' filter."],
  292. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].useBlacklist.enemy end,
  293. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].useBlacklist.enemy = value; updateFunc(UF, groupName) end,
  294. }
  295. },
  296. }
  297. config.args.filters.args.useWhitelist = {
  298. order = 12,
  299. guiInline = true,
  300. type = 'group',
  301. name = L["Allow Whitelisted Auras"],
  302. args = {
  303. friendly = {
  304. order = 2,
  305. type = 'toggle',
  306. name = L["Friendly"],
  307. desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the 'Whitelist' filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  308. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].useWhitelist.friendly end,
  309. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].useWhitelist.friendly = value; updateFunc(UF, groupName) end,
  310. },
  311. enemy = {
  312. order = 3,
  313. type = 'toggle',
  314. name = L["Enemy"],
  315. desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the 'Whitelist' filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  316. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].useWhitelist.enemy end,
  317. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].useWhitelist.enemy = value; updateFunc(UF, groupName) end,
  318. }
  319. },
  320. }
  321. config.args.filters.args.noDuration = {
  322. order = 13,
  323. guiInline = true,
  324. type = 'group',
  325. name = L["Block Auras Without Duration"],
  326. args = {
  327. friendly = {
  328. order = 2,
  329. type = 'toggle',
  330. name = L["Friendly"],
  331. desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."],
  332. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].noDuration.friendly end,
  333. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].noDuration.friendly = value; updateFunc(UF, groupName) end,
  334. },
  335. enemy = {
  336. order = 3,
  337. type = 'toggle',
  338. name = L["Enemy"],
  339. desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."],
  340. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].noDuration.enemy end,
  341. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].noDuration.enemy = value; updateFunc(UF, groupName) end,
  342. }
  343. },
  344. }
  345. config.args.filters.args.onlyDispellable = {
  346. order = 14,
  347. guiInline = true,
  348. type = 'group',
  349. name = L["Block Non-Dispellable Auras"],
  350. args = {
  351. friendly = {
  352. order = 2,
  353. type = 'toggle',
  354. name = L["Friendly"],
  355. desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."],
  356. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].onlyDispellable.friendly end,
  357. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].onlyDispellable.friendly = value; updateFunc(UF, groupName) end,
  358. },
  359. enemy = {
  360. order = 3,
  361. type = 'toggle',
  362. name = L["Enemy"],
  363. desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."],
  364. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].onlyDispellable.enemy end,
  365. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].onlyDispellable.enemy = value; updateFunc(UF, groupName) end,
  366. }
  367. },
  368. }
  369. --[[config.args.filters.args.selfBuffs = {
  370. order = 15,
  371. guiInline = true,
  372. type = 'group',
  373. name = L["Allow Self-Buffs"],
  374. args = {
  375. friendly = {
  376. order = 2,
  377. type = 'toggle',
  378. name = L["Friendly"],
  379. desc = L["If the unit is friendly to you."].." "..L["Display self-buffs"],
  380. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].selfBuffs.friendly end,
  381. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].selfBuffs.friendly = value; updateFunc(UF, groupName) end,
  382. },
  383. enemy = {
  384. order = 3,
  385. type = 'toggle',
  386. name = L["Enemy"],
  387. desc = L["If the unit is an enemy to you."].." "..L["Display self-buffs"],
  388. get = function(info) return E.db.unitframe.units[groupName]['aurabar'].selfBuffs.enemy end,
  389. set = function(info, value) E.db.unitframe.units[groupName]['aurabar'].selfBuffs.enemy = value; updateFunc(UF, groupName) end,
  390. }
  391. },
  392. }]]
  393. config.args.filters.args.useFilter = {
  394. order = 17,
  395. name = L["Additional Filter"],
  396. desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Block Non-Personal Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  397. type = 'select',
  398. values = function()
  399. filters = {}
  400. filters[''] = NONE
  401. for filter in pairs(E.global.unitframe['aurafilters']) do
  402. filters[filter] = filter
  403. end
  404. return filters
  405. end,
  406. }
  407. config.args.filters.args.additionalFilterAllowNonPersonal = {
  408. order = 18,
  409. type = 'toggle',
  410. name = L["Additional Filter Override"],
  411. desc = L["Allow non-personal auras from additional filter when 'Block Non-Personal Auras' is enabled."],
  412. }
  413. end
  414.  
  415.  
  416. config.args.filters.args.maxDuration = {
  417. order = 16,
  418. type = 'range',
  419. name = L["Maximum Duration"],
  420. desc = L["Don't display auras that are longer than this duration (in seconds). Set to zero to disable."],
  421. min = 0, max = 3600, step = 1,
  422. }
  423.  
  424. return config
  425. end
  426.  
  427. local function GetOptionsTable_Auras(friendlyUnitOnly, auraType, isGroupFrame, updateFunc, groupName, numUnits)
  428. local config = {
  429. order = auraType == 'buffs' and 600 or 700,
  430. type = 'group',
  431. name = auraType == 'buffs' and L["Buffs"] or L["Debuffs"],
  432. get = function(info) return E.db.unitframe.units[groupName][auraType][ info[#info] ] end,
  433. set = function(info, value) E.db.unitframe.units[groupName][auraType][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  434. args = {
  435. enable = {
  436. type = 'toggle',
  437. order = 1,
  438. name = L["Enable"],
  439. },
  440. perrow = {
  441. type = 'range',
  442. order = 2,
  443. name = L["Per Row"],
  444. min = 1, max = 20, step = 1,
  445. },
  446. numrows = {
  447. type = 'range',
  448. order = 3,
  449. name = L["Num Rows"],
  450. min = 1, max = 10, step = 1,
  451. },
  452. sizeOverride = {
  453. type = 'range',
  454. order = 3,
  455. name = L["Size Override"],
  456. desc = L["If not set to 0 then override the size of the aura icon to this."],
  457. min = 0, max = 60, step = 1,
  458. },
  459. xOffset = {
  460. order = 4,
  461. type = 'range',
  462. name = L["xOffset"],
  463. min = -1000, max = 1000, step = 1,
  464. },
  465. yOffset = {
  466. order = 5,
  467. type = 'range',
  468. name = L["yOffset"],
  469. min = -1000, max = 1000, step = 1,
  470. },
  471. anchorPoint = {
  472. type = 'select',
  473. order = 8,
  474. name = L["Anchor Point"],
  475. desc = L["What point to anchor to the frame you set to attach to."],
  476. values = positionValues,
  477. },
  478. fontSize = {
  479. order = 9,
  480. name = L["Font Size"],
  481. type = "range",
  482. min = 6, max = 212, step = 1,
  483. },
  484. clickThrough = {
  485. order = 15,
  486. name = L["Click Through"],
  487. desc = L["Ignore mouse events."],
  488. type = 'toggle',
  489. },
  490. sortMethod = {
  491. order = 16,
  492. name = L["Sort By"],
  493. desc = L["Method to sort by."],
  494. type = 'select',
  495. values = auraSortValues,
  496. },
  497. sortDirection = {
  498. order = 16,
  499. name = L["Sort Direction"],
  500. desc = L["Ascending or Descending order."],
  501. type = 'select',
  502. values = auraSortMethodValues,
  503. },
  504. filters = {
  505. name = L["Filters"],
  506. guiInline = true,
  507. type = 'group',
  508. order = 500,
  509. args = {},
  510. },
  511. },
  512. }
  513.  
  514. if auraType == "buffs" then
  515. config.args.attachTo = {
  516. type = 'select',
  517. order = 7,
  518. name = L["Attach To"],
  519. desc = L["What to attach the buff anchor frame to."],
  520. values = {
  521. ['FRAME'] = L["Frame"],
  522. ['DEBUFFS'] = L["Debuffs"],
  523. ["HEALTH"] = L["Health"],
  524. ["POWER"] = L["Power"],
  525. },
  526. }
  527. else
  528. config.args.attachTo = {
  529. type = 'select',
  530. order = 7,
  531. name = L["Attach To"],
  532. desc = L["What to attach the debuff anchor frame to."],
  533. values = {
  534. ['FRAME'] = L["Frame"],
  535. ['BUFFS'] = L["Buffs"],
  536. ["HEALTH"] = L["Health"],
  537. ["POWER"] = L["Power"],
  538. },
  539. }
  540. end
  541.  
  542. if isGroupFrame then
  543. config.args.countFontSize = {
  544. order = 10,
  545. name = L["Count Font Size"],
  546. type = "range",
  547. min = 6, max = 212, step = 1,
  548. }
  549. end
  550.  
  551. if friendlyUnitOnly then
  552. config.args.filters.args.playerOnly = {
  553. order = 10,
  554. type = 'toggle',
  555. name = L["Block Non-Personal Auras"],
  556. desc = L["Don't display auras that are not yours."],
  557. }
  558. config.args.filters.args.useBlacklist = {
  559. order = 11,
  560. type = 'toggle',
  561. name = L["Block Blacklisted Auras"],
  562. desc = L["Don't display any auras found on the 'Blacklist' filter."],
  563. }
  564. config.args.filters.args.useWhitelist = {
  565. order = 12,
  566. type = 'toggle',
  567. name = L["Allow Whitelisted Auras"],
  568. desc = L["If no other filter options are being used then it will block anything not on the 'Whitelist' filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  569. }
  570. config.args.filters.args.noDuration = {
  571. order = 13,
  572. type = 'toggle',
  573. name = L["Block Auras Without Duration"],
  574. desc = L["Don't display auras that have no duration."],
  575. }
  576. config.args.filters.args.onlyDispellable = {
  577. order = 14,
  578. type = 'toggle',
  579. name = L["Block Non-Dispellable Auras"],
  580. desc = L["Don't display auras that cannot be purged or dispelled by your class."],
  581. }
  582.  
  583. config.args.filters.args.bossAuras = {
  584. order = 15,
  585. type = 'toggle',
  586. disabled = true,
  587. name = L["Allow Boss Encounter Auras"],
  588. desc = L["Allow auras considered to be part of a boss encounter."],
  589. }
  590.  
  591. config.args.filters.args.useFilter = {
  592. order = 16,
  593. name = L["Additional Filter"],
  594. desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Block Non-Personal Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  595. type = 'select',
  596. values = function()
  597. filters = {}
  598. filters[''] = NONE
  599. for filter in pairs(E.global.unitframe['aurafilters']) do
  600. filters[filter] = filter
  601. end
  602. return filters
  603. end,
  604. }
  605.  
  606. config.args.filters.args.additionalFilterAllowNonPersonal = {
  607. order = 17,
  608. type = 'toggle',
  609. name = L["Additional Filter Override"],
  610. desc = L["Allow non-personal auras from additional filter when 'Block Non-Personal Auras' is enabled."],
  611. }
  612. else
  613. config.args.filters.args.playerOnly = {
  614. order = 10,
  615. guiInline = true,
  616. type = 'group',
  617. name = L["Block Non-Personal Auras"],
  618. args = {
  619. friendly = {
  620. order = 2,
  621. type = 'toggle',
  622. name = L["Friendly"],
  623. desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."],
  624. get = function(info) return E.db.unitframe.units[groupName][auraType].playerOnly.friendly end,
  625. set = function(info, value) E.db.unitframe.units[groupName][auraType].playerOnly.friendly = value; updateFunc(UF, groupName, numUnits) end,
  626. },
  627. enemy = {
  628. order = 3,
  629. type = 'toggle',
  630. name = L["Enemy"],
  631. desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."],
  632. get = function(info) return E.db.unitframe.units[groupName][auraType].playerOnly.enemy end,
  633. set = function(info, value) E.db.unitframe.units[groupName][auraType].playerOnly.enemy = value; updateFunc(UF, groupName, numUnits) end,
  634. }
  635. },
  636. }
  637. config.args.filters.args.useBlacklist = {
  638. order = 11,
  639. guiInline = true,
  640. type = 'group',
  641. name = L["Block Blacklisted Auras"],
  642. args = {
  643. friendly = {
  644. order = 2,
  645. type = 'toggle',
  646. name = L["Friendly"],
  647. desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the 'Blacklist' filter."],
  648. get = function(info) return E.db.unitframe.units[groupName][auraType].useBlacklist.friendly end,
  649. set = function(info, value) E.db.unitframe.units[groupName][auraType].useBlacklist.friendly = value; updateFunc(UF, groupName, numUnits) end,
  650. },
  651. enemy = {
  652. order = 3,
  653. type = 'toggle',
  654. name = L["Enemy"],
  655. desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the 'Blacklist' filter."],
  656. get = function(info) return E.db.unitframe.units[groupName][auraType].useBlacklist.enemy end,
  657. set = function(info, value) E.db.unitframe.units[groupName][auraType].useBlacklist.enemy = value; updateFunc(UF, groupName, numUnits) end,
  658. }
  659. },
  660. }
  661. config.args.filters.args.useWhitelist = {
  662. order = 12,
  663. guiInline = true,
  664. type = 'group',
  665. name = L["Allow Whitelisted Auras"],
  666. args = {
  667. friendly = {
  668. order = 2,
  669. type = 'toggle',
  670. name = L["Friendly"],
  671. desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the 'Whitelist' filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  672. get = function(info) return E.db.unitframe.units[groupName][auraType].useWhitelist.friendly end,
  673. set = function(info, value) E.db.unitframe.units[groupName][auraType].useWhitelist.friendly = value; updateFunc(UF, groupName, numUnits) end,
  674. },
  675. enemy = {
  676. order = 3,
  677. type = 'toggle',
  678. name = L["Enemy"],
  679. desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the 'Whitelist' filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  680. get = function(info) return E.db.unitframe.units[groupName][auraType].useWhitelist.enemy end,
  681. set = function(info, value) E.db.unitframe.units[groupName][auraType].useWhitelist.enemy = value; updateFunc(UF, groupName, numUnits) end,
  682. }
  683. },
  684. }
  685. config.args.filters.args.noDuration = {
  686. order = 13,
  687. guiInline = true,
  688. type = 'group',
  689. name = L["Block Auras Without Duration"],
  690. args = {
  691. friendly = {
  692. order = 2,
  693. type = 'toggle',
  694. name = L["Friendly"],
  695. desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."],
  696. get = function(info) return E.db.unitframe.units[groupName][auraType].noDuration.friendly end,
  697. set = function(info, value) E.db.unitframe.units[groupName][auraType].noDuration.friendly = value; updateFunc(UF, groupName, numUnits) end,
  698. },
  699. enemy = {
  700. order = 3,
  701. type = 'toggle',
  702. name = L["Enemy"],
  703. desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."],
  704. get = function(info) return E.db.unitframe.units[groupName][auraType].noDuration.enemy end,
  705. set = function(info, value) E.db.unitframe.units[groupName][auraType].noDuration.enemy = value; updateFunc(UF, groupName, numUnits) end,
  706. }
  707. },
  708. }
  709. config.args.filters.args.onlyDispellable = {
  710. order = 13,
  711. guiInline = true,
  712. type = 'group',
  713. name = L["Block Non-Dispellable Auras"],
  714. args = {
  715. friendly = {
  716. order = 2,
  717. type = 'toggle',
  718. name = L["Friendly"],
  719. desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."],
  720. get = function(info) return E.db.unitframe.units[groupName][auraType].onlyDispellable.friendly end,
  721. set = function(info, value) E.db.unitframe.units[groupName][auraType].onlyDispellable.friendly = value; updateFunc(UF, groupName, numUnits) end,
  722. },
  723. enemy = {
  724. order = 3,
  725. type = 'toggle',
  726. name = L["Enemy"],
  727. desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."],
  728. get = function(info) return E.db.unitframe.units[groupName][auraType].onlyDispellable.enemy end,
  729. set = function(info, value) E.db.unitframe.units[groupName][auraType].onlyDispellable.enemy = value; updateFunc(UF, groupName, numUnits) end,
  730. }
  731. },
  732. }
  733.  
  734. config.args.filters.args.bossAuras = {
  735. order = 15,
  736. type = 'group',
  737. guiInline = true,
  738. name = L["Allow Boss Encounter Auras"],
  739. disabled = true,
  740. args = {
  741. friendly = {
  742. order = 1,
  743. type = 'toggle',
  744. name = L["Friendly"],
  745. desc = L["If the unit is friendly to you."].." "..L["Allow auras considered to be part of a boss encounter."],
  746. get = function(info) return E.db.unitframe.units[groupName][auraType].bossAuras.friendly end,
  747. set = function(info, value) E.db.unitframe.units[groupName][auraType].bossAuras.friendly = value; updateFunc(UF, groupName) end,
  748. },
  749. enemy = {
  750. order = 2,
  751. type = 'toggle',
  752. name = L["Enemy"],
  753. desc = L["If the unit is an enemy to you."].." "..L["Allow auras considered to be part of a boss encounter."],
  754. get = function(info) return E.db.unitframe.units[groupName][auraType].bossAuras.enemy end,
  755. set = function(info, value) E.db.unitframe.units[groupName][auraType].bossAuras.enemy = value; updateFunc(UF, groupName) end,
  756. }
  757. },
  758. }
  759. config.args.filters.args.useFilter = {
  760. order = 16,
  761. name = L["Additional Filter"],
  762. desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Block Non-Personal Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."],
  763. type = 'select',
  764. values = function()
  765. filters = {}
  766. filters[''] = NONE
  767. for filter in pairs(E.global.unitframe['aurafilters']) do
  768. filters[filter] = filter
  769. end
  770. return filters
  771. end,
  772. }
  773. config.args.filters.args.additionalFilterAllowNonPersonal = {
  774. order = 17,
  775. type = 'toggle',
  776. name = L["Additional Filter Override"],
  777. desc = L["Allow non-personal auras from additional filter when 'Block Non-Personal Auras' is enabled."],
  778. }
  779. end
  780.  
  781. return config
  782. end
  783.  
  784. local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits)
  785. local config = {
  786. order = 800,
  787. type = 'group',
  788. name = L["Castbar"],
  789. get = function(info) return E.db.unitframe.units[groupName]['castbar'][ info[#info] ] end,
  790. set = function(info, value) E.db.unitframe.units[groupName]['castbar'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  791. args = {
  792. matchsize = {
  793. order = 1,
  794. type = 'execute',
  795. name = L["Match Frame Width"],
  796. func = function() E.db.unitframe.units[groupName]['castbar']['width'] = E.db.unitframe.units[groupName]['width']; updateFunc(UF, groupName, numUnits) end,
  797. },
  798. forceshow = {
  799. order = 2,
  800. name = SHOW..' / '..HIDE,
  801. func = function()
  802. local frameName = E:StringTitle(groupName)
  803. frameName = "ElvUF_"..frameName
  804. frameName = frameName:gsub('t(arget)', 'T%1')
  805.  
  806. if numUnits then
  807. for i=1, numUnits do
  808. local castbar = _G[frameName..i].Castbar
  809. if not castbar.oldHide then
  810. castbar.oldHide = castbar.Hide
  811. castbar.Hide = castbar.Show
  812. castbar:Show()
  813. else
  814. castbar.Hide = castbar.oldHide
  815. castbar.oldHide = nil
  816. castbar:Hide()
  817. end
  818. end
  819. else
  820. local castbar = _G[frameName].Castbar
  821. if not castbar.oldHide then
  822. castbar.oldHide = castbar.Hide
  823. castbar.Hide = castbar.Show
  824. castbar:Show()
  825. else
  826. castbar.Hide = castbar.oldHide
  827. castbar.oldHide = nil
  828. castbar:Hide()
  829. end
  830. end
  831. end,
  832. type = 'execute',
  833. },
  834. configureButton = {
  835. order = 3,
  836. name = L["Coloring"],
  837. desc = L["This opens the UnitFrames Color settings. These settings affect all unitframes."],
  838. type = 'execute',
  839. func = function() ACD:SelectGroup("ElvUI", "unitframe", "general", "allColorsGroup", "castBars") end,
  840. },
  841. enable = {
  842. type = 'toggle',
  843. order = 4,
  844. name = L["Enable"],
  845. },
  846. width = {
  847. order = 5,
  848. name = L["Width"],
  849. type = 'range',
  850. softMax = 600,
  851. min = 50, max = GetScreenWidth(), step = 1,
  852. },
  853. height = {
  854. order = 6,
  855. name = L["Height"],
  856. type = 'range',
  857. min = 10, max = 85, step = 1,
  858. },
  859. latency = {
  860. order = 7,
  861. name = L["Latency"],
  862. type = 'toggle',
  863. },
  864. format = {
  865. order = 8,
  866. type = 'select',
  867. name = L["Format"],
  868. values = {
  869. ['CURRENTMAX'] = L["Current / Max"],
  870. ['CURRENT'] = L["Current"],
  871. ['REMAINING'] = L["Remaining"],
  872. },
  873. },
  874. spark = {
  875. order = 9,
  876. type = 'toggle',
  877. name = L["Spark"],
  878. desc = L["Display a spark texture at the end of the castbar statusbar to help show the differance between castbar and backdrop."],
  879. },
  880. insideInfoPanel = {
  881. order = 10,
  882. name = L["Inside Information Panel"],
  883. desc = L["Display the castbar inside the information panel, the icon will be displayed outside the main unitframe."],
  884. type = "toggle",
  885. disabled = function() return not E.db.unitframe.units[groupName].infoPanel or not E.db.unitframe.units[groupName].infoPanel.enable end,
  886. },
  887. iconSettings = {
  888. order = 13,
  889. type = "group",
  890. name = L["Icon"],
  891. guiInline = true,
  892. get = function(info) return E.db.unitframe.units[groupName]['castbar'][ info[#info] ] end,
  893. set = function(info, value) E.db.unitframe.units[groupName]['castbar'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  894. args = {
  895. icon = {
  896. order = 1,
  897. name = L["Enable"],
  898. type = 'toggle',
  899. },
  900. iconAttached = {
  901. order = 2,
  902. name = L["Icon Inside Castbar"],
  903. desc = L["Display the castbar icon inside the castbar."],
  904. type = "toggle",
  905. },
  906. iconSize = {
  907. order = 3,
  908. name = L["Icon Size"],
  909. desc = L["This dictates the size of the icon when it is not attached to the castbar."],
  910. type = "range",
  911. disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
  912. min = 8, max = 150, step = 1,
  913. },
  914. iconAttachedTo = {
  915. order = 4,
  916. type = "select",
  917. name = L["Attach To"],
  918. disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
  919. values = {
  920. ["Frame"] = L["Frame"],
  921. ["Castbar"] = L["Castbar"],
  922. },
  923. },
  924. iconPosition = {
  925. type = 'select',
  926. order = 5,
  927. name = L["Position"],
  928. values = positionValues,
  929. disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
  930. },
  931. iconXOffset = {
  932. order = 5,
  933. type = "range",
  934. name = L["xOffset"],
  935. min = -300, max = 300, step = 1,
  936. disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
  937. },
  938. iconYOffset = {
  939. order = 6,
  940. type = "range",
  941. name = L["yOffset"],
  942. min = -300, max = 300, step = 1,
  943. disabled = function() return E.db.unitframe.units[groupName].castbar.iconAttached end,
  944. },
  945. },
  946. },
  947. },
  948. }
  949.  
  950.  
  951. if hasTicks then
  952. config.args.ticks = {
  953. order = 11,
  954. type = 'toggle',
  955. name = L["Ticks"],
  956. desc = L["Display tick marks on the castbar for channelled spells. This will adjust automatically for spells like Drain Soul and add additional ticks based on haste."],
  957. }
  958. config.args.displayTarget = {
  959. order = 12,
  960. type = 'toggle',
  961. name = L["Display Target"],
  962. desc = L["Display the target of your current cast. Useful for mouseover casts."],
  963. }
  964. end
  965.  
  966. return config
  967. end
  968.  
  969.  
  970. local function GetOptionsTable_InformationPanel(updateFunc, groupName, numUnits)
  971.  
  972. local config = {
  973. order = 4000,
  974. type = 'group',
  975. name = L["Information Panel"],
  976. get = function(info) return E.db.unitframe.units[groupName]['infoPanel'][ info[#info] ] end,
  977. set = function(info, value) E.db.unitframe.units[groupName]['infoPanel'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  978. args = {
  979. enable = {
  980. type = 'toggle',
  981. order = 1,
  982. name = L["Enable"],
  983. },
  984. transparent = {
  985. type = "toggle",
  986. order = 2,
  987. name = L["Transparent"],
  988. },
  989. height = {
  990. type = 'range',
  991. order = 3,
  992. name = L["Height"],
  993. min = 4, max = 30, step = 1,
  994. },
  995. }
  996. }
  997.  
  998. return config
  999. end
  1000.  
  1001. local function GetOptionsTable_Health(isGroupFrame, updateFunc, groupName, numUnits)
  1002. local config = {
  1003. order = 100,
  1004. type = 'group',
  1005. name = L["Health"],
  1006. get = function(info) return E.db.unitframe.units[groupName]['health'][ info[#info] ] end,
  1007. set = function(info, value) E.db.unitframe.units[groupName]['health'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  1008. args = {
  1009. position = {
  1010. type = 'select',
  1011. order = 1,
  1012. name = L["Text Position"],
  1013. values = positionValues,
  1014. },
  1015. xOffset = {
  1016. order = 2,
  1017. type = 'range',
  1018. name = L["Text xOffset"],
  1019. desc = L["Offset position for text."],
  1020. min = -300, max = 300, step = 1,
  1021. },
  1022. yOffset = {
  1023. order = 3,
  1024. type = 'range',
  1025. name = L["Text yOffset"],
  1026. desc = L["Offset position for text."],
  1027. min = -300, max = 300, step = 1,
  1028. },
  1029. attachTextTo = {
  1030. type = 'select',
  1031. order = 4,
  1032. name = L["Attach Text To"],
  1033. values = {
  1034. ['Health'] = L["Health"],
  1035. ['Power'] = L["Power"],
  1036. ['InfoPanel'] = L["Information Panel"],
  1037. ['Frame'] = L["Frame"],
  1038. },
  1039. },
  1040. text_format = {
  1041. order = 100,
  1042. name = L["Text Format"],
  1043. type = 'input',
  1044. width = 'full',
  1045. desc = L["TEXT_FORMAT_DESC"],
  1046. },
  1047. configureButton = {
  1048. order = 5,
  1049. name = L["Coloring"],
  1050. desc = L["This opens the UnitFrames Color settings. These settings affect all unitframes."],
  1051. type = 'execute',
  1052. func = function() ACD:SelectGroup("ElvUI", "unitframe", "general", "allColorsGroup", "healthGroup") end,
  1053. },
  1054. },
  1055. }
  1056.  
  1057. if isGroupFrame then
  1058. config.args.frequentUpdates = {
  1059. type = 'toggle',
  1060. order = 2,
  1061. name = L["Frequent Updates"],
  1062. desc = L["Rapidly update the health, uses more memory and cpu. Only recommended for healing."],
  1063. }
  1064.  
  1065. config.args.orientation = {
  1066. type = 'select',
  1067. order = 3,
  1068. name = L["Statusbar Fill Orientation"],
  1069. desc = L["Direction the health bar moves when gaining/losing health."],
  1070. values = {
  1071. ['HORIZONTAL'] = L["Horizontal"],
  1072. ['VERTICAL'] = L["Vertical"],
  1073. },
  1074. }
  1075. end
  1076.  
  1077. return config
  1078. end
  1079.  
  1080.  
  1081. local function GetOptionsTable_CustomText(updateFunc, groupName, numUnits, orderOverride)
  1082. local config = {
  1083. order = orderOverride or 50,
  1084. name = L["Custom Texts"],
  1085. type = 'input',
  1086. width = 'full',
  1087. desc = L["Create a custom fontstring. Once you enter a name you will be able to select it from the elements dropdown list."],
  1088. get = function() return '' end,
  1089. set = function(info, textName)
  1090. for object, _ in pairs(E.db.unitframe.units[groupName]) do
  1091. if object:lower() == textName:lower() then
  1092. E:Print(L["The name you have selected is already in use by another element."])
  1093. return
  1094. end
  1095. end
  1096.  
  1097. if not E.db.unitframe.units[groupName].customTexts then
  1098. E.db.unitframe.units[groupName].customTexts = {};
  1099. end
  1100.  
  1101. local frameName = "ElvUF_"..E:StringTitle(groupName)
  1102. if E.db.unitframe.units[groupName].customTexts[textName] or (_G[frameName] and _G[frameName]["customTexts"] and _G[frameName]["customTexts"][textName] or _G[frameName.."Group1UnitButton1"] and _G[frameName.."Group1UnitButton1"]["customTexts"] and _G[frameName.."Group1UnitButton1"][textName]) then
  1103. E:Print(L["The name you have selected is already in use by another element."])
  1104. return;
  1105. end
  1106.  
  1107. E.db.unitframe.units[groupName].customTexts[textName] = {
  1108. ['text_format'] = '',
  1109. ['size'] = E.db.unitframe.fontSize,
  1110. ['font'] = E.db.unitframe.font,
  1111. ['xOffset'] = 0,
  1112. ['yOffset'] = 0,
  1113. ['justifyH'] = 'CENTER',
  1114. ['fontOutline'] = E.db.unitframe.fontOutline,
  1115. ['attachTextTo'] = 'Health'
  1116. };
  1117.  
  1118. UF:CreateCustomTextGroup(groupName, textName)
  1119. updateFunc(UF, groupName, numUnits)
  1120. end,
  1121. }
  1122.  
  1123. return config
  1124. end
  1125.  
  1126. local function GetOptionsTable_Name(updateFunc, groupName, numUnits)
  1127. local config = {
  1128. order = 400,
  1129. type = 'group',
  1130. name = L["Name"],
  1131. get = function(info) return E.db.unitframe.units[groupName]['name'][ info[#info] ] end,
  1132. set = function(info, value) E.db.unitframe.units[groupName]['name'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  1133. args = {
  1134. position = {
  1135. type = 'select',
  1136. order = 1,
  1137. name = L["Text Position"],
  1138. values = positionValues,
  1139. },
  1140. xOffset = {
  1141. order = 2,
  1142. type = 'range',
  1143. name = L["Text xOffset"],
  1144. desc = L["Offset position for text."],
  1145. min = -300, max = 300, step = 1,
  1146. },
  1147. yOffset = {
  1148. order = 3,
  1149. type = 'range',
  1150. name = L["Text yOffset"],
  1151. desc = L["Offset position for text."],
  1152. min = -300, max = 300, step = 1,
  1153. },
  1154. attachTextTo = {
  1155. type = 'select',
  1156. order = 4,
  1157. name = L["Attach Text To"],
  1158. values = {
  1159. ['Health'] = L["Health"],
  1160. ['Power'] = L["Power"],
  1161. ['InfoPanel'] = L["Information Panel"],
  1162. ['Frame'] = L["Frame"],
  1163. },
  1164. },
  1165. text_format = {
  1166. order = 100,
  1167. name = L["Text Format"],
  1168. type = 'input',
  1169. width = 'full',
  1170. desc = L["TEXT_FORMAT_DESC"],
  1171. },
  1172. },
  1173. }
  1174.  
  1175. return config
  1176. end
  1177.  
  1178. local function GetOptionsTable_Portrait(updateFunc, groupName, numUnits)
  1179. local config = {
  1180. order = 400,
  1181. type = 'group',
  1182. name = L["Portrait"],
  1183. get = function(info) return E.db.unitframe.units[groupName]['portrait'][ info[#info] ] end,
  1184. set = function(info, value) E.db.unitframe.units[groupName]['portrait'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  1185. args = {
  1186. enable = {
  1187. type = 'toggle',
  1188. order = 1,
  1189. name = L["Enable"],
  1190. desc = L["If you have a lot of 3D Portraits active then it will likely have a big impact on your FPS. Disable some portraits if you experience FPS issues."],
  1191. },
  1192. width = {
  1193. type = 'range',
  1194. order = 2,
  1195. name = L["Width"],
  1196. min = 15, max = 150, step = 1,
  1197. },
  1198. overlay = {
  1199. type = 'toggle',
  1200. name = L["Overlay"],
  1201. desc = L["Overlay the healthbar"],
  1202. order = 3,
  1203. },
  1204. rotation = {
  1205. type = 'range',
  1206. name = L["Model Rotation"],
  1207. order = 4,
  1208. min = 0, max = 360, step = 1,
  1209. },
  1210. camDistanceScale = {
  1211. type = 'range',
  1212. name = L["Camera Distance Scale"],
  1213. desc = L["How far away the portrait is from the camera."],
  1214. order = 5,
  1215. min = 0.01, max = 4, step = 0.01,
  1216. },
  1217. style = {
  1218. type = 'select',
  1219. name = L["Style"],
  1220. desc = L["Select the display method of the portrait."],
  1221. order = 6,
  1222. values = {
  1223. ['2D'] = L["2D"],
  1224. ['3D'] = L["3D"],
  1225. },
  1226. },
  1227. xOffset = {
  1228. order = 7,
  1229. type = "range",
  1230. name = L["xOffset"],
  1231. desc = L["Position the Model horizontally."],
  1232. min = -1, max = 1, step = 0.01,
  1233. },
  1234. yOffset = {
  1235. order = 8,
  1236. type = "range",
  1237. name = L["yOffset"],
  1238. desc = L["Position the Model vertically."],
  1239. min = -1, max = 1, step = 0.01,
  1240. },
  1241. },
  1242. }
  1243.  
  1244. return config
  1245. end
  1246.  
  1247. local function GetOptionsTable_Power(hasDetatchOption, updateFunc, groupName, numUnits, hasStrataLevel)
  1248. local config = {
  1249. order = 200,
  1250. type = 'group',
  1251. name = L["Power"],
  1252. get = function(info) return E.db.unitframe.units[groupName]['power'][ info[#info] ] end,
  1253. set = function(info, value) E.db.unitframe.units[groupName]['power'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  1254. args = {
  1255. enable = {
  1256. type = 'toggle',
  1257. order = 1,
  1258. name = L["Enable"],
  1259. },
  1260. text_format = {
  1261. order = 100,
  1262. name = L["Text Format"],
  1263. type = 'input',
  1264. width = 'full',
  1265. desc = L["TEXT_FORMAT_DESC"],
  1266. },
  1267. width = {
  1268. type = 'select',
  1269. order = 3,
  1270. name = L["Style"],
  1271. values = fillValues,
  1272. set = function(info, value)
  1273. E.db.unitframe.units[groupName]['power'][ info[#info] ] = value;
  1274.  
  1275. local frameName = E:StringTitle(groupName)
  1276. frameName = "ElvUF_"..frameName
  1277. frameName = frameName:gsub('t(arget)', 'T%1')
  1278.  
  1279. if numUnits then
  1280. for i=1, numUnits do
  1281. if _G[frameName..i] then
  1282. local v = _G[frameName..i].Power:GetValue()
  1283. local min, max = _G[frameName..i].Power:GetMinMaxValues()
  1284. _G[frameName..i].Power:SetMinMaxValues(min, max + 500)
  1285. _G[frameName..i].Power:SetValue(1)
  1286. _G[frameName..i].Power:SetValue(0)
  1287. end
  1288. end
  1289. else
  1290. if _G[frameName] and _G[frameName].Power then
  1291. local v = _G[frameName].Power:GetValue()
  1292. local min, max = _G[frameName].Power:GetMinMaxValues()
  1293. _G[frameName].Power:SetMinMaxValues(min, max + 500)
  1294. _G[frameName].Power:SetValue(1)
  1295. _G[frameName].Power:SetValue(0)
  1296. else
  1297. for i=1, _G[frameName]:GetNumChildren() do
  1298. local child = select(i, _G[frameName]:GetChildren())
  1299. if child and child.Power then
  1300. local v = child.Power:GetValue()
  1301. local min, max = child.Power:GetMinMaxValues()
  1302. child.Power:SetMinMaxValues(min, max + 500)
  1303. child.Power:SetValue(1)
  1304. child.Power:SetValue(0)
  1305. end
  1306. end
  1307. end
  1308. end
  1309.  
  1310. updateFunc(UF, groupName, numUnits)
  1311. end,
  1312. },
  1313. height = {
  1314. type = 'range',
  1315. name = L["Height"],
  1316. order = 4,
  1317. min = ((E.db.unitframe.thinBorders or E.PixelMode) and 3 or 7), max = 50, step = 1,
  1318. },
  1319. offset = {
  1320. type = 'range',
  1321. name = L["Offset"],
  1322. desc = L["Offset of the powerbar to the healthbar, set to 0 to disable."],
  1323. order = 5,
  1324. min = 0, max = 20, step = 1,
  1325. },
  1326. configureButton = {
  1327. order = 6,
  1328. name = L["Coloring"],
  1329. desc = L["This opens the UnitFrames Color settings. These settings affect all unitframes."],
  1330. type = 'execute',
  1331. func = function() ACD:SelectGroup("ElvUI", "unitframe", "general", "allColorsGroup", "powerGroup") end,
  1332. },
  1333. position = {
  1334. type = 'select',
  1335. order = 7,
  1336. name = L["Text Position"],
  1337. values = positionValues,
  1338. },
  1339. xOffset = {
  1340. order = 8,
  1341. type = 'range',
  1342. name = L["Text xOffset"],
  1343. desc = L["Offset position for text."],
  1344. min = -300, max = 300, step = 1,
  1345. },
  1346. yOffset = {
  1347. order = 9,
  1348. type = 'range',
  1349. name = L["Text yOffset"],
  1350. desc = L["Offset position for text."],
  1351. min = -300, max = 300, step = 1,
  1352. },
  1353. attachTextTo = {
  1354. type = 'select',
  1355. order = 10,
  1356. name = L["Attach Text To"],
  1357. values = {
  1358. ['Health'] = L["Health"],
  1359. ['Power'] = L["Power"],
  1360. ['InfoPanel'] = L["Information Panel"],
  1361. ['Frame'] = L["Frame"],
  1362. },
  1363. },
  1364. },
  1365. }
  1366.  
  1367. if hasDetatchOption then
  1368. config.args.detachFromFrame = {
  1369. type = 'toggle',
  1370. order = 11,
  1371. name = L["Detach From Frame"],
  1372. }
  1373. config.args.detachedWidth = {
  1374. type = 'range',
  1375. order = 12,
  1376. name = L["Detached Width"],
  1377. disabled = function() return not E.db.unitframe.units[groupName].power.detachFromFrame end,
  1378. min = 15, max = 450, step = 1,
  1379. }
  1380. config.args.parent = {
  1381. type = 'select',
  1382. order = 13,
  1383. name = L["Parent"],
  1384. desc = L["Choose UIPARENT to prevent it from hiding with the unitframe."],
  1385. disabled = function() return not E.db.unitframe.units[groupName].power.detachFromFrame end,
  1386. values = {
  1387. ["FRAME"] = "FRAME",
  1388. ["UIPARENT"] = "UIPARENT",
  1389. },
  1390. }
  1391. end
  1392.  
  1393. if hasStrataLevel then
  1394. config.args.strataAndLevel = {
  1395. order = 101,
  1396. type = "group",
  1397. name = L["Strata and Level"],
  1398. get = function(info) return E.db.unitframe.units[groupName]['power']["strataAndLevel"][ info[#info] ] end,
  1399. set = function(info, value) E.db.unitframe.units[groupName]['power']["strataAndLevel"][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  1400. guiInline = true,
  1401. args = {
  1402. useCustomStrata = {
  1403. order = 1,
  1404. type = "toggle",
  1405. name = L["Use Custom Strata"],
  1406. },
  1407. frameStrata = {
  1408. order = 2,
  1409. type = "select",
  1410. name = L["Frame Strata"],
  1411. values = {
  1412. ["BACKGROUND"] = "BACKGROUND",
  1413. ["LOW"] = "LOW",
  1414. ["MEDIUM"] = "MEDIUM",
  1415. ["HIGH"] = "HIGH",
  1416. ["DIALOG"] = "DIALOG",
  1417. ["TOOLTIP"] = "TOOLTIP",
  1418. },
  1419. },
  1420. spacer = {
  1421. order = 3,
  1422. type = "description",
  1423. name = "",
  1424. },
  1425. useCustomLevel = {
  1426. order = 4,
  1427. type = "toggle",
  1428. name = L["Use Custom Level"],
  1429. },
  1430. frameLevel = {
  1431. order = 5,
  1432. type = "range",
  1433. name = L["Frame Level"],
  1434. min = 2, max = 128, step = 1,
  1435. },
  1436. },
  1437. }
  1438. end
  1439.  
  1440. return config
  1441. end
  1442.  
  1443. local function GetOptionsTable_RaidIcon(updateFunc, groupName, numUnits)
  1444. local config = {
  1445. order = 5000,
  1446. type = 'group',
  1447. name = L["Raid Icon"],
  1448. get = function(info) return E.db.unitframe.units[groupName]['raidicon'][ info[#info] ] end,
  1449. set = function(info, value) E.db.unitframe.units[groupName]['raidicon'][ info[#info] ] = value; updateFunc(UF, groupName, numUnits) end,
  1450. args = {
  1451. enable = {
  1452. type = 'toggle',
  1453. order = 1,
  1454. name = L["Enable"],
  1455. },
  1456. attachTo = {
  1457. type = 'select',
  1458. order = 2,
  1459. name = L["Position"],
  1460. values = positionValues,
  1461. },
  1462. attachToObject = {
  1463. type = 'select',
  1464. order = 4,
  1465. name = L["Attach To"],
  1466. values = {
  1467. ['Health'] = L["Health"],
  1468. ['Power'] = L["Power"],
  1469. ['InfoPanel'] = L["Information Panel"],
  1470. ['Frame'] = L["Frame"],
  1471. },
  1472. },
  1473. size = {
  1474. type = 'range',
  1475. name = L["Size"],
  1476. order = 3,
  1477. min = 8, max = 60, step = 1,
  1478. },
  1479. xOffset = {
  1480. order = 4,
  1481. type = 'range',
  1482. name = L["xOffset"],
  1483. min = -300, max = 300, step = 1,
  1484. },
  1485. yOffset = {
  1486. order = 5,
  1487. type = 'range',
  1488. name = L["yOffset"],
  1489. min = -300, max = 300, step = 1,
  1490. },
  1491. },
  1492. }
  1493.  
  1494. return config
  1495. end
  1496.  
  1497. local function GetOptionsTable_RaidDebuff(updateFunc, groupName)
  1498. local config = {
  1499. order = 800,
  1500. type = 'group',
  1501. name = L["RaidDebuff Indicator"],
  1502. get = function(info) return E.db.unitframe.units[groupName]['rdebuffs'][ info[#info] ] end,
  1503. set = function(info, value) E.db.unitframe.units[groupName]['rdebuffs'][ info[#info] ] = value; updateFunc(UF, groupName) end,
  1504. args = {
  1505. enable = {
  1506. order = 1,
  1507. type = 'toggle',
  1508. name = L["Enable"],
  1509. },
  1510. showDispellableDebuff = {
  1511. order = 2,
  1512. type = "toggle",
  1513. name = L["Show Dispellable Debuffs"],
  1514. },
  1515. size = {
  1516. order = 3,
  1517. type = 'range',
  1518. name = L["Size"],
  1519. min = 8, max = 100, step = 1,
  1520. },
  1521. font = {
  1522. order = 4,
  1523. type = "select", dialogControl = "LSM30_Font",
  1524. name = L["Font"],
  1525. values = AceGUIWidgetLSMlists.font,
  1526. },
  1527. fontSize = {
  1528. order = 5,
  1529. type = 'range',
  1530. name = L["Font Size"],
  1531. min = 7, max = 212, step = 1,
  1532. },
  1533. fontOutline = {
  1534. order = 6,
  1535. type = "select",
  1536. name = L["Font Outline"],
  1537. values = {
  1538. ["NONE"] = L["None"],
  1539. ["OUTLINE"] = "OUTLINE",
  1540. ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
  1541. ["THICKOUTLINE"] = "THICKOUTLINE",
  1542. },
  1543. },
  1544. xOffset = {
  1545. order = 7,
  1546. type = 'range',
  1547. name = L["xOffset"],
  1548. min = -300, max = 300, step = 1,
  1549. },
  1550. yOffset = {
  1551. order = 8,
  1552. type = 'range',
  1553. name = L["yOffset"],
  1554. min = -300, max = 300, step = 1,
  1555. },
  1556. configureButton = {
  1557. order = 9,
  1558. type = 'execute',
  1559. name = L["Configure Auras"],
  1560. func = function() E:SetToFilterConfig('RaidDebuffs') end,
  1561. },
  1562. duration = {
  1563. order = 11,
  1564. type = "group",
  1565. guiInline = true,
  1566. name = L["Duration Text"],
  1567. get = function(info) return E.db.unitframe.units[groupName]['rdebuffs']['duration'][ info[#info] ] end,
  1568. set = function(info, value) E.db.unitframe.units[groupName]['rdebuffs']['duration'][ info[#info] ] = value; updateFunc(UF, groupName) end,
  1569. args = {
  1570. position = {
  1571. order = 1,
  1572. type = "select",
  1573. name = L["Position"],
  1574. values = {
  1575. ["TOP"] = "TOP",
  1576. ["LEFT"] = "LEFT",
  1577. ["RIGHT"] = "RIGHT",
  1578. ["BOTTOM"] = "BOTTOM",
  1579. ["CENTER"] = "CENTER",
  1580. ["TOPLEFT"] = "TOPLEFT",
  1581. ["TOPRIGHT"] = "TOPRIGHT",
  1582. ["BOTTOMLEFT"] = "BOTTOMLEFT",
  1583. ["BOTTOMRIGHT"] = "BOTTOMRIGHT",
  1584. },
  1585. },
  1586. xOffset = {
  1587. order = 2,
  1588. type = "range",
  1589. name = L["xOffset"],
  1590. min = -10, max = 10, step = 1,
  1591. },
  1592. yOffset = {
  1593. order = 3,
  1594. type = "range",
  1595. name = L["yOffset"],
  1596. min = -10, max = 10, step = 1,
  1597. },
  1598. color = {
  1599. order = 4,
  1600. type = "color",
  1601. name = L["Color"],
  1602. get = function(info)
  1603. local c = E.db.unitframe.units.raid.rdebuffs.duration.color
  1604. local d = P.unitframe.units.raid.rdebuffs.duration.color
  1605. return c.r, c.g, c.b, c.a, d.r, d.g, d.b
  1606. end,
  1607. set = function(info, r, g, b)
  1608. local c = E.db.unitframe.units.raid.rdebuffs.duration.color
  1609. c.r, c.g, c.b = r, g, b
  1610. UF:CreateAndUpdateHeaderGroup('raid')
  1611. end,
  1612. },
  1613. },
  1614. },
  1615. stack = {
  1616. order = 11,
  1617. type = "group",
  1618. guiInline = true,
  1619. name = L["Stack Counter"],
  1620. get = function(info) return E.db.unitframe.units[groupName]['rdebuffs']['stack'][ info[#info] ] end,
  1621. set = function(info, value) E.db.unitframe.units[groupName]['rdebuffs']['stack'][ info[#info] ] = value; updateFunc(UF, groupName) end,
  1622. args = {
  1623. position = {
  1624. order = 1,
  1625. type = "select",
  1626. name = L["Position"],
  1627. values = {
  1628. ["TOP"] = "TOP",
  1629. ["LEFT"] = "LEFT",
  1630. ["RIGHT"] = "RIGHT",
  1631. ["BOTTOM"] = "BOTTOM",
  1632. ["CENTER"] = "CENTER",
  1633. ["TOPLEFT"] = "TOPLEFT",
  1634. ["TOPRIGHT"] = "TOPRIGHT",
  1635. ["BOTTOMLEFT"] = "BOTTOMLEFT",
  1636. ["BOTTOMRIGHT"] = "BOTTOMRIGHT",
  1637. },
  1638. },
  1639. xOffset = {
  1640. order = 2,
  1641. type = "range",
  1642. name = L["xOffset"],
  1643. min = -10, max = 10, step = 1,
  1644. },
  1645. yOffset = {
  1646. order = 3,
  1647. type = "range",
  1648. name = L["yOffset"],
  1649. min = -10, max = 10, step = 1,
  1650. },
  1651. color = {
  1652. order = 4,
  1653. type = "color",
  1654. name = L["Color"],
  1655. get = function(info)
  1656. local c = E.db.unitframe.units[groupName].rdebuffs.stack.color
  1657. local d = P.unitframe.units[groupName].rdebuffs.stack.color
  1658. return c.r, c.g, c.b, c.a, d.r, d.g, d.b
  1659. end,
  1660. set = function(info, r, g, b)
  1661. local c = E.db.unitframe.units[groupName].rdebuffs.stack.color
  1662. c.r, c.g, c.b = r, g, b
  1663. updateFunc(UF, groupName)
  1664. end,
  1665. },
  1666. },
  1667. },
  1668. },
  1669. }
  1670.  
  1671. return config
  1672. end
  1673.  
  1674. function UF:CreateCustomTextGroup(unit, objectName)
  1675. if not E.Options.args.unitframe.args[unit] then
  1676. return
  1677. elseif E.Options.args.unitframe.args[unit].args[objectName] then
  1678. E.Options.args.unitframe.args[unit].args[objectName].hidden = false -- Re-show existing custom texts which belong to current profile and were previously hidden
  1679. tinsert(CUSTOMTEXT_CONFIGS, E.Options.args.unitframe.args[unit].args[objectName]) --Register this custom text config to be hidden again on profile change
  1680. return
  1681. end
  1682.  
  1683. E.Options.args.unitframe.args[unit].args[objectName] = {
  1684. order = -1,
  1685. type = 'group',
  1686. name = objectName,
  1687. get = function(info) return E.db.unitframe.units[unit].customTexts[objectName][ info[#info] ] end,
  1688. set = function(info, value)
  1689. E.db.unitframe.units[unit].customTexts[objectName][ info[#info] ] = value;
  1690.  
  1691. if unit == 'party' or unit:find('raid') then
  1692. UF:CreateAndUpdateHeaderGroup(unit)
  1693. elseif unit == 'boss' then
  1694. UF:CreateAndUpdateUFGroup('boss', MAX_BOSS_FRAMES)
  1695. elseif unit == 'arena' then
  1696. UF:CreateAndUpdateUFGroup('arena', 5)
  1697. else
  1698. UF:CreateAndUpdateUF(unit)
  1699. end
  1700. end,
  1701. args = {
  1702. delete = {
  1703. type = 'execute',
  1704. order = 1,
  1705. name = DELETE,
  1706. func = function()
  1707. E.Options.args.unitframe.args[unit].args[objectName] = nil;
  1708. E.db.unitframe.units[unit].customTexts[objectName] = nil;
  1709.  
  1710. if unit == 'boss' or unit == 'arena' then
  1711. for i=1, 5 do
  1712. if UF[unit..i] then
  1713. UF[unit..i]:Tag(UF[unit..i]["customTexts"][objectName], '');
  1714. UF[unit..i]["customTexts"][objectName]:Hide();
  1715. end
  1716. end
  1717. elseif unit == 'party' or unit:find('raid') then
  1718. for i=1, UF[unit]:GetNumChildren() do
  1719. local child = select(i, UF[unit]:GetChildren())
  1720. if child.Tag then
  1721. child:Tag(child["customTexts"][objectName], '');
  1722. child["customTexts"][objectName]:Hide();
  1723. else
  1724. for x=1, child:GetNumChildren() do
  1725. local c2 = select(x, child:GetChildren())
  1726. if(c2.Tag) then
  1727. c2:Tag(c2["customTexts"][objectName], '');
  1728. c2["customTexts"][objectName]:Hide();
  1729. end
  1730. end
  1731. end
  1732. end
  1733. elseif UF[unit] then
  1734. UF[unit]:Tag(UF[unit]["customTexts"][objectName], '');
  1735. UF[unit]["customTexts"][objectName]:Hide();
  1736. end
  1737. end,
  1738. },
  1739. font = {
  1740. type = "select", dialogControl = 'LSM30_Font',
  1741. order = 2,
  1742. name = L["Font"],
  1743. values = AceGUIWidgetLSMlists.font,
  1744. },
  1745. size = {
  1746. order = 3,
  1747. name = L["Font Size"],
  1748. type = "range",
  1749. min = 4, max = 212, step = 1,
  1750. },
  1751. fontOutline = {
  1752. order = 4,
  1753. name = L["Font Outline"],
  1754. desc = L["Set the font outline."],
  1755. type = "select",
  1756. values = {
  1757. ['NONE'] = L["None"],
  1758. ['OUTLINE'] = 'OUTLINE',
  1759.  
  1760. ['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
  1761. ['THICKOUTLINE'] = 'THICKOUTLINE',
  1762. },
  1763. },
  1764. justifyH = {
  1765. order = 5,
  1766. type = 'select',
  1767. name = L["JustifyH"],
  1768. desc = L["Sets the font instance's horizontal text alignment style."],
  1769. values = {
  1770. ['CENTER'] = L["Center"],
  1771. ['LEFT'] = L["Left"],
  1772. ['RIGHT'] = L["Right"],
  1773. },
  1774. },
  1775. xOffset = {
  1776. order = 6,
  1777. type = 'range',
  1778. name = L["xOffset"],
  1779. min = -400, max = 400, step = 1,
  1780. },
  1781. yOffset = {
  1782. order = 7,
  1783. type = 'range',
  1784. name = L["yOffset"],
  1785. min = -400, max = 400, step = 1,
  1786. },
  1787. attachTextTo = {
  1788. type = 'select',
  1789. order = 8,
  1790. name = L["Attach Text To"],
  1791. values = {
  1792. ['Health'] = L["Health"],
  1793. ['Power'] = L["Power"],
  1794. ['InfoPanel'] = L["Information Panel"],
  1795. ['Frame'] = L["Frame"],
  1796. },
  1797. },
  1798. text_format = {
  1799. order = 100,
  1800. name = L["Text Format"],
  1801. type = 'input',
  1802. width = 'full',
  1803. desc = L["TEXT_FORMAT_DESC"],
  1804. },
  1805. },
  1806. }
  1807.  
  1808. tinsert(CUSTOMTEXT_CONFIGS, E.Options.args.unitframe.args[unit].args[objectName]) --Register this custom text config to be hidden on profile change
  1809. end
  1810.  
  1811. E.Options.args.unitframe = {
  1812. type = "group",
  1813. name = L["UnitFrames"],
  1814. childGroups = "tree",
  1815. get = function(info) return E.db.unitframe[ info[#info] ] end,
  1816. set = function(info, value) E.db.unitframe[ info[#info] ] = value end,
  1817. args = {
  1818. enable = {
  1819. order = 1,
  1820. type = "toggle",
  1821. name = L["Enable"],
  1822. get = function(info) return E.private.unitframe.enable end,
  1823. set = function(info, value) E.private.unitframe.enable = value; E:StaticPopup_Show("PRIVATE_RL") end
  1824. },
  1825. general = {
  1826. order = 200,
  1827. type = 'group',
  1828. name = L["General"],
  1829. guiInline = true,
  1830. disabled = function() return not E.private.unitframe.enable end,
  1831. set = function(info, value) E.db.unitframe[ info[#info] ] = value; UF:Update_AllFrames() end,
  1832. args = {
  1833. disabledBlizzardFrames = {
  1834. order = 1,
  1835. type = "group",
  1836. guiInline = true,
  1837. name = L["Disabled Blizzard Frames"],
  1838. get = function(info) return E.private.unitframe.disabledBlizzardFrames[ info[#info] ] end,
  1839. set = function(info, value) E.private["unitframe"].disabledBlizzardFrames[ info[#info] ] = value; E:StaticPopup_Show("PRIVATE_RL") end,
  1840. args = {
  1841. player = {
  1842. order = 1,
  1843. type = 'toggle',
  1844. name = L["Player Frame"],
  1845. desc = L["Disables the player and pet unitframes."],
  1846. },
  1847. target = {
  1848. order = 2,
  1849. type = 'toggle',
  1850. name = L["Target Frame"],
  1851. desc = L["Disables the target and target of target unitframes."],
  1852. },
  1853. focus = {
  1854. order = 3,
  1855. type = 'toggle',
  1856. name = L["Focus Frame"],
  1857. desc = L["Disables the focus and target of focus unitframes."],
  1858. },
  1859. boss = {
  1860. order = 4,
  1861. type = 'toggle',
  1862. name = L["Boss Frames"],
  1863. },
  1864. arena = {
  1865. order = 5,
  1866. type = 'toggle',
  1867. name = L["Arena Frames"],
  1868. },
  1869. party = {
  1870. order = 6,
  1871. type = 'toggle',
  1872. name = L["Party Frames"],
  1873. },
  1874. raid = {
  1875. order = 7,
  1876. type = 'toggle',
  1877. name = L["Raid Frames"],
  1878. },
  1879. },
  1880. },
  1881. generalGroup = {
  1882. order = 2,
  1883. type = 'group',
  1884. guiInline = true,
  1885. name = L["General"],
  1886. args = {
  1887. thinBorders = {
  1888. order = 1,
  1889. name = L["Thin Borders"],
  1890. desc = L["Use thin borders on certain unitframe elements."],
  1891. type = 'toggle',
  1892. disabled = function() return E.private.general.pixelPerfect end,
  1893. set = function(info, value) E.db.unitframe[ info[#info] ] = value; E:StaticPopup_Show("CONFIG_RL") end,
  1894. },
  1895. OORAlpha = {
  1896. order = 2,
  1897. name = L["OOR Alpha"],
  1898. desc = L["The alpha to set units that are out of range to."],
  1899. type = 'range',
  1900. min = 0, max = 1, step = 0.01,
  1901. },
  1902. debuffHighlighting = {
  1903. order = 3,
  1904. name = L["Debuff Highlighting"],
  1905. desc = L["Color the unit healthbar if there is a debuff that can be dispelled by you."],
  1906. type = 'select',
  1907. values = {
  1908. ['NONE'] = NONE,
  1909. ['GLOW'] = L["Glow"],
  1910. ['FILL'] = L["Fill"]
  1911. },
  1912. },
  1913. smartRaidFilter = {
  1914. order = 4,
  1915. name = L["Smart Raid Filter"],
  1916. desc = L["Override any custom visibility setting in certain situations, EX: Only show groups 1 and 2 inside a 10 man instance."],
  1917. type = 'toggle',
  1918. set = function(info, value) E.db.unitframe[ info[#info] ] = value; UF:UpdateAllHeaders() end
  1919. },
  1920. targetOnMouseDown = {
  1921. order = 5,
  1922. name = L["Target On Mouse-Down"],
  1923. desc = L["Target units on mouse down rather than mouse up. \n\n|cffFF0000Warning: If you are using the addon 'Clique' you may have to adjust your clique settings when changing this."],
  1924. type = "toggle",
  1925. },
  1926. auraBlacklistModifier = {
  1927. order = 6,
  1928. type = "select",
  1929. name = L["Blacklist Modifier"],
  1930. desc = L["You need to hold this modifier down in order to blacklist an aura by right-clicking the icon. Set to None to disable the blacklist functionality."],
  1931. values = {
  1932. ['NONE'] = NONE,
  1933. ['SHIFT'] = SHIFT_KEY,
  1934. ['ALT'] = ALT_KEY,
  1935. ['CTRL'] = CTRL_KEY,
  1936. },
  1937. }
  1938. },
  1939. },
  1940. barGroup = {
  1941. order = 3,
  1942. type = 'group',
  1943. guiInline = true,
  1944. name = L["Bars"],
  1945. args = {
  1946. smoothbars = {
  1947. type = 'toggle',
  1948. order = 2,
  1949. name = L["Smooth Bars"],
  1950. desc = L["Bars will transition smoothly."],
  1951. set = function(info, value) E.db.unitframe[ info[#info] ] = value; UF:Update_AllFrames(); end,
  1952. },
  1953. statusbar = {
  1954. type = "select", dialogControl = 'LSM30_Statusbar',
  1955. order = 3,
  1956. name = L["StatusBar Texture"],
  1957. desc = L["Main statusbar texture."],
  1958. values = AceGUIWidgetLSMlists.statusbar,
  1959. set = function(info, value) E.db.unitframe[ info[#info] ] = value; UF:Update_StatusBars() end,
  1960. },
  1961. },
  1962. },
  1963. fontGroup = {
  1964. order = 4,
  1965. type = 'group',
  1966. guiInline = true,
  1967. name = L["Fonts"],
  1968. args = {
  1969. font = {
  1970. type = "select", dialogControl = 'LSM30_Font',
  1971. order = 4,
  1972. name = L["Default Font"],
  1973. desc = L["The font that the unitframes will use."],
  1974. values = AceGUIWidgetLSMlists.font,
  1975. set = function(info, value) E.db.unitframe[ info[#info] ] = value; UF:Update_FontStrings() end,
  1976. },
  1977. fontSize = {
  1978. order = 5,
  1979. name = L["Font Size"],
  1980. desc = L["Set the font size for unitframes."],
  1981. type = "range",
  1982. min = 4, max = 212, step = 1,
  1983. set = function(info, value) E.db.unitframe[ info[#info] ] = value; UF:Update_FontStrings() end,
  1984. },
  1985. fontOutline = {
  1986. order = 6,
  1987. name = L["Font Outline"],
  1988. desc = L["Set the font outline."],
  1989. type = "select",
  1990. values = {
  1991. ['NONE'] = L["None"],
  1992. ['OUTLINE'] = 'OUTLINE',
  1993.  
  1994. ['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
  1995. ['THICKOUTLINE'] = 'THICKOUTLINE',
  1996. },
  1997. set = function(info, value) E.db.unitframe[ info[#info] ] = value; UF:Update_FontStrings() end,
  1998. },
  1999. },
  2000. },
  2001. allColorsGroup = {
  2002. order = 5,
  2003. type = 'group',
  2004. guiInline = true,
  2005. name = L["Colors"],
  2006. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2007. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2008. args = {
  2009. generalGroup = {
  2010. order = 1,
  2011. type = "group",
  2012. guiInline = true,
  2013. name = L["General"],
  2014. args = {
  2015. borderColor = {
  2016. order = 1,
  2017. type = "color",
  2018. name = L["Border Color"],
  2019. get = function(info)
  2020. local t = E.db.unitframe.colors.borderColor
  2021. local d = P.unitframe.colors.borderColor
  2022. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2023. end,
  2024. set = function(info, r, g, b)
  2025. local t = E.db.unitframe.colors.borderColor
  2026. t.r, t.g, t.b = r, g, b
  2027. E:UpdateMedia()
  2028. E:UpdateBorderColors()
  2029. end,
  2030. },
  2031. },
  2032. },
  2033. healthGroup = {
  2034. order = 7,
  2035. type = 'group',
  2036. guiInline = true,
  2037. name = HEALTH,
  2038. get = function(info)
  2039. local t = E.db.unitframe.colors[ info[#info] ]
  2040. local d = P.unitframe.colors[ info[#info] ]
  2041. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2042. end,
  2043. set = function(info, r, g, b)
  2044. local t = E.db.unitframe.colors[ info[#info] ]
  2045. t.r, t.g, t.b = r, g, b
  2046. UF:Update_AllFrames()
  2047. end,
  2048. args = {
  2049. healthclass = {
  2050. order = 1,
  2051. type = 'toggle',
  2052. name = L["Class Health"],
  2053. desc = L["Color health by classcolor or reaction."],
  2054. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2055. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2056. },
  2057. forcehealthreaction = {
  2058. order = 2,
  2059. type = 'toggle',
  2060. name = L["Force Reaction Color"],
  2061. desc = L["Forces reaction color instead of class color on units controlled by players."],
  2062. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2063. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2064. disabled = function() return not E.db.unitframe.colors.healthclass end,
  2065. },
  2066. colorhealthbyvalue = {
  2067. order = 3,
  2068. type = 'toggle',
  2069. name = L["Health By Value"],
  2070. desc = L["Color health by amount remaining."],
  2071. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2072. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2073. },
  2074. customhealthbackdrop = {
  2075. order = 4,
  2076. type = 'toggle',
  2077. name = L["Custom Health Backdrop"],
  2078. desc = L["Use the custom health backdrop color instead of a multiple of the main health color."],
  2079. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2080. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2081. },
  2082. classbackdrop = {
  2083. order = 5,
  2084. type = 'toggle',
  2085. name = L["Class Backdrop"],
  2086. desc = L["Color the health backdrop by class or reaction."],
  2087. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2088. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2089. },
  2090. transparentHealth = {
  2091. order = 6,
  2092. type = 'toggle',
  2093. name = L["Transparent"],
  2094. desc = L["Make textures transparent."],
  2095. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2096. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2097. },
  2098. useDeadBackdrop = {
  2099. order = 7,
  2100. type = "toggle",
  2101. name = L["Use Dead Backdrop"],
  2102. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2103. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2104. },
  2105. health = {
  2106. order = 10,
  2107. type = 'color',
  2108. name = L["Health"],
  2109. },
  2110. health_backdrop = {
  2111. order = 11,
  2112. type = 'color',
  2113. name = L["Health Backdrop"],
  2114. },
  2115. tapped = {
  2116. order = 12,
  2117. type = 'color',
  2118. name = L["Tapped"],
  2119. },
  2120. disconnected = {
  2121. order = 13,
  2122. type = 'color',
  2123. name = L["Disconnected"],
  2124. },
  2125. health_backdrop_dead = {
  2126. order = 14,
  2127. type = "color",
  2128. name = L["Custom Dead Backdrop"],
  2129. desc = L["Use this backdrop color for units that are dead or ghosts."],
  2130. },
  2131. },
  2132. },
  2133. powerGroup = {
  2134. order = 8,
  2135. type = 'group',
  2136. guiInline = true,
  2137. name = L["Powers"],
  2138. get = function(info)
  2139. local t = E.db.unitframe.colors.power[ info[#info] ]
  2140. local d = P.unitframe.colors.power[ info[#info] ]
  2141. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2142. end,
  2143. set = function(info, r, g, b)
  2144. local t = E.db.unitframe.colors.power[ info[#info] ]
  2145. t.r, t.g, t.b = r, g, b
  2146. UF:Update_AllFrames()
  2147. NP:ConfigureAll()
  2148. end,
  2149. args = {
  2150. powerclass = {
  2151. order = 0,
  2152. type = 'toggle',
  2153. name = L["Class Power"],
  2154. desc = L["Color power by classcolor or reaction."],
  2155. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2156. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2157. },
  2158. transparentPower = {
  2159. order = 1,
  2160. type = 'toggle',
  2161. name = L["Transparent"],
  2162. desc = L["Make textures transparent."],
  2163. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2164. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2165. },
  2166. MANA = {
  2167. order = 2,
  2168. name = MANA,
  2169. type = 'color',
  2170. },
  2171. RAGE = {
  2172. order = 3,
  2173. name = RAGE,
  2174. type = 'color',
  2175. },
  2176. FOCUS = {
  2177. order = 4,
  2178. name = FOCUS,
  2179. type = 'color',
  2180. },
  2181. ENERGY = {
  2182. order = 5,
  2183. name = ENERGY,
  2184. type = 'color',
  2185. },
  2186. RUNIC_POWER = {
  2187. order = 6,
  2188. name = RUNIC_POWER,
  2189. type = 'color',
  2190. },
  2191. PAIN = {
  2192. order = 7,
  2193. name = PAIN,
  2194. type = 'color',
  2195. },
  2196. FURY = {
  2197. order = 7,
  2198. name = FURY,
  2199. type = 'color',
  2200. },
  2201. LUNAR_POWER = {
  2202. order = 8,
  2203. name = LUNAR_POWER,
  2204. type = 'color'
  2205. },
  2206. INSANITY = {
  2207. order = 9,
  2208. name = INSANITY,
  2209. type = 'color'
  2210. },
  2211. MAELSTROM = {
  2212. order = 10,
  2213. name = MAELSTROM,
  2214. type = 'color'
  2215. },
  2216. },
  2217. },
  2218. reactionGroup = {
  2219. order = 9,
  2220. type = 'group',
  2221. guiInline = true,
  2222. name = L["Reactions"],
  2223. get = function(info)
  2224. local t = E.db.unitframe.colors.reaction[ info[#info] ]
  2225. local d = P.unitframe.colors.reaction[ info[#info] ]
  2226. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2227. end,
  2228. set = function(info, r, g, b)
  2229. local t = E.db.unitframe.colors.reaction[ info[#info] ]
  2230. t.r, t.g, t.b = r, g, b
  2231. UF:Update_AllFrames()
  2232. end,
  2233. args = {
  2234. BAD = {
  2235. order = 1,
  2236. name = L["Bad"],
  2237. type = 'color',
  2238. },
  2239. NEUTRAL = {
  2240. order = 2,
  2241. name = L["Neutral"],
  2242. type = 'color',
  2243. },
  2244. GOOD = {
  2245. order = 3,
  2246. name = L["Good"],
  2247. type = 'color',
  2248. },
  2249. },
  2250. },
  2251. castBars = {
  2252. order = 10,
  2253. type = 'group',
  2254. guiInline = true,
  2255. name = L["Castbar"],
  2256. get = function(info)
  2257. local t = E.db.unitframe.colors[ info[#info] ]
  2258. local d = P.unitframe.colors[ info[#info] ]
  2259. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2260. end,
  2261. set = function(info, r, g, b)
  2262. local t = E.db.unitframe.colors[ info[#info] ]
  2263. t.r, t.g, t.b = r, g, b
  2264. UF:Update_AllFrames()
  2265. end,
  2266. args = {
  2267. castClassColor = {
  2268. order = 0,
  2269. type = 'toggle',
  2270. name = L["Class Castbars"],
  2271. desc = L["Color castbars by the class of player units."],
  2272. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2273. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2274. },
  2275. castReactionColor = {
  2276. order = 0,
  2277. type = 'toggle',
  2278. name = L["Reaction Castbars"],
  2279. desc = L["Color castbars by the reaction type of non-player units."],
  2280. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2281. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2282. },
  2283. transparentCastbar = {
  2284. order = 2,
  2285. type = 'toggle',
  2286. name = L["Transparent"],
  2287. desc = L["Make textures transparent."],
  2288. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2289. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2290. },
  2291. castColor = {
  2292. order = 3,
  2293. name = L["Interruptable"],
  2294. type = 'color',
  2295. },
  2296. castNoInterrupt = {
  2297. order = 4,
  2298. name = L["Non-Interruptable"],
  2299. type = 'color',
  2300. },
  2301. },
  2302. },
  2303. auraBars = {
  2304. order = 11,
  2305. type = 'group',
  2306. guiInline = true,
  2307. name = L["Aura Bars"],
  2308. args = {
  2309. transparentAurabars = {
  2310. order = 0,
  2311. type = 'toggle',
  2312. name = L["Transparent"],
  2313. desc = L["Make textures transparent."],
  2314. get = function(info) return E.db.unitframe.colors[ info[#info] ] end,
  2315. set = function(info, value) E.db.unitframe.colors[ info[#info] ] = value; UF:Update_AllFrames() end,
  2316. },
  2317. auraBarByType = {
  2318. order = 1,
  2319. name = L["By Type"],
  2320. desc = L["Color aurabar debuffs by type."],
  2321. type = 'toggle',
  2322. },
  2323. auraBarTurtle = {
  2324. order = 2,
  2325. name = L["Color Turtle Buffs"],
  2326. desc = L["Color all buffs that reduce the unit's incoming damage."],
  2327. type = 'toggle',
  2328. },
  2329. BUFFS = {
  2330. order = 10,
  2331. name = L["Buffs"],
  2332. type = 'color',
  2333. get = function(info)
  2334. local t = E.db.unitframe.colors.auraBarBuff
  2335. local d = P.unitframe.colors.auraBarBuff
  2336. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2337. end,
  2338. set = function(info, r, g, b)
  2339. if E:CheckClassColor(r, g, b) then
  2340. local classColor = E.myclass == 'PRIEST' and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
  2341. r = classColor.r
  2342. g = classColor.g
  2343. b = classColor.b
  2344. end
  2345.  
  2346. local t = E.db.unitframe.colors.auraBarBuff
  2347. t.r, t.g, t.b = r, g, b
  2348.  
  2349. UF:Update_AllFrames()
  2350. end,
  2351. },
  2352. DEBUFFS = {
  2353. order = 11,
  2354. name = L["Debuffs"],
  2355. type = 'color',
  2356. get = function(info)
  2357. local t = E.db.unitframe.colors.auraBarDebuff
  2358. local d = P.unitframe.colors.auraBarDebuff
  2359. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2360. end,
  2361. set = function(info, r, g, b)
  2362. local t = E.db.unitframe.colors.auraBarDebuff
  2363. t.r, t.g, t.b = r, g, b
  2364. UF:Update_AllFrames()
  2365. end,
  2366. },
  2367. auraBarTurtleColor = {
  2368. order = 12,
  2369. name = L["Turtle Color"],
  2370. type = 'color',
  2371. get = function(info)
  2372. local t = E.db.unitframe.colors.auraBarTurtleColor
  2373. local d = P.unitframe.colors.auraBarTurtleColor
  2374. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  2375. end,
  2376. set = function(info, r, g, b)
  2377. local t = E.db.unitframe.colors.auraBarTurtleColor
  2378. t.r, t.g, t.b = r, g, b
  2379. UF:Update_AllFrames()
  2380. end,
  2381. },
  2382. },
  2383. },
  2384. healPrediction = {
  2385. order = 12,
  2386. name = L["Heal Prediction"],
  2387. type = 'group',
  2388. get = function(info)
  2389. local t = E.db.unitframe.colors.healPrediction[ info[#info] ]
  2390. local d = P.unitframe.colors.healPrediction[ info[#info] ]
  2391. return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a
  2392. end,
  2393. set = function(info, r, g, b, a)
  2394. local t = E.db.unitframe.colors.healPrediction[ info[#info] ]
  2395. t.r, t.g, t.b, t.a = r, g, b, a
  2396. UF:Update_AllFrames()
  2397. end,
  2398. args = {
  2399. personal = {
  2400. order = 1,
  2401. name = L["Personal"],
  2402. type = 'color',
  2403. hasAlpha = true,
  2404. },
  2405. others = {
  2406. order = 2,
  2407. name = L["Others"],
  2408. type = 'color',
  2409. hasAlpha = true,
  2410. },
  2411. absorbs = {
  2412. order = 2,
  2413. name = L["Absorbs"],
  2414. type = 'color',
  2415. hasAlpha = true,
  2416. },
  2417. healAbsorbs = {
  2418. order = 3,
  2419. name = L["Heal Absorbs"],
  2420. type = 'color',
  2421. hasAlpha = true,
  2422. },
  2423. maxOverflow = {
  2424. order = 4,
  2425. type = "range",
  2426. name = L["Max Overflow"],
  2427. desc = L["Max amount of overflow allowed to extend past the end of the health bar."],
  2428. isPercent = true,
  2429. min = 0, max = 1, step = 0.01,
  2430. get = function(info) return E.db.unitframe.colors.healPrediction.maxOverflow end,
  2431. set = function(info, value) E.db.unitframe.colors.healPrediction.maxOverflow = value; UF:Update_AllFrames() end,
  2432. },
  2433. },
  2434. },
  2435. },
  2436. },
  2437. },
  2438. },
  2439. },
  2440. }
  2441.  
  2442. --Player
  2443. E.Options.args.unitframe.args.player = {
  2444. name = L["Player Frame"],
  2445. type = 'group',
  2446. order = 300,
  2447. childGroups = "select",
  2448. get = function(info) return E.db.unitframe.units['player'][ info[#info] ] end,
  2449. set = function(info, value) E.db.unitframe.units['player'][ info[#info] ] = value; UF:CreateAndUpdateUF('player') end,
  2450. args = {
  2451. copyFrom = {
  2452. type = 'select',
  2453. order = 1,
  2454. name = L["Copy From"],
  2455. desc = L["Select a unit to copy settings from."],
  2456. values = UF['units'],
  2457. set = function(info, value) UF:MergeUnitSettings(value, 'player'); end,
  2458. },
  2459. resetSettings = {
  2460. type = 'execute',
  2461. order = 2,
  2462. name = L["Restore Defaults"],
  2463. func = function(info, value) UF:ResetUnitSettings('player'); E:ResetMovers('Player Frame') end,
  2464. },
  2465. showAuras = {
  2466. order = 3,
  2467. type = 'execute',
  2468. name = L["Show Auras"],
  2469. func = function()
  2470. local frame = ElvUF_Player
  2471. if frame.forceShowAuras then
  2472. frame.forceShowAuras = nil;
  2473. else
  2474. frame.forceShowAuras = true;
  2475. end
  2476.  
  2477. UF:CreateAndUpdateUF('player')
  2478. end,
  2479. },
  2480. enable = {
  2481. type = 'toggle',
  2482. order = 4,
  2483. name = L["Enable"],
  2484. set = function(info, value)
  2485. E.db.unitframe.units['player'][ info[#info] ] = value;
  2486. UF:CreateAndUpdateUF('player');
  2487. if value == true and E.db.unitframe.units.player.combatfade then
  2488. ElvUF_Pet:SetParent(ElvUF_Player)
  2489. else
  2490. ElvUF_Pet:SetParent(ElvUF_Parent)
  2491. end
  2492. end,
  2493. },
  2494. width = {
  2495. order = 5,
  2496. name = L["Width"],
  2497. type = 'range',
  2498. min = 50, max = 500, step = 1,
  2499. set = function(info, value)
  2500. if E.db.unitframe.units['player'].castbar.width == E.db.unitframe.units['player'][ info[#info] ] then
  2501. E.db.unitframe.units['player'].castbar.width = value;
  2502. end
  2503.  
  2504. E.db.unitframe.units['player'][ info[#info] ] = value;
  2505. UF:CreateAndUpdateUF('player');
  2506. end,
  2507. },
  2508. height = {
  2509. order = 6,
  2510. name = L["Height"],
  2511. type = 'range',
  2512. min = 10, max = 250, step = 1,
  2513. },
  2514. combatfade = {
  2515. order = 7,
  2516. name = L["Combat Fade"],
  2517. desc = L["Fade the unitframe when out of combat, not casting, no target exists."],
  2518. type = 'toggle',
  2519. set = function(info, value)
  2520. E.db.unitframe.units['player'][ info[#info] ] = value;
  2521. UF:CreateAndUpdateUF('player');
  2522. if value == true and E.db.unitframe.units.player.enable then
  2523. ElvUF_Pet:SetParent(ElvUF_Player)
  2524. else
  2525. ElvUF_Pet:SetParent(ElvUF_Parent)
  2526. end
  2527. end,
  2528. },
  2529. healPrediction = {
  2530. order = 8,
  2531. name = L["Heal Prediction"],
  2532. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  2533. type = 'toggle',
  2534. },
  2535. hideonnpc = {
  2536. type = 'toggle',
  2537. order = 9,
  2538. name = L["Text Toggle On NPC"],
  2539. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  2540. get = function(info) return E.db.unitframe.units['player']['power'].hideonnpc end,
  2541. set = function(info, value) E.db.unitframe.units['player']['power'].hideonnpc = value; UF:CreateAndUpdateUF('player') end,
  2542. },
  2543. restIcon = {
  2544. order = 10,
  2545. name = L["Rest Icon"],
  2546. desc = L["Display the rested icon on the unitframe."],
  2547. type = 'toggle',
  2548. },
  2549. combatIcon = {
  2550. order = 11,
  2551. name = L["Combat Icon"],
  2552. desc = L["Display the combat icon on the unitframe."],
  2553. type = 'toggle',
  2554. },
  2555. threatStyle = {
  2556. type = 'select',
  2557. order = 12,
  2558. name = L["Threat Display Mode"],
  2559. values = threatValues,
  2560. },
  2561. smartAuraPosition = {
  2562. order = 13,
  2563. type = "select",
  2564. name = L["Smart Aura Position"],
  2565. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  2566. values = {
  2567. ["DISABLED"] = L["Disabled"],
  2568. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  2569. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  2570. },
  2571. },
  2572. orientation = {
  2573. order = 14,
  2574. type = "select",
  2575. name = L["Frame Orientation"],
  2576. desc = L["Set the orientation of the UnitFrame."],
  2577. values = {
  2578. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  2579. ["LEFT"] = L["Left"],
  2580. ["MIDDLE"] = L["Middle"],
  2581. ["RIGHT"] = L["Right"],
  2582. },
  2583. },
  2584. colorOverride = {
  2585. order = 15,
  2586. name = L["Class Color Override"],
  2587. desc = L["Override the default class color setting."],
  2588. type = 'select',
  2589. values = {
  2590. ['USE_DEFAULT'] = L["Use Default"],
  2591. ['FORCE_ON'] = L["Force On"],
  2592. ['FORCE_OFF'] = L["Force Off"],
  2593. },
  2594. },
  2595. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'player'),
  2596. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'player'),
  2597. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'player'),
  2598. power = GetOptionsTable_Power(true, UF.CreateAndUpdateUF, 'player', nil, true),
  2599. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'player'),
  2600. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'player'),
  2601. buffs = GetOptionsTable_Auras(true, 'buffs', false, UF.CreateAndUpdateUF, 'player'),
  2602. debuffs = GetOptionsTable_Auras(true, 'debuffs', false, UF.CreateAndUpdateUF, 'player'),
  2603. castbar = GetOptionsTable_Castbar(true, UF.CreateAndUpdateUF, 'player'),
  2604. aurabar = GetOptionsTable_AuraBars(true, UF.CreateAndUpdateUF, 'player'),
  2605. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, 'player'),
  2606. classbar = {
  2607. order = 1000,
  2608. type = 'group',
  2609. name = L["Classbar"],
  2610. get = function(info) return E.db.unitframe.units['player']['classbar'][ info[#info] ] end,
  2611. set = function(info, value) E.db.unitframe.units['player']['classbar'][ info[#info] ] = value; UF:CreateAndUpdateUF('player') end,
  2612. args = {
  2613. enable = {
  2614. type = 'toggle',
  2615. order = 1,
  2616. name = L["Enable"],
  2617. },
  2618. height = {
  2619. type = 'range',
  2620. order = 2,
  2621. name = L["Height"],
  2622. min = ((E.db.unitframe.thinBorders or E.PixelMode) and 3 or 7),
  2623. max = (E.db.unitframe.units['player']['classbar'].detachFromFrame and 300 or 30),
  2624. step = 1,
  2625. },
  2626. fill = {
  2627. type = 'select',
  2628. order = 3,
  2629. name = L["Fill"],
  2630. values = {
  2631. ['fill'] = L["Filled"],
  2632. ['spaced'] = L["Spaced"],
  2633. },
  2634. },
  2635. autoHide = {
  2636. order = 4,
  2637. type = 'toggle',
  2638. name = L["Auto-Hide"],
  2639. },
  2640. additionalPowerText = {
  2641. order = 5,
  2642. type = "toggle",
  2643. name = L["Additional Power Text"],
  2644. },
  2645. detachFromFrame = {
  2646. type = 'toggle',
  2647. order = 7,
  2648. name = L["Detach From Frame"],
  2649. set = function(info, value)
  2650. if value == true then
  2651. E.Options.args.unitframe.args.player.args.classbar.args.height.max = 300
  2652. else
  2653. E.Options.args.unitframe.args.player.args.classbar.args.height.max = 30
  2654. end
  2655. E.db.unitframe.units['player']['classbar'][ info[#info] ] = value;
  2656. UF:CreateAndUpdateUF('player')
  2657. end,
  2658. },
  2659. verticalOrientation = {
  2660. order = 8,
  2661. type = "toggle",
  2662. name = L["Vertical Orientation"],
  2663. disabled = function() return not E.db.unitframe.units['player']['classbar'].detachFromFrame end,
  2664. },
  2665. detachedWidth = {
  2666. type = 'range',
  2667. order = 9,
  2668. name = L["Detached Width"],
  2669. disabled = function() return not E.db.unitframe.units['player']['classbar'].detachFromFrame end,
  2670. min = ((E.db.unitframe.thinBorders or E.PixelMode) and 3 or 7), max = 800, step = 1,
  2671. },
  2672. parent = {
  2673. type = 'select',
  2674. order = 10,
  2675. name = L["Parent"],
  2676. desc = L["Choose UIPARENT to prevent it from hiding with the unitframe."],
  2677. disabled = function() return not E.db.unitframe.units['player']['classbar'].detachFromFrame end,
  2678. values = {
  2679. ["FRAME"] = "FRAME",
  2680. ["UIPARENT"] = "UIPARENT",
  2681. },
  2682. },
  2683. strataAndLevel = {
  2684. order = 20,
  2685. type = "group",
  2686. name = L["Strata and Level"],
  2687. get = function(info) return E.db.unitframe.units['player']['classbar']["strataAndLevel"][ info[#info] ] end,
  2688. set = function(info, value) E.db.unitframe.units['player']['classbar']["strataAndLevel"][ info[#info] ] = value; UF:CreateAndUpdateUF('player') end,
  2689. guiInline = true,
  2690. disabled = function() return not E.db.unitframe.units['player']['classbar'].detachFromFrame end,
  2691. hidden = function() return not E.db.unitframe.units['player']['classbar'].detachFromFrame end,
  2692. args = {
  2693. useCustomStrata = {
  2694. order = 1,
  2695. type = "toggle",
  2696. name = L["Use Custom Strata"],
  2697. },
  2698. frameStrata = {
  2699. order = 2,
  2700. type = "select",
  2701. name = L["Frame Strata"],
  2702. values = {
  2703. ["BACKGROUND"] = "BACKGROUND",
  2704. ["LOW"] = "LOW",
  2705. ["MEDIUM"] = "MEDIUM",
  2706. ["HIGH"] = "HIGH",
  2707. ["DIALOG"] = "DIALOG",
  2708. ["TOOLTIP"] = "TOOLTIP",
  2709. },
  2710. },
  2711. spacer = {
  2712. order = 3,
  2713. type = "description",
  2714. name = "",
  2715. },
  2716. useCustomLevel = {
  2717. order = 4,
  2718. type = "toggle",
  2719. name = L["Use Custom Level"],
  2720. },
  2721. frameLevel = {
  2722. order = 5,
  2723. type = "range",
  2724. name = L["Frame Level"],
  2725. min = 2, max = 128, step = 1,
  2726. },
  2727. },
  2728. },
  2729. },
  2730. },
  2731. pvpIcon = {
  2732. order = 449,
  2733. type = 'group',
  2734. name = L["PvP & Prestige Icon"],
  2735. get = function(info) return E.db.unitframe.units['player']['pvpIcon'][ info[#info] ] end,
  2736. set = function(info, value) E.db.unitframe.units['player']['pvpIcon'][ info[#info] ] = value; UF:CreateAndUpdateUF('player') end,
  2737. args = {
  2738. enable = {
  2739. order = 1,
  2740. type = "toggle",
  2741. name = L["Enable"],
  2742. },
  2743. scale = {
  2744. order = 2,
  2745. type = "range",
  2746. name = L["Scale"],
  2747. isPercent = true,
  2748. min = 0.1, max = 2, step = 0.01,
  2749. },
  2750. spacer = {
  2751. order = 3,
  2752. type = "description",
  2753. name = " ",
  2754. },
  2755. anchorPoint = {
  2756. order = 4,
  2757. type = "select",
  2758. name = L["Anchor Point"],
  2759. values = positionValues,
  2760. },
  2761. xOffset = {
  2762. order = 5,
  2763. type = "range",
  2764. name = L["X-Offset"],
  2765. min = -100, max = 100, step = 1,
  2766. },
  2767. yOffset = {
  2768. order = 6,
  2769. type = "range",
  2770. name = L["Y-Offset"],
  2771. min = -100, max = 100, step = 1,
  2772. },
  2773. },
  2774. },
  2775. pvpText = {
  2776. order = 450,
  2777. type = 'group',
  2778. name = L["PvP Text"],
  2779. get = function(info) return E.db.unitframe.units['player']['pvp'][ info[#info] ] end,
  2780. set = function(info, value) E.db.unitframe.units['player']['pvp'][ info[#info] ] = value; UF:CreateAndUpdateUF('player') end,
  2781. args = {
  2782. position = {
  2783. type = 'select',
  2784. order = 2,
  2785. name = L["Position"],
  2786. values = positionValues,
  2787. },
  2788. text_format = {
  2789. order = 100,
  2790. name = L["Text Format"],
  2791. type = 'input',
  2792. width = 'full',
  2793. desc = L["TEXT_FORMAT_DESC"],
  2794. },
  2795. },
  2796. },
  2797. },
  2798. }
  2799.  
  2800. --Target
  2801. E.Options.args.unitframe.args.target = {
  2802. name = L["Target Frame"],
  2803. type = 'group',
  2804. order = 400,
  2805. childGroups = "select",
  2806. get = function(info) return E.db.unitframe.units['target'][ info[#info] ] end,
  2807. set = function(info, value) E.db.unitframe.units['target'][ info[#info] ] = value; UF:CreateAndUpdateUF('target') end,
  2808. args = {
  2809. copyFrom = {
  2810. type = 'select',
  2811. order = 1,
  2812. name = L["Copy From"],
  2813. desc = L["Select a unit to copy settings from."],
  2814. values = UF['units'],
  2815. set = function(info, value) UF:MergeUnitSettings(value, 'target'); end,
  2816. },
  2817. resetSettings = {
  2818. type = 'execute',
  2819. order = 2,
  2820. name = L["Restore Defaults"],
  2821. func = function(info, value) UF:ResetUnitSettings('target'); E:ResetMovers('Target Frame') end,
  2822. },
  2823. showAuras = {
  2824. order = 3,
  2825. type = 'execute',
  2826. name = L["Show Auras"],
  2827. func = function()
  2828. local frame = ElvUF_Target
  2829. if frame.forceShowAuras then
  2830. frame.forceShowAuras = nil;
  2831. else
  2832. frame.forceShowAuras = true;
  2833. end
  2834.  
  2835. UF:CreateAndUpdateUF('target')
  2836. end,
  2837. },
  2838. enable = {
  2839. type = 'toggle',
  2840. order = 4,
  2841. name = L["Enable"],
  2842. },
  2843. width = {
  2844. order = 5,
  2845. name = L["Width"],
  2846. type = 'range',
  2847. min = 50, max = 500, step = 1,
  2848. set = function(info, value)
  2849. if E.db.unitframe.units['target'].castbar.width == E.db.unitframe.units['target'][ info[#info] ] then
  2850. E.db.unitframe.units['target'].castbar.width = value;
  2851. end
  2852.  
  2853. E.db.unitframe.units['target'][ info[#info] ] = value;
  2854. UF:CreateAndUpdateUF('target');
  2855. end,
  2856. },
  2857. height = {
  2858. order = 6,
  2859. name = L["Height"],
  2860. type = 'range',
  2861. min = 10, max = 250, step = 1,
  2862. },
  2863. rangeCheck = {
  2864. order = 7,
  2865. name = L["Range Check"],
  2866. desc = L["Check if you are in range to cast spells on this specific unit."],
  2867. type = "toggle",
  2868. },
  2869. healPrediction = {
  2870. order = 8,
  2871. name = L["Heal Prediction"],
  2872. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  2873. type = 'toggle',
  2874. },
  2875. hideonnpc = {
  2876. type = 'toggle',
  2877. order = 9,
  2878. name = L["Text Toggle On NPC"],
  2879. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  2880. get = function(info) return E.db.unitframe.units['target']['power'].hideonnpc end,
  2881. set = function(info, value) E.db.unitframe.units['target']['power'].hideonnpc = value; UF:CreateAndUpdateUF('target') end,
  2882. },
  2883. middleClickFocus = {
  2884. order = 10,
  2885. name = L["Middle Click - Set Focus"],
  2886. desc = L["Middle clicking the unit frame will cause your focus to match the unit."],
  2887. type = 'toggle',
  2888. disabled = function() return IsAddOnLoaded("Clique") end,
  2889. },
  2890. threatStyle = {
  2891. type = 'select',
  2892. order = 11,
  2893. name = L["Threat Display Mode"],
  2894. values = threatValues,
  2895. },
  2896. smartAuraPosition = {
  2897. order = 12,
  2898. type = "select",
  2899. name = L["Smart Aura Position"],
  2900. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  2901. values = {
  2902. ["DISABLED"] = L["Disabled"],
  2903. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  2904. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  2905. },
  2906. },
  2907. orientation = {
  2908. order = 13,
  2909. type = "select",
  2910. name = L["Frame Orientation"],
  2911. desc = L["Set the orientation of the UnitFrame."],
  2912. values = {
  2913. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  2914. ["LEFT"] = L["Left"],
  2915. ["MIDDLE"] = L["Middle"],
  2916. ["RIGHT"] = L["Right"],
  2917. },
  2918. },
  2919. colorOverride = {
  2920. order = 14,
  2921. name = L["Class Color Override"],
  2922. desc = L["Override the default class color setting."],
  2923. type = 'select',
  2924. values = {
  2925. ['USE_DEFAULT'] = L["Use Default"],
  2926. ['FORCE_ON'] = L["Force On"],
  2927. ['FORCE_OFF'] = L["Force Off"],
  2928. },
  2929. },
  2930. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'target'),
  2931. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'target'),
  2932. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'target'),
  2933. power = GetOptionsTable_Power(true, UF.CreateAndUpdateUF, 'target', nil, true),
  2934. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'target'),
  2935. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'target'),
  2936. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUF, 'target'),
  2937. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUF, 'target'),
  2938. castbar = GetOptionsTable_Castbar(false, UF.CreateAndUpdateUF, 'target'),
  2939. aurabar = GetOptionsTable_AuraBars(false, UF.CreateAndUpdateUF, 'target'),
  2940. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, 'target'),
  2941. pvpIcon = {
  2942. order = 449,
  2943. type = 'group',
  2944. name = L["PvP & Prestige Icon"],
  2945. get = function(info) return E.db.unitframe.units['target']['pvpIcon'][ info[#info] ] end,
  2946. set = function(info, value) E.db.unitframe.units['target']['pvpIcon'][ info[#info] ] = value; UF:CreateAndUpdateUF('target') end,
  2947. args = {
  2948. enable = {
  2949. order = 1,
  2950. type = "toggle",
  2951. name = L["Enable"],
  2952. },
  2953. scale = {
  2954. order = 2,
  2955. type = "range",
  2956. name = L["Scale"],
  2957. isPercent = true,
  2958. min = 0.1, max = 2, step = 0.01,
  2959. },
  2960. spacer = {
  2961. order = 3,
  2962. type = "description",
  2963. name = " ",
  2964. },
  2965. anchorPoint = {
  2966. order = 4,
  2967. type = "select",
  2968. name = L["Anchor Point"],
  2969. values = positionValues,
  2970. },
  2971. xOffset = {
  2972. order = 5,
  2973. type = "range",
  2974. name = L["X-Offset"],
  2975. min = -100, max = 100, step = 1,
  2976. },
  2977. yOffset = {
  2978. order = 6,
  2979. type = "range",
  2980. name = L["Y-Offset"],
  2981. min = -100, max = 100, step = 1,
  2982. },
  2983. },
  2984. },
  2985. },
  2986. }
  2987.  
  2988. --TargetTarget
  2989. E.Options.args.unitframe.args.targettarget = {
  2990. name = L["TargetTarget Frame"],
  2991. type = 'group',
  2992. order = 500,
  2993. childGroups = "select",
  2994. get = function(info) return E.db.unitframe.units['targettarget'][ info[#info] ] end,
  2995. set = function(info, value) E.db.unitframe.units['targettarget'][ info[#info] ] = value; UF:CreateAndUpdateUF('targettarget') end,
  2996. args = {
  2997. copyFrom = {
  2998. type = 'select',
  2999. order = 1,
  3000. name = L["Copy From"],
  3001. desc = L["Select a unit to copy settings from."],
  3002. values = UF['units'],
  3003. set = function(info, value) UF:MergeUnitSettings(value, 'targettarget'); end,
  3004. },
  3005. resetSettings = {
  3006. type = 'execute',
  3007. order = 2,
  3008. name = L["Restore Defaults"],
  3009. func = function(info, value) UF:ResetUnitSettings('targettarget'); E:ResetMovers('TargetTarget Frame') end,
  3010. },
  3011. showAuras = {
  3012. order = 3,
  3013. type = 'execute',
  3014. name = L["Show Auras"],
  3015. func = function()
  3016. local frame = ElvUF_TargetTarget
  3017. if frame.forceShowAuras then
  3018. frame.forceShowAuras = nil;
  3019. else
  3020. frame.forceShowAuras = true;
  3021. end
  3022.  
  3023. UF:CreateAndUpdateUF('targettarget')
  3024. end,
  3025. },
  3026. enable = {
  3027. type = 'toggle',
  3028. order = 4,
  3029. name = L["Enable"],
  3030. },
  3031. width = {
  3032. order = 5,
  3033. name = L["Width"],
  3034. type = 'range',
  3035. min = 50, max = 500, step = 1,
  3036. },
  3037. height = {
  3038. order = 6,
  3039. name = L["Height"],
  3040. type = 'range',
  3041. min = 10, max = 250, step = 1,
  3042. },
  3043. rangeCheck = {
  3044. order = 7,
  3045. name = L["Range Check"],
  3046. desc = L["Check if you are in range to cast spells on this specific unit."],
  3047. type = "toggle",
  3048. },
  3049. hideonnpc = {
  3050. type = 'toggle',
  3051. order = 8,
  3052. name = L["Text Toggle On NPC"],
  3053. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3054. get = function(info) return E.db.unitframe.units['targettarget']['power'].hideonnpc end,
  3055. set = function(info, value) E.db.unitframe.units['targettarget']['power'].hideonnpc = value; UF:CreateAndUpdateUF('targettarget') end,
  3056. },
  3057. threatStyle = {
  3058. type = 'select',
  3059. order = 9,
  3060. name = L["Threat Display Mode"],
  3061. values = threatValues,
  3062. },
  3063. smartAuraPosition = {
  3064. order = 10,
  3065. type = "select",
  3066. name = L["Smart Aura Position"],
  3067. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  3068. values = {
  3069. ["DISABLED"] = L["Disabled"],
  3070. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  3071. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  3072. },
  3073. },
  3074. orientation = {
  3075. order = 11,
  3076. type = "select",
  3077. name = L["Frame Orientation"],
  3078. desc = L["Set the orientation of the UnitFrame."],
  3079. values = {
  3080. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  3081. ["LEFT"] = L["Left"],
  3082. ["MIDDLE"] = L["Middle"],
  3083. ["RIGHT"] = L["Right"],
  3084. },
  3085. },
  3086. colorOverride = {
  3087. order = 12,
  3088. name = L["Class Color Override"],
  3089. desc = L["Override the default class color setting."],
  3090. type = 'select',
  3091. values = {
  3092. ['USE_DEFAULT'] = L["Use Default"],
  3093. ['FORCE_ON'] = L["Force On"],
  3094. ['FORCE_OFF'] = L["Force Off"],
  3095. },
  3096. },
  3097. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'targettarget'),
  3098. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'targettarget'),
  3099. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'targettarget'),
  3100. power = GetOptionsTable_Power(nil, UF.CreateAndUpdateUF, 'targettarget'),
  3101. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'targettarget'),
  3102. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'targettarget'),
  3103. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUF, 'targettarget'),
  3104. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUF, 'targettarget'),
  3105. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, 'targettarget'),
  3106. },
  3107. }
  3108.  
  3109. --TargetTargetTarget
  3110. E.Options.args.unitframe.args.targettargettarget = {
  3111. name = L["TargetTargetTarget Frame"],
  3112. type = 'group',
  3113. order = 500,
  3114. childGroups = "select",
  3115. get = function(info) return E.db.unitframe.units['targettargettarget'][ info[#info] ] end,
  3116. set = function(info, value) E.db.unitframe.units['targettargettarget'][ info[#info] ] = value; UF:CreateAndUpdateUF('targettargettarget') end,
  3117. args = {
  3118. copyFrom = {
  3119. type = 'select',
  3120. order = 1,
  3121. name = L["Copy From"],
  3122. desc = L["Select a unit to copy settings from."],
  3123. values = UF['units'],
  3124. set = function(info, value) UF:MergeUnitSettings(value, 'targettargettarget'); end,
  3125. },
  3126. resetSettings = {
  3127. type = 'execute',
  3128. order = 2,
  3129. name = L["Restore Defaults"],
  3130. func = function(info, value) UF:ResetUnitSettings('targettargettarget'); E:ResetMovers('TargetTargetTarget Frame') end,
  3131. },
  3132. showAuras = {
  3133. order = 3,
  3134. type = 'execute',
  3135. name = L["Show Auras"],
  3136. func = function()
  3137. local frame = ElvUF_TargetTargetTarget
  3138. if frame.forceShowAuras then
  3139. frame.forceShowAuras = nil;
  3140. else
  3141. frame.forceShowAuras = true;
  3142. end
  3143.  
  3144. UF:CreateAndUpdateUF('targettargettarget')
  3145. end,
  3146. },
  3147. enable = {
  3148. type = 'toggle',
  3149. order = 4,
  3150. name = L["Enable"],
  3151. },
  3152. width = {
  3153. order = 5,
  3154. name = L["Width"],
  3155. type = 'range',
  3156. min = 50, max = 500, step = 1,
  3157. },
  3158. height = {
  3159. order = 6,
  3160. name = L["Height"],
  3161. type = 'range',
  3162. min = 10, max = 250, step = 1,
  3163. },
  3164. rangeCheck = {
  3165. order = 7,
  3166. name = L["Range Check"],
  3167. desc = L["Check if you are in range to cast spells on this specific unit."],
  3168. type = "toggle",
  3169. },
  3170. hideonnpc = {
  3171. type = 'toggle',
  3172. order = 8,
  3173. name = L["Text Toggle On NPC"],
  3174. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3175. get = function(info) return E.db.unitframe.units['targettargettarget']['power'].hideonnpc end,
  3176. set = function(info, value) E.db.unitframe.units['targettargettarget']['power'].hideonnpc = value; UF:CreateAndUpdateUF('targettargettarget') end,
  3177. },
  3178. threatStyle = {
  3179. type = 'select',
  3180. order = 9,
  3181. name = L["Threat Display Mode"],
  3182. values = threatValues,
  3183. },
  3184. smartAuraPosition = {
  3185. order = 10,
  3186. type = "select",
  3187. name = L["Smart Aura Position"],
  3188. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  3189. values = {
  3190. ["DISABLED"] = L["Disabled"],
  3191. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  3192. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  3193. },
  3194. },
  3195. orientation = {
  3196. order = 11,
  3197. type = "select",
  3198. name = L["Frame Orientation"],
  3199. desc = L["Set the orientation of the UnitFrame."],
  3200. values = {
  3201. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  3202. ["LEFT"] = L["Left"],
  3203. ["MIDDLE"] = L["Middle"],
  3204. ["RIGHT"] = L["Right"],
  3205. },
  3206. },
  3207. colorOverride = {
  3208. order = 12,
  3209. name = L["Class Color Override"],
  3210. desc = L["Override the default class color setting."],
  3211. type = 'select',
  3212. values = {
  3213. ['USE_DEFAULT'] = L["Use Default"],
  3214. ['FORCE_ON'] = L["Force On"],
  3215. ['FORCE_OFF'] = L["Force Off"],
  3216. },
  3217. },
  3218. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'targettargettarget'),
  3219. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'targettargettarget'),
  3220. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'targettargettarget'),
  3221. power = GetOptionsTable_Power(nil, UF.CreateAndUpdateUF, 'targettargettarget'),
  3222. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'targettargettarget'),
  3223. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'targettargettarget'),
  3224. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUF, 'targettargettarget'),
  3225. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUF, 'targettargettarget'),
  3226. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, 'targettargettarget'),
  3227. },
  3228. }
  3229.  
  3230. --Focus
  3231. E.Options.args.unitframe.args.focus = {
  3232. name = L["Focus Frame"],
  3233. type = 'group',
  3234. order = 600,
  3235. childGroups = "select",
  3236. get = function(info) return E.db.unitframe.units['focus'][ info[#info] ] end,
  3237. set = function(info, value) E.db.unitframe.units['focus'][ info[#info] ] = value; UF:CreateAndUpdateUF('focus') end,
  3238. args = {
  3239. copyFrom = {
  3240. type = 'select',
  3241. order = 1,
  3242. name = L["Copy From"],
  3243. desc = L["Select a unit to copy settings from."],
  3244. values = UF['units'],
  3245. set = function(info, value) UF:MergeUnitSettings(value, 'focus'); end,
  3246. },
  3247. resetSettings = {
  3248. type = 'execute',
  3249. order = 2,
  3250. name = L["Restore Defaults"],
  3251. func = function(info, value) UF:ResetUnitSettings('focus'); E:ResetMovers('Focus Frame') end,
  3252. },
  3253. showAuras = {
  3254. order = 3,
  3255. type = 'execute',
  3256. name = L["Show Auras"],
  3257. func = function()
  3258. local frame = ElvUF_Focus
  3259. if frame.forceShowAuras then
  3260. frame.forceShowAuras = nil;
  3261. else
  3262. frame.forceShowAuras = true;
  3263. end
  3264.  
  3265. UF:CreateAndUpdateUF('focus')
  3266. end,
  3267. },
  3268. enable = {
  3269. type = 'toggle',
  3270. order = 4,
  3271. name = L["Enable"],
  3272. },
  3273. width = {
  3274. order = 5,
  3275. name = L["Width"],
  3276. type = 'range',
  3277. min = 50, max = 500, step = 1,
  3278. },
  3279. height = {
  3280. order = 6,
  3281. name = L["Height"],
  3282. type = 'range',
  3283. min = 10, max = 250, step = 1,
  3284. },
  3285. rangeCheck = {
  3286. order = 7,
  3287. name = L["Range Check"],
  3288. desc = L["Check if you are in range to cast spells on this specific unit."],
  3289. type = "toggle",
  3290. },
  3291. healPrediction = {
  3292. order = 8,
  3293. name = L["Heal Prediction"],
  3294. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  3295. type = 'toggle',
  3296. },
  3297. hideonnpc = {
  3298. type = 'toggle',
  3299. order = 9,
  3300. name = L["Text Toggle On NPC"],
  3301. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3302. get = function(info) return E.db.unitframe.units['focus']['power'].hideonnpc end,
  3303. set = function(info, value) E.db.unitframe.units['focus']['power'].hideonnpc = value; UF:CreateAndUpdateUF('focus') end,
  3304. },
  3305. threatStyle = {
  3306. type = 'select',
  3307. order = 10,
  3308. name = L["Threat Display Mode"],
  3309. values = threatValues,
  3310. },
  3311. smartAuraPosition = {
  3312. order = 11,
  3313. type = "select",
  3314. name = L["Smart Aura Position"],
  3315. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  3316. values = {
  3317. ["DISABLED"] = L["Disabled"],
  3318. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  3319. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  3320. },
  3321. },
  3322. orientation = {
  3323. order = 12,
  3324. type = "select",
  3325. name = L["Frame Orientation"],
  3326. desc = L["Set the orientation of the UnitFrame."],
  3327. values = {
  3328. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  3329. ["LEFT"] = L["Left"],
  3330. ["MIDDLE"] = L["Middle"],
  3331. ["RIGHT"] = L["Right"],
  3332. },
  3333. },
  3334. colorOverride = {
  3335. order = 13,
  3336. name = L["Class Color Override"],
  3337. desc = L["Override the default class color setting."],
  3338. type = 'select',
  3339. values = {
  3340. ['USE_DEFAULT'] = L["Use Default"],
  3341. ['FORCE_ON'] = L["Force On"],
  3342. ['FORCE_OFF'] = L["Force Off"],
  3343. },
  3344. },
  3345. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'focus'),
  3346. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'focus'),
  3347. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'focus'),
  3348. power = GetOptionsTable_Power(nil, UF.CreateAndUpdateUF, 'focus'),
  3349. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'focus'),
  3350. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'focus'),
  3351. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUF, 'focus'),
  3352. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUF, 'focus'),
  3353. castbar = GetOptionsTable_Castbar(false, UF.CreateAndUpdateUF, 'focus'),
  3354. aurabar = GetOptionsTable_AuraBars(false, UF.CreateAndUpdateUF, 'focus'),
  3355. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, 'focus'),
  3356. },
  3357. }
  3358.  
  3359. --Focus Target
  3360. E.Options.args.unitframe.args.focustarget = {
  3361. name = L["FocusTarget Frame"],
  3362. type = 'group',
  3363. order = 700,
  3364. childGroups = "select",
  3365. get = function(info) return E.db.unitframe.units['focustarget'][ info[#info] ] end,
  3366. set = function(info, value) E.db.unitframe.units['focustarget'][ info[#info] ] = value; UF:CreateAndUpdateUF('focustarget') end,
  3367. args = {
  3368. copyFrom = {
  3369. type = 'select',
  3370. order = 1,
  3371. name = L["Copy From"],
  3372. desc = L["Select a unit to copy settings from."],
  3373. values = UF['units'],
  3374. set = function(info, value) UF:MergeUnitSettings(value, 'focustarget'); end,
  3375. },
  3376. resetSettings = {
  3377. type = 'execute',
  3378. order = 2,
  3379. name = L["Restore Defaults"],
  3380. func = function(info, value) UF:ResetUnitSettings('focustarget'); E:ResetMovers('FocusTarget Frame') end,
  3381. },
  3382. showAuras = {
  3383. order = 3,
  3384. type = 'execute',
  3385. name = L["Show Auras"],
  3386. func = function()
  3387. local frame = ElvUF_FocusTarget
  3388. if frame.forceShowAuras then
  3389. frame.forceShowAuras = nil;
  3390. else
  3391. frame.forceShowAuras = true;
  3392. end
  3393.  
  3394. UF:CreateAndUpdateUF('focustarget')
  3395. end,
  3396. },
  3397. enable = {
  3398. type = 'toggle',
  3399. order = 4,
  3400. name = L["Enable"],
  3401. },
  3402. width = {
  3403. order = 5,
  3404. name = L["Width"],
  3405. type = 'range',
  3406. min = 50, max = 500, step = 1,
  3407. },
  3408. height = {
  3409. order = 6,
  3410. name = L["Height"],
  3411. type = 'range',
  3412. min = 10, max = 250, step = 1,
  3413. },
  3414. rangeCheck = {
  3415. order = 7,
  3416. name = L["Range Check"],
  3417. desc = L["Check if you are in range to cast spells on this specific unit."],
  3418. type = "toggle",
  3419. },
  3420. hideonnpc = {
  3421. type = 'toggle',
  3422. order = 8,
  3423. name = L["Text Toggle On NPC"],
  3424. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3425. get = function(info) return E.db.unitframe.units['focustarget']['power'].hideonnpc end,
  3426. set = function(info, value) E.db.unitframe.units['focustarget']['power'].hideonnpc = value; UF:CreateAndUpdateUF('focustarget') end,
  3427. },
  3428. threatStyle = {
  3429. type = 'select',
  3430. order = 9,
  3431. name = L["Threat Display Mode"],
  3432. values = threatValues,
  3433. },
  3434. smartAuraPosition = {
  3435. order = 10,
  3436. type = "select",
  3437. name = L["Smart Aura Position"],
  3438. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  3439. values = {
  3440. ["DISABLED"] = L["Disabled"],
  3441. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  3442. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  3443. },
  3444. },
  3445. orientation = {
  3446. order = 11,
  3447. type = "select",
  3448. name = L["Frame Orientation"],
  3449. desc = L["Set the orientation of the UnitFrame."],
  3450. values = {
  3451. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  3452. ["LEFT"] = L["Left"],
  3453. ["MIDDLE"] = L["Middle"],
  3454. ["RIGHT"] = L["Right"],
  3455. },
  3456. },
  3457. colorOverride = {
  3458. order = 12,
  3459. name = L["Class Color Override"],
  3460. desc = L["Override the default class color setting."],
  3461. type = 'select',
  3462. values = {
  3463. ['USE_DEFAULT'] = L["Use Default"],
  3464. ['FORCE_ON'] = L["Force On"],
  3465. ['FORCE_OFF'] = L["Force Off"],
  3466. },
  3467. },
  3468. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'focustarget'),
  3469. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'focustarget'),
  3470. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'focustarget'),
  3471. power = GetOptionsTable_Power(false, UF.CreateAndUpdateUF, 'focustarget'),
  3472. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'focustarget'),
  3473. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'focustarget'),
  3474. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUF, 'focustarget'),
  3475. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUF, 'focustarget'),
  3476. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, 'focustarget'),
  3477. },
  3478. }
  3479.  
  3480. --Pet
  3481. E.Options.args.unitframe.args.pet = {
  3482. name = L["Pet Frame"],
  3483. type = 'group',
  3484. order = 800,
  3485. childGroups = "select",
  3486. get = function(info) return E.db.unitframe.units['pet'][ info[#info] ] end,
  3487. set = function(info, value) E.db.unitframe.units['pet'][ info[#info] ] = value; UF:CreateAndUpdateUF('pet') end,
  3488. args = {
  3489. copyFrom = {
  3490. type = 'select',
  3491. order = 1,
  3492. name = L["Copy From"],
  3493. desc = L["Select a unit to copy settings from."],
  3494. values = UF['units'],
  3495. set = function(info, value) UF:MergeUnitSettings(value, 'pet'); end,
  3496. },
  3497. resetSettings = {
  3498. type = 'execute',
  3499. order = 2,
  3500. name = L["Restore Defaults"],
  3501. func = function(info, value) UF:ResetUnitSettings('pet'); E:ResetMovers('Pet Frame') end,
  3502. },
  3503. showAuras = {
  3504. order = 3,
  3505. type = 'execute',
  3506. name = L["Show Auras"],
  3507. func = function()
  3508. local frame = ElvUF_Pet
  3509. if frame.forceShowAuras then
  3510. frame.forceShowAuras = nil;
  3511. else
  3512. frame.forceShowAuras = true;
  3513. end
  3514.  
  3515. UF:CreateAndUpdateUF('pet')
  3516. end,
  3517. },
  3518. enable = {
  3519. type = 'toggle',
  3520. order = 4,
  3521. name = L["Enable"],
  3522. },
  3523. width = {
  3524. order = 5,
  3525. name = L["Width"],
  3526. type = 'range',
  3527. min = 50, max = 500, step = 1,
  3528. },
  3529. height = {
  3530. order = 6,
  3531. name = L["Height"],
  3532. type = 'range',
  3533. min = 10, max = 250, step = 1,
  3534. },
  3535. rangeCheck = {
  3536. order = 7,
  3537. name = L["Range Check"],
  3538. desc = L["Check if you are in range to cast spells on this specific unit."],
  3539. type = "toggle",
  3540. },
  3541. healPrediction = {
  3542. order = 8,
  3543. name = L["Heal Prediction"],
  3544. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  3545. type = 'toggle',
  3546. },
  3547. hideonnpc = {
  3548. type = 'toggle',
  3549. order = 9,
  3550. name = L["Text Toggle On NPC"],
  3551. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3552. get = function(info) return E.db.unitframe.units['pet']['power'].hideonnpc end,
  3553. set = function(info, value) E.db.unitframe.units['pet']['power'].hideonnpc = value; UF:CreateAndUpdateUF('pet') end,
  3554. },
  3555. threatStyle = {
  3556. type = 'select',
  3557. order = 10,
  3558. name = L["Threat Display Mode"],
  3559. values = threatValues,
  3560. },
  3561. smartAuraPosition = {
  3562. order = 11,
  3563. type = "select",
  3564. name = L["Smart Aura Position"],
  3565. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  3566. values = {
  3567. ["DISABLED"] = L["Disabled"],
  3568. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  3569. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  3570. },
  3571. },
  3572. orientation = {
  3573. order = 12,
  3574. type = "select",
  3575. name = L["Frame Orientation"],
  3576. desc = L["Set the orientation of the UnitFrame."],
  3577. values = {
  3578. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  3579. ["LEFT"] = L["Left"],
  3580. ["MIDDLE"] = L["Middle"],
  3581. ["RIGHT"] = L["Right"],
  3582. },
  3583. },
  3584. colorOverride = {
  3585. order = 13,
  3586. name = L["Class Color Override"],
  3587. desc = L["Override the default class color setting."],
  3588. type = 'select',
  3589. values = {
  3590. ['USE_DEFAULT'] = L["Use Default"],
  3591. ['FORCE_ON'] = L["Force On"],
  3592. ['FORCE_OFF'] = L["Force Off"],
  3593. },
  3594. },
  3595. buffIndicator = {
  3596. order = 600,
  3597. type = 'group',
  3598. name = L["Buff Indicator"],
  3599. get = function(info) return E.db.unitframe.units['pet']['buffIndicator'][ info[#info] ] end,
  3600. set = function(info, value) E.db.unitframe.units['pet']['buffIndicator'][ info[#info] ] = value; UF:CreateAndUpdateUF('pet') end,
  3601. args = {
  3602. enable = {
  3603. type = 'toggle',
  3604. name = L["Enable"],
  3605. order = 1,
  3606. },
  3607. size = {
  3608. type = 'range',
  3609. name = L["Size"],
  3610. desc = L["Size of the indicator icon."],
  3611. order = 3,
  3612. min = 4, max = 50, step = 1,
  3613. },
  3614. fontSize = {
  3615. type = 'range',
  3616. name = L["Font Size"],
  3617. order = 4,
  3618. min = 7, max = 212, step = 1,
  3619. },
  3620. },
  3621. },
  3622. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'pet'),
  3623. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'pet'),
  3624. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'pet'),
  3625. power = GetOptionsTable_Power(false, UF.CreateAndUpdateUF, 'pet'),
  3626. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'pet'),
  3627. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'pet'),
  3628. buffs = GetOptionsTable_Auras(true, 'buffs', false, UF.CreateAndUpdateUF, 'pet'),
  3629. debuffs = GetOptionsTable_Auras(true, 'debuffs', false, UF.CreateAndUpdateUF, 'pet'),
  3630. castbar = GetOptionsTable_Castbar(false, UF.CreateAndUpdateUF, 'pet'),
  3631. },
  3632. }
  3633.  
  3634. --Pet Target
  3635. E.Options.args.unitframe.args.pettarget = {
  3636. name = L["PetTarget Frame"],
  3637. type = 'group',
  3638. order = 900,
  3639. childGroups = "select",
  3640. get = function(info) return E.db.unitframe.units['pettarget'][ info[#info] ] end,
  3641. set = function(info, value) E.db.unitframe.units['pettarget'][ info[#info] ] = value; UF:CreateAndUpdateUF('pettarget') end,
  3642. args = {
  3643. copyFrom = {
  3644. type = 'select',
  3645. order = 1,
  3646. name = L["Copy From"],
  3647. desc = L["Select a unit to copy settings from."],
  3648. values = UF['units'],
  3649. set = function(info, value) UF:MergeUnitSettings(value, 'pettarget'); end,
  3650. },
  3651. resetSettings = {
  3652. type = 'execute',
  3653. order = 2,
  3654. name = L["Restore Defaults"],
  3655. func = function(info, value) UF:ResetUnitSettings('pettarget'); E:ResetMovers('PetTarget Frame') end,
  3656. },
  3657. showAuras = {
  3658. order = 3,
  3659. type = 'execute',
  3660. name = L["Show Auras"],
  3661. func = function()
  3662. local frame = ElvUF_PetTarget
  3663. if frame.forceShowAuras then
  3664. frame.forceShowAuras = nil;
  3665. else
  3666. frame.forceShowAuras = true;
  3667. end
  3668.  
  3669. UF:CreateAndUpdateUF('pettarget')
  3670. end,
  3671. },
  3672. enable = {
  3673. type = 'toggle',
  3674. order = 4,
  3675. name = L["Enable"],
  3676. },
  3677. width = {
  3678. order = 5,
  3679. name = L["Width"],
  3680. type = 'range',
  3681. min = 50, max = 500, step = 1,
  3682. },
  3683. height = {
  3684. order = 6,
  3685. name = L["Height"],
  3686. type = 'range',
  3687. min = 10, max = 250, step = 1,
  3688. },
  3689. rangeCheck = {
  3690. order = 7,
  3691. name = L["Range Check"],
  3692. desc = L["Check if you are in range to cast spells on this specific unit."],
  3693. type = "toggle",
  3694. },
  3695. hideonnpc = {
  3696. type = 'toggle',
  3697. order = 8,
  3698. name = L["Text Toggle On NPC"],
  3699. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3700. get = function(info) return E.db.unitframe.units['pettarget']['power'].hideonnpc end,
  3701. set = function(info, value) E.db.unitframe.units['pettarget']['power'].hideonnpc = value; UF:CreateAndUpdateUF('pettarget') end,
  3702. },
  3703. threatStyle = {
  3704. type = 'select',
  3705. order = 9,
  3706. name = L["Threat Display Mode"],
  3707. values = threatValues,
  3708. },
  3709. smartAuraPosition = {
  3710. order = 10,
  3711. type = "select",
  3712. name = L["Smart Aura Position"],
  3713. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  3714. values = {
  3715. ["DISABLED"] = L["Disabled"],
  3716. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  3717. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  3718. },
  3719. },
  3720. orientation = {
  3721. order = 11,
  3722. type = "select",
  3723. name = L["Frame Orientation"],
  3724. desc = L["Set the orientation of the UnitFrame."],
  3725. values = {
  3726. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  3727. ["LEFT"] = L["Left"],
  3728. ["MIDDLE"] = L["Middle"],
  3729. ["RIGHT"] = L["Right"],
  3730. },
  3731. },
  3732. colorOverride = {
  3733. order = 12,
  3734. name = L["Class Color Override"],
  3735. desc = L["Override the default class color setting."],
  3736. type = 'select',
  3737. values = {
  3738. ['USE_DEFAULT'] = L["Use Default"],
  3739. ['FORCE_ON'] = L["Force On"],
  3740. ['FORCE_OFF'] = L["Force Off"],
  3741. },
  3742. },
  3743. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUF, 'pettarget'),
  3744. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUF, 'pettarget'),
  3745. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUF, 'pettarget'),
  3746. power = GetOptionsTable_Power(false, UF.CreateAndUpdateUF, 'pettarget'),
  3747. name = GetOptionsTable_Name(UF.CreateAndUpdateUF, 'pettarget'),
  3748. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, 'pettarget'),
  3749. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUF, 'pettarget'),
  3750. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUF, 'pettarget'),
  3751. },
  3752. }
  3753.  
  3754. --Boss Frames
  3755. E.Options.args.unitframe.args.boss = {
  3756. name = L["Boss Frames"],
  3757. type = 'group',
  3758. order = 1000,
  3759. childGroups = "select",
  3760. get = function(info) return E.db.unitframe.units['boss'][ info[#info] ] end,
  3761. set = function(info, value) E.db.unitframe.units['boss'][ info[#info] ] = value; UF:CreateAndUpdateUFGroup('boss', MAX_BOSS_FRAMES) end,
  3762. args = {
  3763. copyFrom = {
  3764. type = 'select',
  3765. order = 1,
  3766. name = L["Copy From"],
  3767. desc = L["Select a unit to copy settings from."],
  3768. values = {
  3769. ['boss'] = 'boss',
  3770. ['arena'] = 'arena',
  3771. },
  3772. set = function(info, value) UF:MergeUnitSettings(value, 'boss'); end,
  3773. },
  3774. resetSettings = {
  3775. type = 'execute',
  3776. order = 2,
  3777. name = L["Restore Defaults"],
  3778. func = function(info, value) UF:ResetUnitSettings('boss'); E:ResetMovers('Boss Frames') end,
  3779. },
  3780. displayFrames = {
  3781. type = 'execute',
  3782. order = 3,
  3783. name = L["Display Frames"],
  3784. desc = L["Force the frames to show, they will act as if they are the player frame."],
  3785. func = function() UF:ToggleForceShowGroupFrames('boss', MAX_BOSS_FRAMES) end,
  3786. },
  3787. enable = {
  3788. type = 'toggle',
  3789. order = 4,
  3790. name = L["Enable"],
  3791. },
  3792. width = {
  3793. order = 5,
  3794. name = L["Width"],
  3795. type = 'range',
  3796. min = 50, max = 500, step = 1,
  3797. set = function(info, value)
  3798. if E.db.unitframe.units['boss'].castbar.width == E.db.unitframe.units['boss'][ info[#info] ] then
  3799. E.db.unitframe.units['boss'].castbar.width = value;
  3800. end
  3801.  
  3802. E.db.unitframe.units['boss'][ info[#info] ] = value;
  3803. UF:CreateAndUpdateUFGroup('boss', MAX_BOSS_FRAMES);
  3804. end,
  3805. },
  3806. height = {
  3807. order = 6,
  3808. name = L["Height"],
  3809. type = 'range',
  3810. min = 10, max = 250, step = 1,
  3811. },
  3812. rangeCheck = {
  3813. order = 7,
  3814. name = L["Range Check"],
  3815. desc = L["Check if you are in range to cast spells on this specific unit."],
  3816. type = "toggle",
  3817. },
  3818. hideonnpc = {
  3819. type = 'toggle',
  3820. order = 8,
  3821. name = L["Text Toggle On NPC"],
  3822. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3823. get = function(info) return E.db.unitframe.units['boss']['power'].hideonnpc end,
  3824. set = function(info, value) E.db.unitframe.units['boss']['power'].hideonnpc = value; UF:CreateAndUpdateUFGroup('boss', MAX_BOSS_FRAMES) end,
  3825. },
  3826. growthDirection = {
  3827. order = 9,
  3828. type = "select",
  3829. name = L["Growth Direction"],
  3830. values = {
  3831. ["UP"] = L["Bottom to Top"],
  3832. ["DOWN"] = L["Top to Bottom"],
  3833. ["LEFT"] = L["Right to Left"],
  3834. ["RIGHT"] = L["Left to Right"],
  3835. },
  3836. },
  3837. spacing = {
  3838. order = 10,
  3839. type = "range",
  3840. name = L["Spacing"],
  3841. min = 0, max = 400, step = 1,
  3842. },
  3843. threatStyle = {
  3844. type = 'select',
  3845. order = 11,
  3846. name = L["Threat Display Mode"],
  3847. values = threatValues,
  3848. },
  3849. smartAuraPosition = {
  3850. order = 12,
  3851. type = "select",
  3852. name = L["Smart Aura Position"],
  3853. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  3854. values = {
  3855. ["DISABLED"] = L["Disabled"],
  3856. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  3857. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  3858. },
  3859. },
  3860. orientation = {
  3861. order = 13,
  3862. type = "select",
  3863. name = L["Frame Orientation"],
  3864. desc = L["Set the orientation of the UnitFrame."],
  3865. values = {
  3866. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  3867. ["LEFT"] = L["Left"],
  3868. ["MIDDLE"] = L["Middle"],
  3869. ["RIGHT"] = L["Right"],
  3870. },
  3871. },
  3872. colorOverride = {
  3873. order = 14,
  3874. name = L["Class Color Override"],
  3875. desc = L["Override the default class color setting."],
  3876. type = 'select',
  3877. values = {
  3878. ['USE_DEFAULT'] = L["Use Default"],
  3879. ['FORCE_ON'] = L["Force On"],
  3880. ['FORCE_OFF'] = L["Force Off"],
  3881. },
  3882. },
  3883. targetGlow = {
  3884. order = 15,
  3885. type = "toggle",
  3886. name = L["Target Glow"],
  3887. },
  3888. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3889. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3890. power = GetOptionsTable_Power(false, UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3891. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3892. name = GetOptionsTable_Name(UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3893. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3894. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3895. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3896. castbar = GetOptionsTable_Castbar(false, UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3897. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUFGroup, 'boss', MAX_BOSS_FRAMES),
  3898. },
  3899. }
  3900.  
  3901. --Arena Frames
  3902. E.Options.args.unitframe.args.arena = {
  3903. name = L["Arena Frames"],
  3904. type = 'group',
  3905. order = 1000,
  3906. childGroups = "select",
  3907. get = function(info) return E.db.unitframe.units['arena'][ info[#info] ] end,
  3908. set = function(info, value) E.db.unitframe.units['arena'][ info[#info] ] = value; UF:CreateAndUpdateUFGroup('arena', 5) end,
  3909. args = {
  3910. copyFrom = {
  3911. type = 'select',
  3912. order = 1,
  3913. name = L["Copy From"],
  3914. desc = L["Select a unit to copy settings from."],
  3915. values = {
  3916. ['boss'] = 'boss',
  3917. ['arena'] = 'arena',
  3918. },
  3919. set = function(info, value) UF:MergeUnitSettings(value, 'arena'); end,
  3920. },
  3921. resetSettings = {
  3922. type = 'execute',
  3923. order = 2,
  3924. name = L["Restore Defaults"],
  3925. func = function(info, value) UF:ResetUnitSettings('arena'); E:ResetMovers('Arena Frames') end,
  3926. },
  3927. displayFrames = {
  3928. type = 'execute',
  3929. order = 3,
  3930. name = L["Display Frames"],
  3931. desc = L["Force the frames to show, they will act as if they are the player frame."],
  3932. func = function() UF:ToggleForceShowGroupFrames('arena', 5) end,
  3933. },
  3934. enable = {
  3935. type = 'toggle',
  3936. order = 4,
  3937. name = L["Enable"],
  3938. },
  3939. width = {
  3940. order = 5,
  3941. name = L["Width"],
  3942. type = 'range',
  3943. min = 50, max = 500, step = 1,
  3944. set = function(info, value)
  3945. if E.db.unitframe.units['arena'].castbar.width == E.db.unitframe.units['arena'][ info[#info] ] then
  3946. E.db.unitframe.units['arena'].castbar.width = value;
  3947. end
  3948.  
  3949. E.db.unitframe.units['arena'][ info[#info] ] = value;
  3950. UF:CreateAndUpdateUFGroup('arena', 5);
  3951. end,
  3952. },
  3953. height = {
  3954. order = 6,
  3955. name = L["Height"],
  3956. type = 'range',
  3957. min = 10, max = 250, step = 1,
  3958. },
  3959. rangeCheck = {
  3960. order = 7,
  3961. name = L["Range Check"],
  3962. desc = L["Check if you are in range to cast spells on this specific unit."],
  3963. type = "toggle",
  3964. },
  3965. healPrediction = {
  3966. order = 8,
  3967. name = L["Heal Prediction"],
  3968. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  3969. type = 'toggle',
  3970. },
  3971. hideonnpc = {
  3972. type = 'toggle',
  3973. order = 9,
  3974. name = L["Text Toggle On NPC"],
  3975. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  3976. get = function(info) return E.db.unitframe.units['arena']['power'].hideonnpc end,
  3977. set = function(info, value) E.db.unitframe.units['arena']['power'].hideonnpc = value; UF:CreateAndUpdateUFGroup('arena', 5) end,
  3978. },
  3979. pvpSpecIcon = {
  3980. order = 10,
  3981. name = L["Spec Icon"],
  3982. desc = L["Display icon on arena frame indicating the units talent specialization or the units faction if inside a battleground."],
  3983. type = 'toggle',
  3984. },
  3985. growthDirection = {
  3986. order = 11,
  3987. type = "select",
  3988. name = L["Growth Direction"],
  3989. values = {
  3990. ["UP"] = L["Bottom to Top"],
  3991. ["DOWN"] = L["Top to Bottom"],
  3992. ["LEFT"] = L["Right to Left"],
  3993. ["RIGHT"] = L["Left to Right"],
  3994. },
  3995. },
  3996. spacing = {
  3997. order = 12,
  3998. type = "range",
  3999. name = L["Spacing"],
  4000. min = 0, max = 400, step = 1,
  4001. },
  4002. colorOverride = {
  4003. order = 13,
  4004. name = L["Class Color Override"],
  4005. desc = L["Override the default class color setting."],
  4006. type = 'select',
  4007. values = {
  4008. ['USE_DEFAULT'] = L["Use Default"],
  4009. ['FORCE_ON'] = L["Force On"],
  4010. ['FORCE_OFF'] = L["Force Off"],
  4011. },
  4012. },
  4013. smartAuraPosition = {
  4014. order = 14,
  4015. type = "select",
  4016. name = L["Smart Aura Position"],
  4017. desc = L["Will show Buffs in the Debuff position when there are no Debuffs active, or vice versa."],
  4018. values = {
  4019. ["DISABLED"] = L["Disabled"],
  4020. ["BUFFS_ON_DEBUFFS"] = L["Position Buffs on Debuffs"],
  4021. ["DEBUFFS_ON_BUFFS"] = L["Position Debuffs on Buffs"],
  4022. },
  4023. },
  4024. orientation = {
  4025. order = 15,
  4026. type = "select",
  4027. name = L["Frame Orientation"],
  4028. desc = L["Set the orientation of the UnitFrame."],
  4029. values = {
  4030. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  4031. ["LEFT"] = L["Left"],
  4032. --["MIDDLE"] = L["Middle"], --no way to handle this with trinket
  4033. ["RIGHT"] = L["Right"],
  4034. },
  4035. },
  4036. targetGlow = {
  4037. order = 16,
  4038. type = "toggle",
  4039. name = L["Target Glow"],
  4040. },
  4041. pvpTrinket = {
  4042. order = 16,
  4043. type = 'group',
  4044. name = L["PVP Trinket"],
  4045. get = function(info) return E.db.unitframe.units['arena']['pvpTrinket'][ info[#info] ] end,
  4046. set = function(info, value) E.db.unitframe.units['arena']['pvpTrinket'][ info[#info] ] = value; UF:CreateAndUpdateUFGroup('arena', 5) end,
  4047. args = {
  4048. enable = {
  4049. type = 'toggle',
  4050. order = 1,
  4051. name = L["Enable"],
  4052. },
  4053. position = {
  4054. type = 'select',
  4055. order = 2,
  4056. name = L["Position"],
  4057. values = {
  4058. ['LEFT'] = L["Left"],
  4059. ['RIGHT'] = L["Right"],
  4060. },
  4061. },
  4062. size = {
  4063. order = 3,
  4064. type = 'range',
  4065. name = L["Size"],
  4066. min = 10, max = 60, step = 1,
  4067. },
  4068. xOffset = {
  4069. order = 4,
  4070. type = 'range',
  4071. name = L["xOffset"],
  4072. min = -60, max = 60, step = 1,
  4073. },
  4074. yOffset = {
  4075. order = 4,
  4076. type = 'range',
  4077. name = L["yOffset"],
  4078. min = -60, max = 60, step = 1,
  4079. },
  4080. },
  4081. },
  4082. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateUFGroup, 'arena', 5),
  4083. health = GetOptionsTable_Health(false, UF.CreateAndUpdateUFGroup, 'arena', 5),
  4084. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateUFGroup, 'arena', 5),
  4085. power = GetOptionsTable_Power(false, UF.CreateAndUpdateUFGroup, 'arena', 5),
  4086. name = GetOptionsTable_Name(UF.CreateAndUpdateUFGroup, 'arena', 5),
  4087. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUFGroup, 'arena', 5),
  4088. buffs = GetOptionsTable_Auras(false, 'buffs', false, UF.CreateAndUpdateUFGroup, 'arena', 5),
  4089. debuffs = GetOptionsTable_Auras(false, 'debuffs', false, UF.CreateAndUpdateUFGroup, 'arena', 5),
  4090. castbar = GetOptionsTable_Castbar(false, UF.CreateAndUpdateUFGroup, 'arena', 5),
  4091. },
  4092. }
  4093.  
  4094. local groupPoints = {
  4095. ['TOP'] = 'TOP',
  4096. ['BOTTOM'] = 'BOTTOM',
  4097. ['LEFT'] = 'LEFT',
  4098. ['RIGHT'] = 'RIGHT',
  4099. }
  4100.  
  4101. --Party Frames
  4102. E.Options.args.unitframe.args.party = {
  4103. name = L["Party Frames"],
  4104. type = 'group',
  4105. order = 1100,
  4106. childGroups = "select",
  4107. get = function(info) return E.db.unitframe.units['party'][ info[#info] ] end,
  4108. set = function(info, value) E.db.unitframe.units['party'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4109. args = {
  4110. configureToggle = {
  4111. order = 1,
  4112. type = 'execute',
  4113. name = L["Display Frames"],
  4114. func = function()
  4115. UF:HeaderConfig(ElvUF_Party, ElvUF_Party.forceShow ~= true or nil)
  4116. end,
  4117. },
  4118. resetSettings = {
  4119. type = 'execute',
  4120. order = 2,
  4121. name = L["Restore Defaults"],
  4122. func = function(info, value) UF:ResetUnitSettings('party'); E:ResetMovers('Party Frames') end,
  4123. },
  4124. copyFrom = {
  4125. type = 'select',
  4126. order = 3,
  4127. name = L["Copy From"],
  4128. desc = L["Select a unit to copy settings from."],
  4129. values = {
  4130. ['raid'] = L["Raid Frames"],
  4131. ['raid40'] = L["Raid40 Frames"],
  4132. },
  4133. set = function(info, value) UF:MergeUnitSettings(value, 'party', true); end,
  4134. },
  4135. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateHeaderGroup, 'party', nil, 4),
  4136. general = {
  4137. order = 5,
  4138. type = 'group',
  4139. name = L["General"],
  4140. args = {
  4141. enable = {
  4142. type = 'toggle',
  4143. order = 1,
  4144. name = L["Enable"],
  4145. },
  4146. hideonnpc = {
  4147. type = 'toggle',
  4148. order = 2,
  4149. name = L["Text Toggle On NPC"],
  4150. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  4151. get = function(info) return E.db.unitframe.units['party']['power'].hideonnpc end,
  4152. set = function(info, value) E.db.unitframe.units['party']['power'].hideonnpc = value; UF:CreateAndUpdateHeaderGroup('party'); end,
  4153. },
  4154. rangeCheck = {
  4155. order = 3,
  4156. name = L["Range Check"],
  4157. desc = L["Check if you are in range to cast spells on this specific unit."],
  4158. type = "toggle",
  4159. },
  4160. healPrediction = {
  4161. order = 4,
  4162. name = L["Heal Prediction"],
  4163. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  4164. type = 'toggle',
  4165. },
  4166. threatStyle = {
  4167. type = 'select',
  4168. order = 5,
  4169. name = L["Threat Display Mode"],
  4170. values = threatValues,
  4171. },
  4172. colorOverride = {
  4173. order = 6,
  4174. name = L["Class Color Override"],
  4175. desc = L["Override the default class color setting."],
  4176. type = 'select',
  4177. values = {
  4178. ['USE_DEFAULT'] = L["Use Default"],
  4179. ['FORCE_ON'] = L["Force On"],
  4180. ['FORCE_OFF'] = L["Force Off"],
  4181. },
  4182. },
  4183. orientation = {
  4184. order = 7,
  4185. type = "select",
  4186. name = L["Frame Orientation"],
  4187. desc = L["Set the orientation of the UnitFrame."],
  4188. values = {
  4189. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  4190. ["LEFT"] = L["Left"],
  4191. ["MIDDLE"] = L["Middle"],
  4192. ["RIGHT"] = L["Right"],
  4193. },
  4194. },
  4195. targetGlow = {
  4196. order = 8,
  4197. type = "toggle",
  4198. name = L["Target Glow"],
  4199. },
  4200. positionsGroup = {
  4201. order = 100,
  4202. name = L["Size and Positions"],
  4203. type = 'group',
  4204. guiInline = true,
  4205. set = function(info, value) E.db.unitframe.units['party'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party', nil, nil, true) end,
  4206. args = {
  4207. width = {
  4208. order = 1,
  4209. name = L["Width"],
  4210. type = 'range',
  4211. min = 10, max = 500, step = 1,
  4212. set = function(info, value) E.db.unitframe.units['party'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4213. },
  4214. height = {
  4215. order = 2,
  4216. name = L["Height"],
  4217. type = 'range',
  4218. min = 10, max = 500, step = 1,
  4219. set = function(info, value) E.db.unitframe.units['party'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4220. },
  4221. spacer = {
  4222. order = 3,
  4223. name = '',
  4224. type = 'description',
  4225. width = 'full',
  4226. },
  4227. growthDirection = {
  4228. order = 4,
  4229. name = L["Growth Direction"],
  4230. desc = L["Growth direction from the first unitframe."],
  4231. type = 'select',
  4232. values = {
  4233. DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]),
  4234. DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]),
  4235. UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]),
  4236. UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]),
  4237. RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]),
  4238. RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]),
  4239. LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]),
  4240. LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]),
  4241. },
  4242. },
  4243. numGroups = {
  4244. order = 7,
  4245. type = 'range',
  4246. name = L["Number of Groups"],
  4247. min = 1, max = 8, step = 1,
  4248. set = function(info, value)
  4249. E.db.unitframe.units['party'][ info[#info] ] = value;
  4250. UF:CreateAndUpdateHeaderGroup('party')
  4251. if ElvUF_Party.isForced then
  4252. UF:HeaderConfig(ElvUF_Party)
  4253. UF:HeaderConfig(ElvUF_Party, true)
  4254. end
  4255. end,
  4256. },
  4257. groupsPerRowCol = {
  4258. order = 8,
  4259. type = 'range',
  4260. name = L["Groups Per Row/Column"],
  4261. min = 1, max = 8, step = 1,
  4262. set = function(info, value)
  4263. E.db.unitframe.units['party'][ info[#info] ] = value;
  4264. UF:CreateAndUpdateHeaderGroup('party')
  4265. if ElvUF_Party.isForced then
  4266. UF:HeaderConfig(ElvUF_Party)
  4267. UF:HeaderConfig(ElvUF_Party, true)
  4268. end
  4269. end,
  4270. },
  4271. horizontalSpacing = {
  4272. order = 9,
  4273. type = 'range',
  4274. name = L["Horizontal Spacing"],
  4275. min = -1, max = 50, step = 1,
  4276. },
  4277. verticalSpacing = {
  4278. order = 10,
  4279. type = 'range',
  4280. name = L["Vertical Spacing"],
  4281. min = -1, max = 50, step = 1,
  4282. },
  4283. },
  4284. },
  4285. visibilityGroup = {
  4286. order = 200,
  4287. name = L["Visibility"],
  4288. type = 'group',
  4289. guiInline = true,
  4290. set = function(info, value) E.db.unitframe.units['party'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party', nil, nil, true) end,
  4291. args = {
  4292. showPlayer = {
  4293. order = 1,
  4294. type = 'toggle',
  4295. name = L["Display Player"],
  4296. desc = L["When true, the header includes the player when not in a raid."],
  4297. },
  4298. visibility = {
  4299. order = 2,
  4300. type = 'input',
  4301. name = L["Visibility"],
  4302. desc = L["The following macro must be true in order for the group to be shown, in addition to any filter that may already be set."],
  4303. width = 'full',
  4304. },
  4305. },
  4306. },
  4307. sortingGroup = {
  4308. order = 300,
  4309. type = 'group',
  4310. guiInline = true,
  4311. name = L["Grouping & Sorting"],
  4312. set = function(info, value) E.db.unitframe.units['party'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party', nil, nil, true) end,
  4313. args = {
  4314. groupBy = {
  4315. order = 1,
  4316. name = L["Group By"],
  4317. desc = L["Set the order that the group will sort."],
  4318. type = 'select',
  4319. values = {
  4320. ['CLASS'] = CLASS,
  4321. ['ROLE'] = ROLE,
  4322. ['NAME'] = NAME,
  4323. ['MTMA'] = L["Main Tanks / Main Assist"],
  4324. ['GROUP'] = GROUP,
  4325. },
  4326. },
  4327. sortDir = {
  4328. order = 2,
  4329. name = L["Sort Direction"],
  4330. desc = L["Defines the sort order of the selected sort method."],
  4331. type = 'select',
  4332. values = {
  4333. ['ASC'] = L["Ascending"],
  4334. ['DESC'] = L["Descending"]
  4335. },
  4336. },
  4337. spacer = {
  4338. order = 3,
  4339. type = 'description',
  4340. width = 'full',
  4341. name = ' '
  4342. },
  4343. raidWideSorting = {
  4344. order = 4,
  4345. name = L["Raid-Wide Sorting"],
  4346. desc = L["Enabling this allows raid-wide sorting however you will not be able to distinguish between groups."],
  4347. type = 'toggle',
  4348. },
  4349. invertGroupingOrder = {
  4350. order = 5,
  4351. name = L["Invert Grouping Order"],
  4352. desc = L["Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from."],
  4353. disabled = function() return not E.db.unitframe.units['party'].raidWideSorting end,
  4354. type = 'toggle',
  4355. },
  4356. startFromCenter = {
  4357. order = 6,
  4358. name = L["Start Near Center"],
  4359. desc = L["The initial group will start near the center and grow out."],
  4360. disabled = function() return not E.db.unitframe.units['party'].raidWideSorting end,
  4361. type = 'toggle',
  4362. },
  4363. },
  4364. },
  4365. },
  4366. },
  4367. buffIndicator = {
  4368. order = 600,
  4369. type = 'group',
  4370. name = L["Buff Indicator"],
  4371. get = function(info) return E.db.unitframe.units['party']['buffIndicator'][ info[#info] ] end,
  4372. set = function(info, value) E.db.unitframe.units['party']['buffIndicator'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4373. args = {
  4374. enable = {
  4375. type = 'toggle',
  4376. name = L["Enable"],
  4377. order = 1,
  4378. },
  4379. size = {
  4380. type = 'range',
  4381. name = L["Size"],
  4382. desc = L["Size of the indicator icon."],
  4383. order = 3,
  4384. min = 4, max = 50, step = 1,
  4385. },
  4386. fontSize = {
  4387. type = 'range',
  4388. name = L["Font Size"],
  4389. order = 4,
  4390. min = 7, max = 212, step = 1,
  4391. },
  4392. profileSpecific = {
  4393. type = 'toggle',
  4394. name = L["Profile Specific"],
  4395. desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."],
  4396. order = 5,
  4397. },
  4398. configureButton = {
  4399. type = 'execute',
  4400. name = L["Configure Auras"],
  4401. func = function()
  4402. if E.db.unitframe.units['party']['buffIndicator'].profileSpecific then
  4403. E:SetToFilterConfig('Buff Indicator (Profile)')
  4404. else
  4405. E:SetToFilterConfig('Buff Indicator')
  4406. end
  4407. end,
  4408. order = 6
  4409. },
  4410. },
  4411. },
  4412. roleIcon = {
  4413. order = 700,
  4414. type = 'group',
  4415. name = L["Role Icon"],
  4416. get = function(info) return E.db.unitframe.units['party']['roleIcon'][ info[#info] ] end,
  4417. set = function(info, value) E.db.unitframe.units['party']['roleIcon'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4418. args = {
  4419. enable = {
  4420. type = 'toggle',
  4421. name = L["Enable"],
  4422. order = 1,
  4423. },
  4424. position = {
  4425. type = 'select',
  4426. order = 2,
  4427. name = L["Position"],
  4428. values = positionValues,
  4429. },
  4430. attachTo = {
  4431. type = 'select',
  4432. order = 3,
  4433. name = L["Attach To"],
  4434. values = {
  4435. ['Health'] = L["Health"],
  4436. ['Power'] = L["Power"],
  4437. ['InfoPanel'] = L["Information Panel"],
  4438. ['Frame'] = L["Frame"],
  4439. },
  4440. },
  4441. xOffset = {
  4442. order = 4,
  4443. type = 'range',
  4444. name = L["xOffset"],
  4445. min = -300, max = 300, step = 1,
  4446. },
  4447. yOffset = {
  4448. order = 5,
  4449. type = 'range',
  4450. name = L["yOffset"],
  4451. min = -300, max = 300, step = 1,
  4452. },
  4453. size = {
  4454. type = 'range',
  4455. order = 6,
  4456. name = L["Size"],
  4457. min = 4, max = 100, step = 1,
  4458. },
  4459. tank = {
  4460. order = 7,
  4461. type = "toggle",
  4462. name = L["Show For Tanks"],
  4463. },
  4464. healer = {
  4465. order = 8,
  4466. type = "toggle",
  4467. name = L["Show For Healers"],
  4468. },
  4469. damager = {
  4470. order = 9,
  4471. type = "toggle",
  4472. name = L["Show For DPS"],
  4473. },
  4474. },
  4475. },
  4476. raidRoleIcons = {
  4477. order = 750,
  4478. type = 'group',
  4479. name = L["RL / ML Icons"],
  4480. get = function(info) return E.db.unitframe.units['party']['raidRoleIcons'][ info[#info] ] end,
  4481. set = function(info, value) E.db.unitframe.units['party']['raidRoleIcons'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4482. args = {
  4483. enable = {
  4484. type = 'toggle',
  4485. name = L["Enable"],
  4486. order = 1,
  4487. },
  4488. position = {
  4489. type = 'select',
  4490. order = 2,
  4491. name = L["Position"],
  4492. values = {
  4493. ['TOPLEFT'] = 'TOPLEFT',
  4494. ['TOPRIGHT'] = 'TOPRIGHT',
  4495. },
  4496. },
  4497. },
  4498. },
  4499. health = GetOptionsTable_Health(true, UF.CreateAndUpdateHeaderGroup, 'party'),
  4500. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateHeaderGroup, 'party'),
  4501. power = GetOptionsTable_Power(false, UF.CreateAndUpdateHeaderGroup, 'party'),
  4502. name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, 'party'),
  4503. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateHeaderGroup, 'party'),
  4504. buffs = GetOptionsTable_Auras(true, 'buffs', true, UF.CreateAndUpdateHeaderGroup, 'party'),
  4505. debuffs = GetOptionsTable_Auras(true, 'debuffs', true, UF.CreateAndUpdateHeaderGroup, 'party'),
  4506. rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, 'party'),
  4507. petsGroup = {
  4508. order = 850,
  4509. type = 'group',
  4510. name = L["Party Pets"],
  4511. get = function(info) return E.db.unitframe.units['party']['petsGroup'][ info[#info] ] end,
  4512. set = function(info, value) E.db.unitframe.units['party']['petsGroup'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4513. args = {
  4514. enable = {
  4515. type = 'toggle',
  4516. name = L["Enable"],
  4517. order = 1,
  4518. },
  4519. width = {
  4520. order = 2,
  4521. name = L["Width"],
  4522. type = 'range',
  4523. min = 10, max = 500, step = 1,
  4524. },
  4525. height = {
  4526. order = 3,
  4527. name = L["Height"],
  4528. type = 'range',
  4529. min = 10, max = 250, step = 1,
  4530. },
  4531. anchorPoint = {
  4532. type = 'select',
  4533. order = 5,
  4534. name = L["Anchor Point"],
  4535. desc = L["What point to anchor to the frame you set to attach to."],
  4536. values = petAnchors,
  4537. },
  4538. xOffset = {
  4539. order = 6,
  4540. type = 'range',
  4541. name = L["xOffset"],
  4542. desc = L["An X offset (in pixels) to be used when anchoring new frames."],
  4543. min = -500, max = 500, step = 1,
  4544. },
  4545. yOffset = {
  4546. order = 7,
  4547. type = 'range',
  4548. name = L["yOffset"],
  4549. desc = L["An Y offset (in pixels) to be used when anchoring new frames."],
  4550. min = -500, max = 500, step = 1,
  4551. },
  4552. name = {
  4553. order = 8,
  4554. type = 'group',
  4555. guiInline = true,
  4556. get = function(info) return E.db.unitframe.units['party']['petsGroup']['name'][ info[#info] ] end,
  4557. set = function(info, value) E.db.unitframe.units['party']['petsGroup']['name'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4558. name = L["Name"],
  4559. args = {
  4560. position = {
  4561. type = 'select',
  4562. order = 1,
  4563. name = L["Text Position"],
  4564. values = positionValues,
  4565. },
  4566. xOffset = {
  4567. order = 2,
  4568. type = 'range',
  4569. name = L["Text xOffset"],
  4570. desc = L["Offset position for text."],
  4571. min = -300, max = 300, step = 1,
  4572. },
  4573. yOffset = {
  4574. order = 3,
  4575. type = 'range',
  4576. name = L["Text yOffset"],
  4577. desc = L["Offset position for text."],
  4578. min = -300, max = 300, step = 1,
  4579. },
  4580. text_format = {
  4581. order = 100,
  4582. name = L["Text Format"],
  4583. type = 'input',
  4584. width = 'full',
  4585. desc = L["TEXT_FORMAT_DESC"],
  4586. },
  4587. },
  4588. },
  4589. },
  4590. },
  4591. targetsGroup = {
  4592. order = 900,
  4593. type = 'group',
  4594. name = L["Party Targets"],
  4595. get = function(info) return E.db.unitframe.units['party']['targetsGroup'][ info[#info] ] end,
  4596. set = function(info, value) E.db.unitframe.units['party']['targetsGroup'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4597. args = {
  4598. enable = {
  4599. type = 'toggle',
  4600. name = L["Enable"],
  4601. order = 1,
  4602. },
  4603. width = {
  4604. order = 2,
  4605. name = L["Width"],
  4606. type = 'range',
  4607. min = 10, max = 500, step = 1,
  4608. },
  4609. height = {
  4610. order = 3,
  4611. name = L["Height"],
  4612. type = 'range',
  4613. min = 10, max = 250, step = 1,
  4614. },
  4615. anchorPoint = {
  4616. type = 'select',
  4617. order = 5,
  4618. name = L["Anchor Point"],
  4619. desc = L["What point to anchor to the frame you set to attach to."],
  4620. values = petAnchors,
  4621. },
  4622. xOffset = {
  4623. order = 6,
  4624. type = 'range',
  4625. name = L["xOffset"],
  4626. desc = L["An X offset (in pixels) to be used when anchoring new frames."],
  4627. min = -500, max = 500, step = 1,
  4628. },
  4629. yOffset = {
  4630. order = 7,
  4631. type = 'range',
  4632. name = L["yOffset"],
  4633. desc = L["An Y offset (in pixels) to be used when anchoring new frames."],
  4634. min = -500, max = 500, step = 1,
  4635. },
  4636. name = {
  4637. order = 8,
  4638. type = 'group',
  4639. guiInline = true,
  4640. get = function(info) return E.db.unitframe.units['party']['targetsGroup']['name'][ info[#info] ] end,
  4641. set = function(info, value) E.db.unitframe.units['party']['targetsGroup']['name'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('party') end,
  4642. name = L["Name"],
  4643. args = {
  4644. position = {
  4645. type = 'select',
  4646. order = 1,
  4647. name = L["Text Position"],
  4648. values = positionValues,
  4649. },
  4650. xOffset = {
  4651. order = 2,
  4652. type = 'range',
  4653. name = L["Text xOffset"],
  4654. desc = L["Offset position for text."],
  4655. min = -300, max = 300, step = 1,
  4656. },
  4657. yOffset = {
  4658. order = 3,
  4659. type = 'range',
  4660. name = L["Text yOffset"],
  4661. desc = L["Offset position for text."],
  4662. min = -300, max = 300, step = 1,
  4663. },
  4664. text_format = {
  4665. order = 100,
  4666. name = L["Text Format"],
  4667. type = 'input',
  4668. width = 'full',
  4669. desc = L["TEXT_FORMAT_DESC"],
  4670. },
  4671. },
  4672. },
  4673. },
  4674. },
  4675. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, 'party'),
  4676. },
  4677. }
  4678.  
  4679. --Raid Frames
  4680. E.Options.args.unitframe.args['raid'] = {
  4681. name = L["Raid Frames"],
  4682. type = 'group',
  4683. order = 1100,
  4684. childGroups = "select",
  4685. get = function(info) return E.db.unitframe.units['raid'][ info[#info] ] end,
  4686. set = function(info, value) E.db.unitframe.units['raid'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid') end,
  4687. args = {
  4688. configureToggle = {
  4689. order = 1,
  4690. type = 'execute',
  4691. name = L["Display Frames"],
  4692. func = function()
  4693. UF:HeaderConfig(_G['ElvUF_Raid'], _G['ElvUF_Raid'].forceShow ~= true or nil)
  4694. end,
  4695. },
  4696. resetSettings = {
  4697. type = 'execute',
  4698. order = 2,
  4699. name = L["Restore Defaults"],
  4700. func = function(info, value) UF:ResetUnitSettings('raid'); E:ResetMovers('Raid Frames') end,
  4701. },
  4702. copyFrom = {
  4703. type = 'select',
  4704. order = 3,
  4705. name = L["Copy From"],
  4706. desc = L["Select a unit to copy settings from."],
  4707. values = {
  4708. ['party'] = L["Party Frames"],
  4709. ['raid40'] = L["Raid40 Frames"],
  4710. },
  4711. set = function(info, value) UF:MergeUnitSettings(value, 'raid', true); end,
  4712. },
  4713. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateHeaderGroup, 'raid', nil, 4),
  4714. general = {
  4715. order = 5,
  4716. type = 'group',
  4717. name = L["General"],
  4718. args = {
  4719. enable = {
  4720. type = 'toggle',
  4721. order = 1,
  4722. name = L["Enable"],
  4723. },
  4724. hideonnpc = {
  4725. type = 'toggle',
  4726. order = 2,
  4727. name = L["Text Toggle On NPC"],
  4728. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  4729. get = function(info) return E.db.unitframe.units['raid']['power'].hideonnpc end,
  4730. set = function(info, value) E.db.unitframe.units['raid']['power'].hideonnpc = value; UF:CreateAndUpdateHeaderGroup('raid'); end,
  4731. },
  4732. rangeCheck = {
  4733. order = 3,
  4734. name = L["Range Check"],
  4735. desc = L["Check if you are in range to cast spells on this specific unit."],
  4736. type = "toggle",
  4737. },
  4738. healPrediction = {
  4739. order = 4,
  4740. name = L["Heal Prediction"],
  4741. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  4742. type = 'toggle',
  4743. },
  4744. threatStyle = {
  4745. type = 'select',
  4746. order = 5,
  4747. name = L["Threat Display Mode"],
  4748. values = threatValues,
  4749. },
  4750. colorOverride = {
  4751. order = 6,
  4752. name = L["Class Color Override"],
  4753. desc = L["Override the default class color setting."],
  4754. type = 'select',
  4755. values = {
  4756. ['USE_DEFAULT'] = L["Use Default"],
  4757. ['FORCE_ON'] = L["Force On"],
  4758. ['FORCE_OFF'] = L["Force Off"],
  4759. },
  4760. },
  4761. orientation = {
  4762. order = 7,
  4763. type = "select",
  4764. name = L["Frame Orientation"],
  4765. desc = L["Set the orientation of the UnitFrame."],
  4766. values = {
  4767. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  4768. ["LEFT"] = L["Left"],
  4769. ["MIDDLE"] = L["Middle"],
  4770. ["RIGHT"] = L["Right"],
  4771. },
  4772. },
  4773. targetGlow = {
  4774. order = 8,
  4775. type = "toggle",
  4776. name = L["Target Glow"],
  4777. },
  4778. positionsGroup = {
  4779. order = 100,
  4780. name = L["Size and Positions"],
  4781. type = 'group',
  4782. guiInline = true,
  4783. set = function(info, value) E.db.unitframe.units['raid'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid', nil, nil, true) end,
  4784. args = {
  4785. width = {
  4786. order = 1,
  4787. name = L["Width"],
  4788. type = 'range',
  4789. min = 10, max = 500, step = 1,
  4790. set = function(info, value) E.db.unitframe.units['raid'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid') end,
  4791. },
  4792. height = {
  4793. order = 2,
  4794. name = L["Height"],
  4795. type = 'range',
  4796. min = 10, max = 500, step = 1,
  4797. set = function(info, value) E.db.unitframe.units['raid'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid') end,
  4798. },
  4799. spacer = {
  4800. order = 3,
  4801. name = '',
  4802. type = 'description',
  4803. width = 'full',
  4804. },
  4805. growthDirection = {
  4806. order = 4,
  4807. name = L["Growth Direction"],
  4808. desc = L["Growth direction from the first unitframe."],
  4809. type = 'select',
  4810. values = {
  4811. DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]),
  4812. DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]),
  4813. UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]),
  4814. UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]),
  4815. RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]),
  4816. RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]),
  4817. LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]),
  4818. LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]),
  4819. },
  4820. },
  4821. numGroups = {
  4822. order = 7,
  4823. type = 'range',
  4824. name = L["Number of Groups"],
  4825. min = 1, max = 8, step = 1,
  4826. set = function(info, value)
  4827. E.db.unitframe.units['raid'][ info[#info] ] = value;
  4828. UF:CreateAndUpdateHeaderGroup('raid')
  4829. if _G['ElvUF_Raid'].isForced then
  4830. UF:HeaderConfig(_G['ElvUF_Raid'])
  4831. UF:HeaderConfig(_G['ElvUF_Raid'], true)
  4832. end
  4833. end,
  4834. },
  4835. groupsPerRowCol = {
  4836. order = 8,
  4837. type = 'range',
  4838. name = L["Groups Per Row/Column"],
  4839. min = 1, max = 8, step = 1,
  4840. set = function(info, value)
  4841. E.db.unitframe.units['raid'][ info[#info] ] = value;
  4842. UF:CreateAndUpdateHeaderGroup('raid')
  4843. if _G['ElvUF_Raid'].isForced then
  4844. UF:HeaderConfig(_G['ElvUF_Raid'])
  4845. UF:HeaderConfig(_G['ElvUF_Raid'], true)
  4846. end
  4847. end,
  4848. },
  4849. horizontalSpacing = {
  4850. order = 9,
  4851. type = 'range',
  4852. name = L["Horizontal Spacing"],
  4853. min = -1, max = 50, step = 1,
  4854. },
  4855. verticalSpacing = {
  4856. order = 10,
  4857. type = 'range',
  4858. name = L["Vertical Spacing"],
  4859. min = -1, max = 50, step = 1,
  4860. },
  4861. },
  4862. },
  4863. visibilityGroup = {
  4864. order = 200,
  4865. name = L["Visibility"],
  4866. type = 'group',
  4867. guiInline = true,
  4868. set = function(info, value) E.db.unitframe.units['raid'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid', nil, nil, true) end,
  4869. args = {
  4870. showPlayer = {
  4871. order = 1,
  4872. type = 'toggle',
  4873. name = L["Display Player"],
  4874. desc = L["When true, the header includes the player when not in a raid."],
  4875. },
  4876. visibility = {
  4877. order = 2,
  4878. type = 'input',
  4879. name = L["Visibility"],
  4880. desc = L["The following macro must be true in order for the group to be shown, in addition to any filter that may already be set."],
  4881. width = 'full',
  4882. },
  4883. },
  4884. },
  4885. sortingGroup = {
  4886. order = 300,
  4887. type = 'group',
  4888. guiInline = true,
  4889. name = L["Grouping & Sorting"],
  4890. set = function(info, value) E.db.unitframe.units['raid'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid', nil, nil, true) end,
  4891. args = {
  4892. groupBy = {
  4893. order = 1,
  4894. name = L["Group By"],
  4895. desc = L["Set the order that the group will sort."],
  4896. type = 'select',
  4897. values = {
  4898. ['CLASS'] = CLASS,
  4899. ['ROLE'] = ROLE,
  4900. ['NAME'] = NAME,
  4901. ['MTMA'] = L["Main Tanks / Main Assist"],
  4902. ['GROUP'] = GROUP,
  4903. },
  4904. },
  4905. sortDir = {
  4906. order = 2,
  4907. name = L["Sort Direction"],
  4908. desc = L["Defines the sort order of the selected sort method."],
  4909. type = 'select',
  4910. values = {
  4911. ['ASC'] = L["Ascending"],
  4912. ['DESC'] = L["Descending"]
  4913. },
  4914. },
  4915. spacer = {
  4916. order = 3,
  4917. type = 'description',
  4918. width = 'full',
  4919. name = ' '
  4920. },
  4921. raidWideSorting = {
  4922. order = 4,
  4923. name = L["Raid-Wide Sorting"],
  4924. desc = L["Enabling this allows raid-wide sorting however you will not be able to distinguish between groups."],
  4925. type = 'toggle',
  4926. },
  4927. invertGroupingOrder = {
  4928. order = 5,
  4929. name = L["Invert Grouping Order"],
  4930. desc = L["Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from."],
  4931. disabled = function() return not E.db.unitframe.units['raid'].raidWideSorting end,
  4932. type = 'toggle',
  4933. },
  4934. startFromCenter = {
  4935. order = 6,
  4936. name = L["Start Near Center"],
  4937. desc = L["The initial group will start near the center and grow out."],
  4938. disabled = function() return not E.db.unitframe.units['raid'].raidWideSorting end,
  4939. type = 'toggle',
  4940. },
  4941. },
  4942. },
  4943. },
  4944. },
  4945. health = GetOptionsTable_Health(true, UF.CreateAndUpdateHeaderGroup, 'raid'),
  4946. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateHeaderGroup, 'raid'),
  4947. power = GetOptionsTable_Power(false, UF.CreateAndUpdateHeaderGroup, 'raid'),
  4948. name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, 'raid'),
  4949. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateHeaderGroup, 'raid'),
  4950. buffs = GetOptionsTable_Auras(true, 'buffs', true, UF.CreateAndUpdateHeaderGroup, 'raid'),
  4951. debuffs = GetOptionsTable_Auras(true, 'debuffs', true, UF.CreateAndUpdateHeaderGroup, 'raid'),
  4952. buffIndicator = {
  4953. order = 600,
  4954. type = 'group',
  4955. name = L["Buff Indicator"],
  4956. get = function(info) return E.db.unitframe.units['raid']['buffIndicator'][ info[#info] ] end,
  4957. set = function(info, value) E.db.unitframe.units['raid']['buffIndicator'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid') end,
  4958. args = {
  4959. enable = {
  4960. type = 'toggle',
  4961. name = L["Enable"],
  4962. order = 1,
  4963. },
  4964. size = {
  4965. type = 'range',
  4966. name = L["Size"],
  4967. desc = L["Size of the indicator icon."],
  4968. order = 3,
  4969. min = 4, max = 50, step = 1,
  4970. },
  4971. fontSize = {
  4972. type = 'range',
  4973. name = L["Font Size"],
  4974. order = 4,
  4975. min = 7, max = 212, step = 1,
  4976. },
  4977. profileSpecific = {
  4978. type = 'toggle',
  4979. name = L["Profile Specific"],
  4980. desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."],
  4981. order = 5,
  4982. },
  4983. configureButton = {
  4984. type = 'execute',
  4985. name = L["Configure Auras"],
  4986. func = function()
  4987. if E.db.unitframe.units['raid']['buffIndicator'].profileSpecific then
  4988. E:SetToFilterConfig('Buff Indicator (Profile)')
  4989. else
  4990. E:SetToFilterConfig('Buff Indicator')
  4991. end
  4992. end,
  4993. order = 6
  4994. },
  4995. },
  4996. },
  4997. roleIcon = {
  4998. order = 700,
  4999. type = 'group',
  5000. name = L["Role Icon"],
  5001. get = function(info) return E.db.unitframe.units['raid']['roleIcon'][ info[#info] ] end,
  5002. set = function(info, value) E.db.unitframe.units['raid']['roleIcon'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid') end,
  5003. args = {
  5004. enable = {
  5005. type = 'toggle',
  5006. name = L["Enable"],
  5007. order = 1,
  5008. },
  5009. position = {
  5010. type = 'select',
  5011. order = 2,
  5012. name = L["Position"],
  5013. values = positionValues,
  5014. },
  5015. attachTo = {
  5016. type = 'select',
  5017. order = 3,
  5018. name = L["Attach To"],
  5019. values = {
  5020. ['Health'] = L["Health"],
  5021. ['Power'] = L["Power"],
  5022. ['InfoPanel'] = L["Information Panel"],
  5023. ['Frame'] = L["Frame"],
  5024. },
  5025. },
  5026. xOffset = {
  5027. order = 4,
  5028. type = 'range',
  5029. name = L["xOffset"],
  5030. min = -300, max = 300, step = 1,
  5031. },
  5032. yOffset = {
  5033. order = 5,
  5034. type = 'range',
  5035. name = L["yOffset"],
  5036. min = -300, max = 300, step = 1,
  5037. },
  5038. size = {
  5039. type = 'range',
  5040. order = 6,
  5041. name = L["Size"],
  5042. min = 4, max = 100, step = 1,
  5043. },
  5044. tank = {
  5045. order = 7,
  5046. type = "toggle",
  5047. name = L["Show For Tanks"],
  5048. },
  5049. healer = {
  5050. order = 8,
  5051. type = "toggle",
  5052. name = L["Show For Healers"],
  5053. },
  5054. damager = {
  5055. order = 9,
  5056. type = "toggle",
  5057. name = L["Show For DPS"],
  5058. },
  5059. },
  5060. },
  5061. raidRoleIcons = {
  5062. order = 750,
  5063. type = 'group',
  5064. name = L["RL / ML Icons"],
  5065. get = function(info) return E.db.unitframe.units['raid']['raidRoleIcons'][ info[#info] ] end,
  5066. set = function(info, value) E.db.unitframe.units['raid']['raidRoleIcons'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid') end,
  5067. args = {
  5068. enable = {
  5069. type = 'toggle',
  5070. name = L["Enable"],
  5071. order = 1,
  5072. },
  5073. position = {
  5074. type = 'select',
  5075. order = 2,
  5076. name = L["Position"],
  5077. values = {
  5078. ['TOPLEFT'] = 'TOPLEFT',
  5079. ['TOPRIGHT'] = 'TOPRIGHT',
  5080. },
  5081. },
  5082. },
  5083. },
  5084. rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, 'raid'),
  5085. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, 'raid'),
  5086. },
  5087. }
  5088.  
  5089. --Raid-40 Frames
  5090. E.Options.args.unitframe.args['raid40'] = {
  5091. name = L["Raid-40 Frames"],
  5092. type = 'group',
  5093. order = 1100,
  5094. childGroups = "select",
  5095. get = function(info) return E.db.unitframe.units['raid40'][ info[#info] ] end,
  5096. set = function(info, value) E.db.unitframe.units['raid40'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40') end,
  5097. args = {
  5098. configureToggle = {
  5099. order = 1,
  5100. type = 'execute',
  5101. name = L["Display Frames"],
  5102. func = function()
  5103. UF:HeaderConfig(_G['ElvUF_Raid40'], _G['ElvUF_Raid40'].forceShow ~= true or nil)
  5104. end,
  5105. },
  5106. resetSettings = {
  5107. type = 'execute',
  5108. order = 2,
  5109. name = L["Restore Defaults"],
  5110. func = function(info, value) UF:ResetUnitSettings('raid40'); E:ResetMovers('Raid Frames') end,
  5111. },
  5112. copyFrom = {
  5113. type = 'select',
  5114. order = 3,
  5115. name = L["Copy From"],
  5116. desc = L["Select a unit to copy settings from."],
  5117. values = {
  5118. ['party'] = L["Party Frames"],
  5119. ['raid'] = L["Raid Frames"],
  5120. },
  5121. set = function(info, value) UF:MergeUnitSettings(value, 'raid40', true); end,
  5122. },
  5123. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateHeaderGroup, 'raid40', nil, 4),
  5124. general = {
  5125. order = 5,
  5126. type = 'group',
  5127. name = L["General"],
  5128. args = {
  5129. enable = {
  5130. type = 'toggle',
  5131. order = 1,
  5132. name = L["Enable"],
  5133. },
  5134. hideonnpc = {
  5135. type = 'toggle',
  5136. order = 2,
  5137. name = L["Text Toggle On NPC"],
  5138. desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."],
  5139. get = function(info) return E.db.unitframe.units['raid40']['power'].hideonnpc end,
  5140. set = function(info, value) E.db.unitframe.units['raid40']['power'].hideonnpc = value; UF:CreateAndUpdateHeaderGroup('raid40'); end,
  5141. },
  5142. rangeCheck = {
  5143. order = 3,
  5144. name = L["Range Check"],
  5145. desc = L["Check if you are in range to cast spells on this specific unit."],
  5146. type = "toggle",
  5147. },
  5148. healPrediction = {
  5149. order = 4,
  5150. name = L["Heal Prediction"],
  5151. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  5152. type = 'toggle',
  5153. },
  5154. threatStyle = {
  5155. type = 'select',
  5156. order = 5,
  5157. name = L["Threat Display Mode"],
  5158. values = threatValues,
  5159. },
  5160. colorOverride = {
  5161. order = 6,
  5162. name = L["Class Color Override"],
  5163. desc = L["Override the default class color setting."],
  5164. type = 'select',
  5165. values = {
  5166. ['USE_DEFAULT'] = L["Use Default"],
  5167. ['FORCE_ON'] = L["Force On"],
  5168. ['FORCE_OFF'] = L["Force Off"],
  5169. },
  5170. },
  5171. orientation = {
  5172. order = 7,
  5173. type = "select",
  5174. name = L["Frame Orientation"],
  5175. desc = L["Set the orientation of the UnitFrame."],
  5176. values = {
  5177. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  5178. ["LEFT"] = L["Left"],
  5179. ["MIDDLE"] = L["Middle"],
  5180. ["RIGHT"] = L["Right"],
  5181. },
  5182. },
  5183. targetGlow = {
  5184. order = 8,
  5185. type = "toggle",
  5186. name = L["Target Glow"],
  5187. },
  5188. positionsGroup = {
  5189. order = 100,
  5190. name = L["Size and Positions"],
  5191. type = 'group',
  5192. guiInline = true,
  5193. set = function(info, value) E.db.unitframe.units['raid40'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40', nil, nil, true) end,
  5194. args = {
  5195. width = {
  5196. order = 1,
  5197. name = L["Width"],
  5198. type = 'range',
  5199. min = 10, max = 500, step = 1,
  5200. set = function(info, value) E.db.unitframe.units['raid40'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40') end,
  5201. },
  5202. height = {
  5203. order = 2,
  5204. name = L["Height"],
  5205. type = 'range',
  5206. min = 10, max = 500, step = 1,
  5207. set = function(info, value) E.db.unitframe.units['raid40'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40') end,
  5208. },
  5209. spacer = {
  5210. order = 3,
  5211. name = '',
  5212. type = 'description',
  5213. width = 'full',
  5214. },
  5215. growthDirection = {
  5216. order = 4,
  5217. name = L["Growth Direction"],
  5218. desc = L["Growth direction from the first unitframe."],
  5219. type = 'select',
  5220. values = {
  5221. DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]),
  5222. DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]),
  5223. UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]),
  5224. UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]),
  5225. RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]),
  5226. RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]),
  5227. LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]),
  5228. LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]),
  5229. },
  5230. },
  5231. numGroups = {
  5232. order = 7,
  5233. type = 'range',
  5234. name = L["Number of Groups"],
  5235. min = 1, max = 8, step = 1,
  5236. set = function(info, value)
  5237. E.db.unitframe.units['raid40'][ info[#info] ] = value;
  5238. UF:CreateAndUpdateHeaderGroup('raid40')
  5239. if _G['ElvUF_Raid'].isForced then
  5240. UF:HeaderConfig(_G['ElvUF_Raid40'])
  5241. UF:HeaderConfig(_G['ElvUF_Raid40'], true)
  5242. end
  5243. end,
  5244. },
  5245. groupsPerRowCol = {
  5246. order = 8,
  5247. type = 'range',
  5248. name = L["Groups Per Row/Column"],
  5249. min = 1, max = 8, step = 1,
  5250. set = function(info, value)
  5251. E.db.unitframe.units['raid40'][ info[#info] ] = value;
  5252. UF:CreateAndUpdateHeaderGroup('raid40')
  5253. if _G['ElvUF_Raid'].isForced then
  5254. UF:HeaderConfig(_G['ElvUF_Raid40'])
  5255. UF:HeaderConfig(_G['ElvUF_Raid40'], true)
  5256. end
  5257. end,
  5258. },
  5259. horizontalSpacing = {
  5260. order = 9,
  5261. type = 'range',
  5262. name = L["Horizontal Spacing"],
  5263. min = -1, max = 50, step = 1,
  5264. },
  5265. verticalSpacing = {
  5266. order = 10,
  5267. type = 'range',
  5268. name = L["Vertical Spacing"],
  5269. min = -1, max = 50, step = 1,
  5270. },
  5271. },
  5272. },
  5273. visibilityGroup = {
  5274. order = 200,
  5275. name = L["Visibility"],
  5276. type = 'group',
  5277. guiInline = true,
  5278. set = function(info, value) E.db.unitframe.units['raid40'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40', nil, nil, true) end,
  5279. args = {
  5280. showPlayer = {
  5281. order = 1,
  5282. type = 'toggle',
  5283. name = L["Display Player"],
  5284. desc = L["When true, the header includes the player when not in a raid."],
  5285. },
  5286. visibility = {
  5287. order = 2,
  5288. type = 'input',
  5289. name = L["Visibility"],
  5290. desc = L["The following macro must be true in order for the group to be shown, in addition to any filter that may already be set."],
  5291. width = 'full',
  5292. },
  5293. },
  5294. },
  5295. sortingGroup = {
  5296. order = 300,
  5297. type = 'group',
  5298. guiInline = true,
  5299. name = L["Grouping & Sorting"],
  5300. set = function(info, value) E.db.unitframe.units['raid40'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40', nil, nil, true) end,
  5301. args = {
  5302. groupBy = {
  5303. order = 1,
  5304. name = L["Group By"],
  5305. desc = L["Set the order that the group will sort."],
  5306. type = 'select',
  5307. values = {
  5308. ['CLASS'] = CLASS,
  5309. ['ROLE'] = ROLE,
  5310. ['NAME'] = NAME,
  5311. ['MTMA'] = L["Main Tanks / Main Assist"],
  5312. ['GROUP'] = GROUP,
  5313. },
  5314. },
  5315. sortDir = {
  5316. order = 2,
  5317. name = L["Sort Direction"],
  5318. desc = L["Defines the sort order of the selected sort method."],
  5319. type = 'select',
  5320. values = {
  5321. ['ASC'] = L["Ascending"],
  5322. ['DESC'] = L["Descending"]
  5323. },
  5324. },
  5325. spacer = {
  5326. order = 3,
  5327. type = 'description',
  5328. width = 'full',
  5329. name = ' '
  5330. },
  5331. raidWideSorting = {
  5332. order = 4,
  5333. name = L["Raid-Wide Sorting"],
  5334. desc = L["Enabling this allows raid-wide sorting however you will not be able to distinguish between groups."],
  5335. type = 'toggle',
  5336. },
  5337. invertGroupingOrder = {
  5338. order = 5,
  5339. name = L["Invert Grouping Order"],
  5340. desc = L["Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from."],
  5341. disabled = function() return not E.db.unitframe.units['raid40'].raidWideSorting end,
  5342. type = 'toggle',
  5343. },
  5344. startFromCenter = {
  5345. order = 6,
  5346. name = L["Start Near Center"],
  5347. desc = L["The initial group will start near the center and grow out."],
  5348. disabled = function() return not E.db.unitframe.units['raid40'].raidWideSorting end,
  5349. type = 'toggle',
  5350. },
  5351. },
  5352. },
  5353. },
  5354. },
  5355. health = GetOptionsTable_Health(true, UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5356. infoPanel = GetOptionsTable_InformationPanel(UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5357. power = GetOptionsTable_Power(false, UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5358. name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5359. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5360. buffs = GetOptionsTable_Auras(true, 'buffs', true, UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5361. debuffs = GetOptionsTable_Auras(true, 'debuffs', true, UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5362. buffIndicator = {
  5363. order = 600,
  5364. type = 'group',
  5365. name = L["Buff Indicator"],
  5366. get = function(info) return E.db.unitframe.units['raid40']['buffIndicator'][ info[#info] ] end,
  5367. set = function(info, value) E.db.unitframe.units['raid40']['buffIndicator'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40') end,
  5368. args = {
  5369. enable = {
  5370. type = 'toggle',
  5371. name = L["Enable"],
  5372. order = 1,
  5373. },
  5374. size = {
  5375. type = 'range',
  5376. name = L["Size"],
  5377. desc = L["Size of the indicator icon."],
  5378. order = 3,
  5379. min = 4, max = 50, step = 1,
  5380. },
  5381. fontSize = {
  5382. type = 'range',
  5383. name = L["Font Size"],
  5384. order = 4,
  5385. min = 7, max = 212, step = 1,
  5386. },
  5387. profileSpecific = {
  5388. type = 'toggle',
  5389. name = L["Profile Specific"],
  5390. desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."],
  5391. order = 5,
  5392. },
  5393. configureButton = {
  5394. type = 'execute',
  5395. name = L["Configure Auras"],
  5396. func = function()
  5397. if E.db.unitframe.units['raid40']['buffIndicator'].profileSpecific then
  5398. E:SetToFilterConfig('Buff Indicator (Profile)')
  5399. else
  5400. E:SetToFilterConfig('Buff Indicator')
  5401. end
  5402. end,
  5403. order = 6
  5404. },
  5405. },
  5406. },
  5407. roleIcon = {
  5408. order = 700,
  5409. type = 'group',
  5410. name = L["Role Icon"],
  5411. get = function(info) return E.db.unitframe.units['raid40']['roleIcon'][ info[#info] ] end,
  5412. set = function(info, value) E.db.unitframe.units['raid40']['roleIcon'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40') end,
  5413. args = {
  5414. enable = {
  5415. type = 'toggle',
  5416. name = L["Enable"],
  5417. order = 1,
  5418. },
  5419. position = {
  5420. type = 'select',
  5421. order = 2,
  5422. name = L["Position"],
  5423. values = positionValues,
  5424. },
  5425. attachTo = {
  5426. type = 'select',
  5427. order = 3,
  5428. name = L["Attach To"],
  5429. values = {
  5430. ['Health'] = L["Health"],
  5431. ['Power'] = L["Power"],
  5432. ['InfoPanel'] = L["Information Panel"],
  5433. ['Frame'] = L["Frame"],
  5434. },
  5435. },
  5436. xOffset = {
  5437. order = 4,
  5438. type = 'range',
  5439. name = L["xOffset"],
  5440. min = -300, max = 300, step = 1,
  5441. },
  5442. yOffset = {
  5443. order = 5,
  5444. type = 'range',
  5445. name = L["yOffset"],
  5446. min = -300, max = 300, step = 1,
  5447. },
  5448. size = {
  5449. type = 'range',
  5450. order = 6,
  5451. name = L["Size"],
  5452. min = 4, max = 100, step = 1,
  5453. },
  5454. tank = {
  5455. order = 7,
  5456. type = "toggle",
  5457. name = L["Show For Tanks"],
  5458. },
  5459. healer = {
  5460. order = 8,
  5461. type = "toggle",
  5462. name = L["Show For Healers"],
  5463. },
  5464. damager = {
  5465. order = 9,
  5466. type = "toggle",
  5467. name = L["Show For DPS"],
  5468. },
  5469. },
  5470. },
  5471. raidRoleIcons = {
  5472. order = 750,
  5473. type = 'group',
  5474. name = L["RL / ML Icons"],
  5475. get = function(info) return E.db.unitframe.units['raid40']['raidRoleIcons'][ info[#info] ] end,
  5476. set = function(info, value) E.db.unitframe.units['raid40']['raidRoleIcons'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid40') end,
  5477. args = {
  5478. enable = {
  5479. type = 'toggle',
  5480. name = L["Enable"],
  5481. order = 1,
  5482. },
  5483. position = {
  5484. type = 'select',
  5485. order = 2,
  5486. name = L["Position"],
  5487. values = {
  5488. ['TOPLEFT'] = 'TOPLEFT',
  5489. ['TOPRIGHT'] = 'TOPRIGHT',
  5490. },
  5491. },
  5492. },
  5493. },
  5494. rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5495. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, 'raid40'),
  5496. },
  5497. }
  5498.  
  5499. --Raid Pet Frames
  5500. E.Options.args.unitframe.args.raidpet = {
  5501. order = 1200,
  5502. type = 'group',
  5503. name = L["Raid Pet Frames"],
  5504. childGroups = "select",
  5505. get = function(info) return E.db.unitframe.units['raidpet'][ info[#info] ] end,
  5506. set = function(info, value) E.db.unitframe.units['raidpet'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raidpet') end,
  5507. args = {
  5508. configureToggle = {
  5509. order = 1,
  5510. type = 'execute',
  5511. name = L["Display Frames"],
  5512. func = function()
  5513. UF:HeaderConfig(ElvUF_Raidpet, ElvUF_Raidpet.forceShow ~= true or nil)
  5514. end,
  5515. },
  5516. resetSettings = {
  5517. type = 'execute',
  5518. order = 2,
  5519. name = L["Restore Defaults"],
  5520. func = function(info, value) UF:ResetUnitSettings('raidpet'); E:ResetMovers('Raid Pet Frames'); UF:CreateAndUpdateHeaderGroup('raidpet', nil, nil, true); end,
  5521. },
  5522. copyFrom = {
  5523. type = 'select',
  5524. order = 3,
  5525. name = L["Copy From"],
  5526. desc = L["Select a unit to copy settings from."],
  5527. values = {
  5528. ['party'] = L["Party Frames"],
  5529. ['raid'] = L["Raid Frames"],
  5530. },
  5531. set = function(info, value) UF:MergeUnitSettings(value, 'raidpet', true); end,
  5532. },
  5533. customText = GetOptionsTable_CustomText(UF.CreateAndUpdateHeaderGroup, 'raidpet', nil, 4),
  5534. general = {
  5535. order = 5,
  5536. type = 'group',
  5537. name = L["General"],
  5538. args = {
  5539. enable = {
  5540. type = 'toggle',
  5541. order = 1,
  5542. name = L["Enable"],
  5543. },
  5544. rangeCheck = {
  5545. order = 3,
  5546. name = L["Range Check"],
  5547. desc = L["Check if you are in range to cast spells on this specific unit."],
  5548. type = "toggle",
  5549. },
  5550. healPrediction = {
  5551. order = 4,
  5552. name = L["Heal Prediction"],
  5553. desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."],
  5554. type = 'toggle',
  5555. },
  5556. threatStyle = {
  5557. type = 'select',
  5558. order = 5,
  5559. name = L["Threat Display Mode"],
  5560. values = threatValues,
  5561. },
  5562. colorOverride = {
  5563. order = 6,
  5564. name = L["Class Color Override"],
  5565. desc = L["Override the default class color setting."],
  5566. type = 'select',
  5567. values = {
  5568. ['USE_DEFAULT'] = L["Use Default"],
  5569. ['FORCE_ON'] = L["Force On"],
  5570. ['FORCE_OFF'] = L["Force Off"],
  5571. },
  5572. },
  5573. orientation = {
  5574. order = 7,
  5575. type = "select",
  5576. name = L["Frame Orientation"],
  5577. desc = L["Set the orientation of the UnitFrame."],
  5578. values = {
  5579. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  5580. ["LEFT"] = L["Left"],
  5581. ["MIDDLE"] = L["Middle"],
  5582. ["RIGHT"] = L["Right"],
  5583. },
  5584. },
  5585. positionsGroup = {
  5586. order = 100,
  5587. name = L["Size and Positions"],
  5588. type = 'group',
  5589. guiInline = true,
  5590. set = function(info, value) E.db.unitframe.units['raidpet'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raidpet', nil, nil, true) end,
  5591. args = {
  5592. width = {
  5593. order = 1,
  5594. name = L["Width"],
  5595. type = 'range',
  5596. min = 10, max = 500, step = 1,
  5597. set = function(info, value) E.db.unitframe.units['raidpet'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raidpet') end,
  5598. },
  5599. height = {
  5600. order = 2,
  5601. name = L["Height"],
  5602. type = 'range',
  5603. min = 10, max = 500, step = 1,
  5604. set = function(info, value) E.db.unitframe.units['raidpet'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raidpet') end,
  5605. },
  5606. spacer = {
  5607. order = 3,
  5608. name = '',
  5609. type = 'description',
  5610. width = 'full',
  5611. },
  5612. growthDirection = {
  5613. order = 4,
  5614. name = L["Growth Direction"],
  5615. desc = L["Growth direction from the first unitframe."],
  5616. type = 'select',
  5617. values = {
  5618. DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]),
  5619. DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]),
  5620. UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]),
  5621. UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]),
  5622. RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]),
  5623. RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]),
  5624. LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]),
  5625. LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]),
  5626. },
  5627. },
  5628. numGroups = {
  5629. order = 7,
  5630. type = 'range',
  5631. name = L["Number of Groups"],
  5632. min = 1, max = 8, step = 1,
  5633. set = function(info, value)
  5634. E.db.unitframe.units['raidpet'][ info[#info] ] = value;
  5635. UF:CreateAndUpdateHeaderGroup('raidpet')
  5636. if ElvUF_Raidpet.isForced then
  5637. UF:HeaderConfig(ElvUF_Raidpet)
  5638. UF:HeaderConfig(ElvUF_Raidpet, true)
  5639. end
  5640. end,
  5641. },
  5642. groupsPerRowCol = {
  5643. order = 8,
  5644. type = 'range',
  5645. name = L["Groups Per Row/Column"],
  5646. min = 1, max = 8, step = 1,
  5647. set = function(info, value)
  5648. E.db.unitframe.units['raidpet'][ info[#info] ] = value;
  5649. UF:CreateAndUpdateHeaderGroup('raidpet')
  5650. if ElvUF_Raidpet.isForced then
  5651. UF:HeaderConfig(ElvUF_Raidpet)
  5652. UF:HeaderConfig(ElvUF_Raidpet, true)
  5653. end
  5654. end,
  5655. },
  5656. horizontalSpacing = {
  5657. order = 9,
  5658. type = 'range',
  5659. name = L["Horizontal Spacing"],
  5660. min = -1, max = 50, step = 1,
  5661. },
  5662. verticalSpacing = {
  5663. order = 10,
  5664. type = 'range',
  5665. name = L["Vertical Spacing"],
  5666. min = -1, max = 50, step = 1,
  5667. },
  5668. },
  5669. },
  5670. visibilityGroup = {
  5671. order = 200,
  5672. name = L["Visibility"],
  5673. type = 'group',
  5674. guiInline = true,
  5675. set = function(info, value) E.db.unitframe.units['raidpet'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raidpet', nil, nil, true) end,
  5676. args = {
  5677. visibility = {
  5678. order = 2,
  5679. type = 'input',
  5680. name = L["Visibility"],
  5681. desc = L["The following macro must be true in order for the group to be shown, in addition to any filter that may already be set."],
  5682. width = 'full',
  5683. },
  5684. },
  5685. },
  5686. sortingGroup = {
  5687. order = 300,
  5688. type = 'group',
  5689. guiInline = true,
  5690. name = L["Grouping & Sorting"],
  5691. set = function(info, value) E.db.unitframe.units['raidpet'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raidpet', nil, nil, true) end,
  5692. args = {
  5693. groupBy = {
  5694. order = 1,
  5695. name = L["Group By"],
  5696. desc = L["Set the order that the group will sort."],
  5697. type = 'select',
  5698. values = {
  5699. ['NAME'] = L["Owners Name"],
  5700. ['PETNAME'] = L["Pet Name"],
  5701. ['GROUP'] = GROUP,
  5702. },
  5703. },
  5704. sortDir = {
  5705. order = 2,
  5706. name = L["Sort Direction"],
  5707. desc = L["Defines the sort order of the selected sort method."],
  5708. type = 'select',
  5709. values = {
  5710. ['ASC'] = L["Ascending"],
  5711. ['DESC'] = L["Descending"]
  5712. },
  5713. },
  5714. spacer = {
  5715. order = 3,
  5716. type = 'description',
  5717. width = 'full',
  5718. name = ' '
  5719. },
  5720. raidWideSorting = {
  5721. order = 4,
  5722. name = L["Raid-Wide Sorting"],
  5723. desc = L["Enabling this allows raid-wide sorting however you will not be able to distinguish between groups."],
  5724. type = 'toggle',
  5725. },
  5726. invertGroupingOrder = {
  5727. order = 5,
  5728. name = L["Invert Grouping Order"],
  5729. desc = L["Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from."],
  5730. disabled = function() return not E.db.unitframe.units['raidpet'].raidWideSorting end,
  5731. type = 'toggle',
  5732. },
  5733. startFromCenter = {
  5734. order = 6,
  5735. name = L["Start Near Center"],
  5736. desc = L["The initial group will start near the center and grow out."],
  5737. disabled = function() return not E.db.unitframe.units['raidpet'].raidWideSorting end,
  5738. type = 'toggle',
  5739. },
  5740. },
  5741. },
  5742. },
  5743. },
  5744. health = GetOptionsTable_Health(true, UF.CreateAndUpdateHeaderGroup, 'raidpet'),
  5745. name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, 'raidpet'),
  5746. portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateHeaderGroup, 'raidpet'),
  5747. buffs = GetOptionsTable_Auras(true, 'buffs', true, UF.CreateAndUpdateHeaderGroup, 'raidpet'),
  5748. debuffs = GetOptionsTable_Auras(true, 'debuffs', true, UF.CreateAndUpdateHeaderGroup, 'raidpet'),
  5749. rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, 'raidpet'),
  5750. raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, 'raidpet'),
  5751. buffIndicator = {
  5752. order = 600,
  5753. type = 'group',
  5754. name = L["Buff Indicator"],
  5755. get = function(info) return E.db.unitframe.units['raidpet']['buffIndicator'][ info[#info] ] end,
  5756. set = function(info, value) E.db.unitframe.units['raidpet']['buffIndicator'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raidpet') end,
  5757. args = {
  5758. enable = {
  5759. type = 'toggle',
  5760. name = L["Enable"],
  5761. order = 1,
  5762. },
  5763. size = {
  5764. type = 'range',
  5765. name = L["Size"],
  5766. desc = L["Size of the indicator icon."],
  5767. order = 3,
  5768. min = 4, max = 50, step = 1,
  5769. },
  5770. fontSize = {
  5771. type = 'range',
  5772. name = L["Font Size"],
  5773. order = 4,
  5774. min = 7, max = 212, step = 1,
  5775. },
  5776. configureButton = {
  5777. type = 'execute',
  5778. name = L["Configure Auras"],
  5779. func = function() E:SetToFilterConfig('Buff Indicator') end,
  5780. order = 5
  5781. },
  5782. },
  5783. },
  5784. },
  5785. }
  5786.  
  5787.  
  5788. --Tank Frames
  5789. E.Options.args.unitframe.args.tank = {
  5790. name = L["Tank Frames"],
  5791. type = 'group',
  5792. order = 1300,
  5793. childGroups = "select",
  5794. get = function(info) return E.db.unitframe.units['tank'][ info[#info] ] end,
  5795. set = function(info, value) E.db.unitframe.units['tank'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('tank') end,
  5796. args = {
  5797. resetSettings = {
  5798. type = 'execute',
  5799. order = 1,
  5800. name = L["Restore Defaults"],
  5801. func = function(info, value) UF:ResetUnitSettings('tank') end,
  5802. },
  5803. general = {
  5804. order = 2,
  5805. type = 'group',
  5806. name = L["General"],
  5807. guiInline = true,
  5808. args = {
  5809. enable = {
  5810. type = 'toggle',
  5811. order = 1,
  5812. name = L["Enable"],
  5813. },
  5814. width = {
  5815. order = 2,
  5816. name = L["Width"],
  5817. type = 'range',
  5818. min = 50, max = 500, step = 1,
  5819. },
  5820. height = {
  5821. order = 3,
  5822. name = L["Height"],
  5823. type = 'range',
  5824. min = 10, max = 250, step = 1,
  5825. },
  5826. verticalSpacing = {
  5827. order = 4,
  5828. type = "range",
  5829. name = L["Vertical Spacing"],
  5830. min = 0, max = 100, step = 1,
  5831. },
  5832. disableDebuffHighlight = {
  5833. order = 5,
  5834. type = "toggle",
  5835. name = L["Disable Debuff Highlight"],
  5836. desc = L["Forces Debuff Highlight to be disabled for these frames"],
  5837. disabled = function() return E.db.unitframe.debuffHighlighting == "NONE" end,
  5838. },
  5839. orientation = {
  5840. order = 6,
  5841. type = "select",
  5842. name = L["Frame Orientation"],
  5843. desc = L["Set the orientation of the UnitFrame."],
  5844. values = {
  5845. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  5846. ["LEFT"] = L["Left"],
  5847. ["MIDDLE"] = L["Middle"],
  5848. ["RIGHT"] = L["Right"],
  5849. },
  5850. },
  5851. colorOverride = {
  5852. order = 7,
  5853. name = L["Class Color Override"],
  5854. desc = L["Override the default class color setting."],
  5855. type = 'select',
  5856. values = {
  5857. ['USE_DEFAULT'] = L["Use Default"],
  5858. ['FORCE_ON'] = L["Force On"],
  5859. ['FORCE_OFF'] = L["Force Off"],
  5860. },
  5861. },
  5862. },
  5863. },
  5864. targetsGroup = {
  5865. order = 4,
  5866. type = 'group',
  5867. name = L["Tank Target"],
  5868. get = function(info) return E.db.unitframe.units['tank']['targetsGroup'][ info[#info] ] end,
  5869. set = function(info, value) E.db.unitframe.units['tank']['targetsGroup'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('tank') end,
  5870. args = {
  5871. enable = {
  5872. type = 'toggle',
  5873. name = L["Enable"],
  5874. order = 1,
  5875. },
  5876. width = {
  5877. order = 2,
  5878. name = L["Width"],
  5879. type = 'range',
  5880. min = 10, max = 500, step = 1,
  5881. },
  5882. height = {
  5883. order = 3,
  5884. name = L["Height"],
  5885. type = 'range',
  5886. min = 10, max = 250, step = 1,
  5887. },
  5888. anchorPoint = {
  5889. type = 'select',
  5890. order = 5,
  5891. name = L["Anchor Point"],
  5892. desc = L["What point to anchor to the frame you set to attach to."],
  5893. values = petAnchors,
  5894. },
  5895. xOffset = {
  5896. order = 6,
  5897. type = 'range',
  5898. name = L["xOffset"],
  5899. desc = L["An X offset (in pixels) to be used when anchoring new frames."],
  5900. min = -500, max = 500, step = 1,
  5901. },
  5902. yOffset = {
  5903. order = 7,
  5904. type = 'range',
  5905. name = L["yOffset"],
  5906. desc = L["An Y offset (in pixels) to be used when anchoring new frames."],
  5907. min = -500, max = 500, step = 1,
  5908. },
  5909. colorOverride = {
  5910. order = 8,
  5911. name = L["Class Color Override"],
  5912. desc = L["Override the default class color setting."],
  5913. type = 'select',
  5914. values = {
  5915. ['USE_DEFAULT'] = L["Use Default"],
  5916. ['FORCE_ON'] = L["Force On"],
  5917. ['FORCE_OFF'] = L["Force Off"],
  5918. },
  5919. },
  5920. },
  5921. },
  5922. buffs = GetOptionsTable_Auras(true, 'buffs', true, UF.CreateAndUpdateHeaderGroup, 'tank'),
  5923. debuffs = GetOptionsTable_Auras(true, 'debuffs', true, UF.CreateAndUpdateHeaderGroup, 'tank'),
  5924. rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, 'tank'),
  5925. buffIndicator = {
  5926. order = 800,
  5927. type = 'group',
  5928. name = L["Buff Indicator"],
  5929. get = function(info) return E.db.unitframe.units['tank']['buffIndicator'][ info[#info] ] end,
  5930. set = function(info, value) E.db.unitframe.units['tank']['buffIndicator'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('tank') end,
  5931. args = {
  5932. enable = {
  5933. type = 'toggle',
  5934. name = L["Enable"],
  5935. order = 1,
  5936. },
  5937. size = {
  5938. type = 'range',
  5939. name = L["Size"],
  5940. desc = L["Size of the indicator icon."],
  5941. order = 3,
  5942. min = 4, max = 50, step = 1,
  5943. },
  5944. fontSize = {
  5945. type = 'range',
  5946. name = L["Font Size"],
  5947. order = 4,
  5948. min = 7, max = 212, step = 1,
  5949. },
  5950. profileSpecific = {
  5951. type = 'toggle',
  5952. name = L["Profile Specific"],
  5953. desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."],
  5954. order = 5,
  5955. },
  5956. configureButton = {
  5957. type = 'execute',
  5958. name = L["Configure Auras"],
  5959. func = function()
  5960. if E.db.unitframe.units['tank']['buffIndicator'].profileSpecific then
  5961. E:SetToFilterConfig('Buff Indicator (Profile)')
  5962. else
  5963. E:SetToFilterConfig('Buff Indicator')
  5964. end
  5965. end,
  5966. order = 6
  5967. },
  5968. },
  5969. },
  5970. },
  5971. }
  5972.  
  5973. --Assist Frames
  5974. E.Options.args.unitframe.args.assist = {
  5975. name = L["Assist Frames"],
  5976. type = 'group',
  5977. order = 1300,
  5978. childGroups = "select",
  5979. get = function(info) return E.db.unitframe.units['assist'][ info[#info] ] end,
  5980. set = function(info, value) E.db.unitframe.units['assist'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('assist') end,
  5981. args = {
  5982. resetSettings = {
  5983. type = 'execute',
  5984. order = 1,
  5985. name = L["Restore Defaults"],
  5986. func = function(info, value) UF:ResetUnitSettings('assist') end,
  5987. },
  5988. general = {
  5989. order = 2,
  5990. type = 'group',
  5991. name = L["General"],
  5992. guiInline = true,
  5993. args = {
  5994. enable = {
  5995. type = 'toggle',
  5996. order = 1,
  5997. name = L["Enable"],
  5998. },
  5999. width = {
  6000. order = 2,
  6001. name = L["Width"],
  6002. type = 'range',
  6003. min = 50, max = 500, step = 1,
  6004. },
  6005. height = {
  6006. order = 3,
  6007. name = L["Height"],
  6008. type = 'range',
  6009. min = 10, max = 250, step = 1,
  6010. },
  6011. verticalSpacing = {
  6012. order = 4,
  6013. type = "range",
  6014. name = L["Vertical Spacing"],
  6015. min = 0, max = 100, step = 1,
  6016. },
  6017. disableDebuffHighlight = {
  6018. order = 5,
  6019. type = "toggle",
  6020. name = L["Disable Debuff Highlight"],
  6021. desc = L["Forces Debuff Highlight to be disabled for these frames"],
  6022. disabled = function() return E.db.unitframe.debuffHighlighting == "NONE" end,
  6023. },
  6024. orientation = {
  6025. order = 6,
  6026. type = "select",
  6027. name = L["Frame Orientation"],
  6028. desc = L["Set the orientation of the UnitFrame."],
  6029. values = {
  6030. --["AUTOMATIC"] = L["Automatic"], not sure if i will use this yet
  6031. ["LEFT"] = L["Left"],
  6032. ["MIDDLE"] = L["Middle"],
  6033. ["RIGHT"] = L["Right"],
  6034. },
  6035. },
  6036. colorOverride = {
  6037. order = 7,
  6038. name = L["Class Color Override"],
  6039. desc = L["Override the default class color setting."],
  6040. type = 'select',
  6041. values = {
  6042. ['USE_DEFAULT'] = L["Use Default"],
  6043. ['FORCE_ON'] = L["Force On"],
  6044. ['FORCE_OFF'] = L["Force Off"],
  6045. },
  6046. },
  6047. },
  6048. },
  6049. targetsGroup = {
  6050. order = 4,
  6051. type = 'group',
  6052. name = L["Assist Target"],
  6053. get = function(info) return E.db.unitframe.units['assist']['targetsGroup'][ info[#info] ] end,
  6054. set = function(info, value) E.db.unitframe.units['assist']['targetsGroup'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('assist') end,
  6055. args = {
  6056. enable = {
  6057. type = 'toggle',
  6058. name = L["Enable"],
  6059. order = 1,
  6060. },
  6061. width = {
  6062. order = 2,
  6063. name = L["Width"],
  6064. type = 'range',
  6065. min = 10, max = 500, step = 1,
  6066. },
  6067. height = {
  6068. order = 3,
  6069. name = L["Height"],
  6070. type = 'range',
  6071. min = 10, max = 250, step = 1,
  6072. },
  6073. anchorPoint = {
  6074. type = 'select',
  6075. order = 5,
  6076. name = L["Anchor Point"],
  6077. desc = L["What point to anchor to the frame you set to attach to."],
  6078. values = petAnchors,
  6079. },
  6080. xOffset = {
  6081. order = 6,
  6082. type = 'range',
  6083. name = L["xOffset"],
  6084. desc = L["An X offset (in pixels) to be used when anchoring new frames."],
  6085. min = -500, max = 500, step = 1,
  6086. },
  6087. yOffset = {
  6088. order = 7,
  6089. type = 'range',
  6090. name = L["yOffset"],
  6091. desc = L["An Y offset (in pixels) to be used when anchoring new frames."],
  6092. min = -500, max = 500, step = 1,
  6093. },
  6094. colorOverride = {
  6095. order = 8,
  6096. name = L["Class Color Override"],
  6097. desc = L["Override the default class color setting."],
  6098. type = 'select',
  6099. values = {
  6100. ['USE_DEFAULT'] = L["Use Default"],
  6101. ['FORCE_ON'] = L["Force On"],
  6102. ['FORCE_OFF'] = L["Force Off"],
  6103. },
  6104. },
  6105. },
  6106. },
  6107. buffs = GetOptionsTable_Auras(true, 'buffs', true, UF.CreateAndUpdateHeaderGroup, 'assist'),
  6108. debuffs = GetOptionsTable_Auras(true, 'debuffs', true, UF.CreateAndUpdateHeaderGroup, 'assist'),
  6109. rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, 'assist'),
  6110. buffIndicator = {
  6111. order = 800,
  6112. type = 'group',
  6113. name = L["Buff Indicator"],
  6114. get = function(info) return E.db.unitframe.units['assist']['buffIndicator'][ info[#info] ] end,
  6115. set = function(info, value) E.db.unitframe.units['assist']['buffIndicator'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('assist') end,
  6116. args = {
  6117. enable = {
  6118. type = 'toggle',
  6119. name = L["Enable"],
  6120. order = 1,
  6121. },
  6122. size = {
  6123. type = 'range',
  6124. name = L["Size"],
  6125. desc = L["Size of the indicator icon."],
  6126. order = 3,
  6127. min = 4, max = 50, step = 1,
  6128. },
  6129. fontSize = {
  6130. type = 'range',
  6131. name = L["Font Size"],
  6132. order = 4,
  6133. min = 7, max = 212, step = 1,
  6134. },
  6135. profileSpecific = {
  6136. type = 'toggle',
  6137. name = L["Profile Specific"],
  6138. desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."],
  6139. order = 5,
  6140. },
  6141. configureButton = {
  6142. type = 'execute',
  6143. name = L["Configure Auras"],
  6144. func = function()
  6145. if E.db.unitframe.units['assist']['buffIndicator'].profileSpecific then
  6146. E:SetToFilterConfig('Buff Indicator (Profile)')
  6147. else
  6148. E:SetToFilterConfig('Buff Indicator')
  6149. end
  6150. end,
  6151. order = 6
  6152. },
  6153. },
  6154. },
  6155. },
  6156. }
  6157.  
  6158. --MORE COLORING STUFF YAY
  6159. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup = {
  6160. order = -10,
  6161. type = 'group',
  6162. guiInline = true,
  6163. name = L["Class Resources"],
  6164. get = function(info)
  6165. local t = E.db.unitframe.colors.classResources[ info[#info] ]
  6166. local d = P.unitframe.colors.classResources[ info[#info] ]
  6167. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  6168. end,
  6169. set = function(info, r, g, b)
  6170. local t = E.db.unitframe.colors.classResources[ info[#info] ]
  6171. t.r, t.g, t.b = r, g, b
  6172. UF:Update_AllFrames()
  6173. end,
  6174. args = {}
  6175. }
  6176.  
  6177. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args.bgColor = {
  6178. order = 1,
  6179. type = 'color',
  6180. name = L["Backdrop Color"],
  6181. hasAlpha = false,
  6182. }
  6183.  
  6184. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args.spacer = {
  6185. order = 2,
  6186. name = ' ',
  6187. type = 'description',
  6188. width = 'full',
  6189. }
  6190.  
  6191. for i = 1, 3 do
  6192. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args['combo'..i] = {
  6193. order = i + 2,
  6194. type = 'color',
  6195. name = L["Combo Point"]..' #'..i,
  6196. get = function(info)
  6197. local t = E.db.unitframe.colors.classResources.comboPoints[i]
  6198. local d = P.unitframe.colors.classResources.comboPoints[i]
  6199. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  6200. end,
  6201. set = function(info, r, g, b)
  6202. local t = E.db.unitframe.colors.classResources.comboPoints[i]
  6203. t.r, t.g, t.b = r, g, b
  6204. UF:Update_AllFrames()
  6205. end,
  6206. }
  6207. end
  6208.  
  6209.  
  6210. if P.unitframe.colors.classResources[E.myclass] then
  6211. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args.spacer2 = {
  6212. order = 10,
  6213. name = ' ',
  6214. type = 'description',
  6215. width = 'full',
  6216. }
  6217.  
  6218. local ORDER = 20
  6219. if E.myclass == 'PALADIN' then
  6220. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args[E.myclass] = {
  6221. type = 'color',
  6222. name = L["Holy Power"],
  6223. order = ORDER,
  6224. }
  6225. elseif E.myclass == 'MAGE' then
  6226. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args[E.myclass] = {
  6227. type = 'color',
  6228. name = L["Arcane Charges"],
  6229. order = ORDER,
  6230. }
  6231. elseif E.myclass == 'ROGUE' then
  6232. for i = 1, 5 do
  6233. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args['resource'..i] = {
  6234. type = 'color',
  6235. name = L["Anticipation"]..' #'..i,
  6236. order = ORDER + i,
  6237. get = function(info)
  6238. local t = E.db.unitframe.colors.classResources.ROGUE[i]
  6239. local d = P.unitframe.colors.classResources.ROGUE[i]
  6240. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  6241. end,
  6242. set = function(info, r, g, b)
  6243. local t = E.db.unitframe.colors.classResources.ROGUE[i]
  6244. t.r, t.g, t.b = r, g, b
  6245. UF:Update_AllFrames()
  6246. end,
  6247. }
  6248. end
  6249. elseif E.myclass == 'MONK' then
  6250. for i = 1, 6 do
  6251. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args['resource'..i] = {
  6252. type = 'color',
  6253. name = L["Harmony"]..' #'..i,
  6254. order = ORDER + i,
  6255. get = function(info)
  6256. local t = E.db.unitframe.colors.classResources.MONK[i]
  6257. local d = P.unitframe.colors.classResources.MONK[i]
  6258. return t.r, t.g, t.b, t.a, d.r, d.g, d.b
  6259. end,
  6260. set = function(info, r, g, b)
  6261. local t = E.db.unitframe.colors.classResources.MONK[i]
  6262. t.r, t.g, t.b = r, g, b
  6263. UF:Update_AllFrames()
  6264. end,
  6265. }
  6266. end
  6267. elseif E.myclass == 'WARLOCK' then
  6268. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args[E.myclass] = {
  6269. type = 'color',
  6270. name = L["Soul Shards"],
  6271. order = ORDER,
  6272. }
  6273. elseif E.myclass == 'DEATHKNIGHT' then
  6274. E.Options.args.unitframe.args.general.args.allColorsGroup.args.classResourceGroup.args[E.myclass] = {
  6275. type = 'color',
  6276. name = L["Runes"],
  6277. order = ORDER,
  6278. }
  6279. end
  6280. end
  6281.  
  6282. --Custom Texts
  6283. function E:RefreshCustomTextsConfigs()
  6284. --Hide any custom texts that don't belong to current profile
  6285. for _, customText in pairs(CUSTOMTEXT_CONFIGS) do
  6286. customText.hidden = true
  6287. end
  6288. twipe(CUSTOMTEXT_CONFIGS)
  6289.  
  6290. for unit, _ in pairs(E.db.unitframe.units) do
  6291. if E.db.unitframe.units[unit].customTexts then
  6292. for objectName, _ in pairs(E.db.unitframe.units[unit].customTexts) do
  6293. UF:CreateCustomTextGroup(unit, objectName)
  6294. end
  6295. end
  6296. end
  6297. end
  6298. E:RefreshCustomTextsConfigs()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement