Advertisement
Cokedriver

Defaults.lua

May 1st, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.79 KB | None | 0 0
  1. local BasicUI = LibStub("AceAddon-3.0"):NewAddon("BasicUI", "AceConsole-3.0", "AceEvent-3.0");
  2. local db;
  3.  
  4. local defaults = {
  5. ["profile"] = {
  6. --[[-----Media Options-----]]--
  7. ["media"] = {
  8. ["font"] = "BasicUI",
  9. ["fontSize"] = 14,
  10. ["fontxSmall"] = 10,
  11. ["fontSmall"] = 12,
  12. ["fontMedium"] = 14,
  13. ["fontLarge"] = 16,
  14. ["fontHuge"] = 20,
  15. },
  16.  
  17. --[[-----General Options-----]]--
  18. ["general"] = {
  19. ["color"] = { r = 1, g = 1, b = 1},
  20. ["classcolor"] = true,
  21. ["autogreed"] = true,
  22. ["cooldown"] = true,
  23. ["slidebar"] = true,
  24. ["buttons"] = {
  25. ["enable"] = true,
  26. ["showHotKeys"] = false,
  27. ["showMacronames"] = false,
  28. ["auraborder"] = false,
  29.  
  30. -- Button Colors
  31. ["color"] = {
  32. ["enable"] = true,
  33. ["OutOfRange"] = { r = 0.9, g = 0, b = 0 },
  34. ["OutOfMana"] = { r = 0, g = 0, b = 0.9 },
  35. ["NotUsable"] = { r = 0.3, g = 0.3, b = 0.3 },
  36. },
  37. },
  38. ["facepaint"] = {
  39. ["enable"] = true,
  40. ["custom"] = {
  41. ["gradient"] = false, -- false applies one solid color (class color if class = true, topcolor if not)
  42. ["topcolor"] = { r = 0.9, g = 0.9, b = 0.9 }, -- top gradient color (rgb)
  43. ["bottomcolor"] = { r = 0.1, g = 0.1, b = 0.1 }, -- bottom gradient color (rgb)
  44. ["topalpha"] = 1, -- top gradient alpha (global if gradient = false)
  45. ["bottomalpha"] = 1, -- bottom gradient alpha (not used if gradient = false)
  46. },
  47. },
  48. ["mail"] = {
  49. ["enable"] = true,
  50. ["openall"] = true,
  51. -- BlackBook is barrowed from Postal with permission.
  52. ["BlackBook"] = {
  53. ["enable"] = true,
  54. ["AutoFill"] = true,
  55. ["contacts"] = {},
  56. ["recent"] = {},
  57. ["AutoCompleteAlts"] = true,
  58. ["AutoCompleteRecent"] = true,
  59. ["AutoCompleteContacts"] = true,
  60. ["AutoCompleteFriends"] = true,
  61. ["AutoCompleteGuild"] = true,
  62. ["ExcludeRandoms"] = true,
  63. ["DisableBlizzardAutoComplete"] = false,
  64. ["UseAutoComplete"] = true,
  65. },
  66. },
  67. ["scale"] = {
  68. ["enable"] = true,
  69. ["playerFrame"] = 1.15,
  70. ["targetFrame"] = 1.15,
  71. ["focusFrame"] = 1.15,
  72. ["partyFrame"] = 1.15,
  73. ["partypetFrame"] = 1.15,
  74. ["arenaFrame"] = 1.15,
  75. ["bossFrame"] = 1.15,
  76. },
  77. },
  78.  
  79. --[[-----Buff Options-----]]--
  80. ["buff"] = {
  81. ["enable"] = true,
  82. ["border"] = "Blizzard Dialog",
  83. ["background"] = "Black",
  84. ["buffSize"] = 36,
  85. ["buffScale"] = 1,
  86.  
  87. ["buffFontSize"] = 14,
  88. ["buffCountSize"] = 16,
  89.  
  90. ["debuffSize"] = 36,
  91. ["debuffScale"] = 1,
  92.  
  93. ["debuffFontSize"] = 14,
  94. ["debuffCountSize"] = 16,
  95.  
  96. ["paddingX"] = 10,
  97. ["paddingY"] = 10,
  98. ["buffPerRow"] = 6,
  99. },
  100.  
  101. --[[-----Castbar Options-----]]--
  102. ["castbar"] = {
  103.  
  104. ["enable"] = true,
  105. ["border"] = "Blizzard Dialog",
  106. ["background"] = "Black",
  107. ["statusbar"] = "Blizzard",
  108.  
  109.  
  110. ["CastingBarFrame"] = {
  111. ["enable"] = true,
  112. ["textPosition"] = "CENTER",
  113. ["enableLag"] = true,
  114. ["enableTimer"] = true,
  115. ["selfAnchor"] = "BOTTOM",
  116. ["relAnchor"] = "BOTTOM",
  117. ["offSetX"] = 0,
  118. ["offSetY"] = 175,
  119. },
  120. ["TargetFrameSpellBar"] = {
  121. ["enable"] = false,
  122. ["textPosition"] = "CENTER",
  123. ["enableLag"] = true,
  124. ["enableTimer"] = true,
  125. ["selfAnchor"] = "TOP",
  126. ["relAnchor"] = "TOP",
  127. ["offSetX"] = 0,
  128. ["offSetY"] = -250,
  129. },
  130. ["FocusFrameSpellBar"] = {
  131. ["enable"] = true,
  132. ["textPosition"] = "CENTER",
  133. ["enableLag"] = true,
  134. ["enableTimer"] = true,
  135. ["selfAnchor"] = "TOP",
  136. ["relAnchor"] = "TOP",
  137. ["offSetX"] = 0,
  138. ["offSetY"] = -165,
  139. },
  140. ["MirrorTimer1"] = {
  141. ["enable"] = true,
  142. ["textPosition"] = "CENTER",
  143. ["enableTimer"] = true,
  144. ["selfAnchor"] = "TOP",
  145. ["relAnchor"] = "TOP",
  146. ["offSetX"] = 0,
  147. ["offSetY"] = -10,
  148. },
  149. ["PetCastingBarFrame"] = {
  150. ["enable"] = true,
  151. ["textPosition"] = "CENTER",
  152. ["enableTimer"] = true,
  153. ["selfAnchor"] = "BOTTOM",
  154. ["relAnchor"] = "BOTTOM",
  155. ["offSetX"] = 0,
  156. ["offSetY"] = 200,
  157. },
  158. }
  159.  
  160. --[[-----Chat Options-----]]--
  161. ["chat"] = {
  162. ["enable"] = true,
  163. ["disableFade"] = false,
  164. ["chatOutline"] = false,
  165. ["windowborder"] = true,
  166. ["enableborder"] = true,
  167.  
  168. -- Chat Media
  169. ["border"] = "Blizzard Dialog",
  170. ["background"] = "Blizzard Dialog Background",
  171. ["editboxborder"] = "Blizzard Dialog",
  172. ["editboxbackground"] = "Blizzard Dialog Background",
  173. ["sound"] = "Whisper",
  174.  
  175. ["enableBottomButton"] = true,
  176. ["enableHyperlinkTooltip"] = true,
  177. ["enableBorderColoring"] = true,
  178.  
  179. ["tab"] = {
  180. ["fontSize"] = 15,
  181. ["fontOutline"] = true,
  182. ["normalColor"] = {r = 1, g = 1, b = 1},
  183. ["specialColor"] = {r = 1, g = 0, b = 1},
  184. ["selectedColor"] = {r = 0, g = 0.75, b = 1},
  185. },
  186. },
  187.  
  188. --[[-----Datatext Options-----]]--
  189. ["datatext"] = {
  190.  
  191. ["enable"] = true,
  192.  
  193. -- Datapanel Media
  194. ["border"] = "Blizzard Dialog",
  195. ["background"] = "Blizzard Dialog Background",
  196.  
  197. ["top"] = false, -- if = true then panel on top of screen, if = false panel below mainmenubar
  198. ["fontsize"] = 15, -- font size for panels.
  199. ["bags"] = 9, -- show space used in bags on panel.
  200. ["system"] = 0, -- show total memory and others systems info (FPS/MS) on panel.
  201. ["wowtime"] = 0, -- show time on panel.
  202. ["guild"] = 0, -- show number on guildmate connected on panel.
  203. ["dur"] = 8, -- show your equipment durability on panel.
  204. ["friends"] = 7, -- show number of friends connected.
  205. ["dps_text"] = 0, -- show a dps meter on panel.
  206. ["hps_text"] = 0, -- show a heal meter on panel.
  207. ["spec"] = 5, -- show your current spec on panel.
  208. ["zone"] = 0, -- show your current zone on panel.
  209. ["coords"] = 0, -- show your current coords on panel.
  210. ["pro"] = 4, -- shows your professions and tradeskills
  211. ["stat1"] = 1, -- Stat Based on your Role (Avoidance-Tank, AP-Melee, SP/HP-Caster)
  212. ["stat2"] = 3, -- Stat Based on your Role (Armor-Tank, Crit-Melee, Crit-Caster)
  213. ["recount"] = 2, -- Stat Based on Recount"s DPS
  214. ["recountraiddps"] = false, -- Enables tracking or Recounts Raid DPS
  215. ["calltoarms"] = 6, -- Show Current Call to Arms.
  216.  
  217. -- Color Datatext
  218. ["colors"] = {
  219. ["color"] = { r = 0, g = 0, b = 1}, -- datatext color if classcolor = false
  220. },
  221.  
  222. ["battleground"] = true, -- enable 3 stats in battleground only that replace stat1,stat2,stat3.
  223.  
  224. ["bag"] = false, -- True = Open Backpack; False = Open All bags
  225.  
  226. -- Clock Settings
  227. ["time24"] = false, -- set time to 24h format.
  228. ["localtime"] = true, -- set time to local time instead of server time.
  229.  
  230. -- FPS Settings
  231. ["fps"] = {
  232. ["enable"] = true, -- enable the FPS on the System Tooltip
  233. -- ONLY ONE OF THESE CAN BE TRUE
  234. ["home"] = false, -- Only Show Home Latency
  235. ["world"] = false, -- Only Show World Latency
  236. ["both"] = true, -- Show both Home and World Latency
  237. },
  238.  
  239. ["threatbar"] = true, -- Enable the threatbar over the Center Panel.
  240.  
  241. },
  242.  
  243. --[[-----Merchant Options-----]]--
  244. ["merchant"] = {
  245. ["enable"] = true, -- enable merchant module.
  246. ["sellMisc"] = true, -- allows the user to add spacific items to sell at merchant (please see the local filter in merchant.lua)
  247. ["autoSellGrey"] = true, -- autosell grey items at merchant.
  248. ["autoRepair"] = true, -- autorepair at merchant.
  249. }, -- autorepair at merchant.
  250.  
  251. --[[-----Minimap Options-----]]--
  252. ["minimap"] = {
  253. ["enable"] = true,
  254. ["border"] = "BasicUI",
  255. ["gameclock"] = true,
  256. ["farm"] = false,
  257. ["farmscale"] = 3,
  258. ["zoneText"] = true,
  259. ["instanceDifficulty"] = false,
  260. },
  261.  
  262. --[[-----Nameplate Options-----]]--
  263. ["nameplates"] = {
  264. ["enable"] = true,
  265. ["enableTankMode"] = true, -- Color the nameplate threat border green, if you have no aggro
  266. ["colorNameWithThreat"] = true, -- The name has the same color as the threat of the unit (better visibility)
  267.  
  268. ["showFullHP"] = true,
  269. ["showLevel"] = true,
  270. ["showTargetBorder"] = true,
  271. ["showEliteBorder"] = true,
  272. ["showTotemIcon"] = true,
  273. ["abbrevLongNames"] = true,
  274. },
  275.  
  276. --[[-----Powerbar Options-----]]--
  277. ["powerbar"] = {
  278. ["enable"] = true,
  279. ["border"] = "BasicUI",
  280. ["statusbar"] = "Blizzard",
  281. ["sizeWidth"] = 200,
  282.  
  283. ["showCombatRegen"] = true,
  284. ["showSoulshards"] = true,
  285. ["showHolypower"] = true,
  286. ["showComboPoints"] = true,
  287. ["showRuneCooldown"] = true,
  288. ["showEclipseBar"] = true,
  289.  
  290.  
  291. ["energybar"] = true,
  292. ["focusbar"] = true,
  293. ["manabar"] = true,
  294. ["ragebar"] = true,
  295. ["runebar"]= true,
  296.  
  297.  
  298. ["combo"] = {
  299. ["FontOutline"] = true,
  300. ["FontSize"] = 16,
  301. },
  302.  
  303. ["extra"] = {
  304. ["FontOutline"] = true,
  305. ["FontSize"] = 16,
  306. },
  307.  
  308. ["rune"] = {
  309. ["FontOutline"] = true,
  310. ["FontSize"] = 16,
  311. },
  312.  
  313. ["value"] = {
  314. ["Abbrev"] = true,
  315. ["FontOutline"] = true,
  316. ["FontSize"] = 15,
  317. },
  318. },
  319.  
  320. --[[-----Quest Options-----]]--
  321. ["quest"] = {
  322. ["enable"] = true, -- enable quest module.
  323. ["autocomplete"] = false, -- enable the autoaccept quest and autocomplete quest if no reward.
  324. },
  325.  
  326. --[[-----SelfBuffs Options-----]]--
  327. ["selfbuffs"] = {
  328.  
  329. ["enable"] = true, -- enable selbuffs module.
  330. ["border"] = "BasicUI",
  331. ["playsound"] = true, -- sound warning
  332. ["sound"] = "Warning",
  333.  
  334. },
  335.  
  336. --[[-----Skin Options-----]]--
  337. ["skin"] = {
  338. ["enable"] = true,
  339. ["border"] = "BasicUI",
  340. ["statusbar"] = "Blizzard",
  341. ["DBM"] = true,
  342. ["Recount"] = true,
  343. ["RecountBackdrop"] = true,
  344. },
  345.  
  346. --[[-----Tooltip Options-----]]--
  347. ["tooltip"] = {
  348. ["enable"] = true, -- Move the tooltip up so its not overlapping the MainMenubar
  349.  
  350. ["disableFade"] = false, -- Can cause errors or a buggy tooltip!
  351. ["border"] = "BasicUI",
  352. ["background"] = "Black",
  353. ["statusbar"] = "Blizzard",
  354. ["reactionBorderColor"] = true,
  355. ["itemqualityBorderColor"] = true,
  356.  
  357. ["showPlayerTitles"] = true,
  358. ["showPVPIcons"] = false, -- Show pvp icons instead of just a prefix
  359. ["abbrevRealmNames"] = false,
  360. ["showMouseoverTarget"] = true,
  361.  
  362. ["showItemLevel"] = true,
  363.  
  364. ["healthbar"] = {
  365. ["showHealthValue"] = true,
  366. ["showOutline"] = false,
  367. ["textPos"] = "CENTER", -- Possible "TOP" "BOTTOM" "CENTER"
  368. ["reactionColoring"] = false,
  369. ["customColorapply"] = false,
  370. ["custom"] = {
  371. ["apply"] = false,
  372. ["color"] = { r = 1, g = 1, b = 0},
  373. },
  374. ["fontSize"] = 14,
  375. },
  376. },
  377. },
  378. ["global"] = {
  379. ["BlackBook"] = {
  380. ["alts"] = {},
  381. },
  382. },
  383. }
  384.  
  385. function BasicUI:ProfChange()
  386. self:ConfigRefresh();
  387. end
  388.  
  389. function BasicUI:OnInitialize()
  390. self.db = LibStub("AceDB-3.0"):New("BasicDB", defaults, "Default");
  391.  
  392. self.db.RegisterCallback(self, "OnProfileChanged", "ProfChange");
  393. self.db.RegisterCallback(self, "OnProfileCopied", "ProfChange");
  394. self.db.RegisterCallback(self, "OnProfileReset", "ProfChange");
  395.  
  396. self:SetUpOptions();
  397.  
  398. db = self.db.profile;
  399.  
  400. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement