Want more features on Pastebin? Sign Up, it's FREE!
Guest

myconfig.lua - place in EventHorizon directory

By: a guest on Aug 29th, 2012  |  syntax: None  |  size: 11.79 KB  |  views: 56  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. local EHN,ns = ...
  2.  
  3. local config = EventHorizon.config
  4. local _,class = UnitClass('player')     -- These locals make in-line conditions a little easier. See the color section for a few examples.
  5. local DK = class == "DEATHKNIGHT"
  6. local Druid = class == "DRUID"
  7. local Hunter = class == "HUNTER"
  8. local Mage = class == "MAGE"
  9. local Paladin = class == "PALADIN"
  10. local Priest = class == "PRIEST"
  11. local Rogue = class == "ROGUE"
  12. local Shaman = class == "SHAMAN"
  13. local Warlock = class == "WARLOCK"
  14. local Warrior = class == "WARRIOR"
  15.  
  16. config.showTrinketBars = false                  -- Show bars for your equipped trinkets? Default = true
  17. config.castLine = true                                  -- Show a full-frame line at the end of casts/channels? Default = true (show for all casts). Setting this to a number will set the lower limit accordingly. ie, config.castLine = 0.5 will show all casts over 0.5 seconds. Setting this to 0 will show the line for all casts no matter what.
  18. config.gcdStyle = 'line'                                -- 'line' = show a thin line for the GCD. 'bar' = show a full-frame shrinking bar for the gcd (looks good at a dark color and low opacity, set within the color table). false = disable GCD handling.
  19.  
  20. config.enableRedshift = false                   -- Enable Redshift's show/hide functions? Default = false
  21. config.Redshift.showCombat = true               -- Always show EH in combat. Default = true
  22. config.Redshift.showHarm = true                 -- Show EH if targeting an attackable unit, in or out of combat. Default = true
  23. config.Redshift.showHelp = false                -- Show EH if targeting a friendly (unattackable) unit, in or out of combat. Default = false
  24. config.Redshift.showBoss = true                 -- Always show EH when targeting a boss-level unit, regardless of its attackable state. Default = true
  25. config.Redshift.showFocus = false               -- Always show EH while a focus unit exists, in or out of combat. Default = false
  26. config.Redshift.hideVehicle = true              -- Hide EH if using a vehicle with an actionbar of its own. Does not affect vehicles that do not change the actionbar. If you use Vitals, you may want to set this to false. Default = true
  27. config.Redshift.hideVitals = true               -- Hide EventHorizon_Vitals as well when the main frame is hidden. Default = true
  28.  
  29. config.Lines = nil                                              -- This draws extra marker lines on EventHorizon. Examples: config.Lines = 2 (add a line at 2 seconds in the future); config.Lines = {2, 4, 6} (add lines at 2, 4 and 6 seconds). Decimals and math are permitted, of course. Any amount of lines is allowed. Default: Disabled.
  30. config.LinesColor = {1,1,1,0.5}                 -- Standard color syntax {R,G,B,A} (see below). No classcolor allowed quite yet. Embed more tables for more colors. {{1,0,0,1},{0,1,0,1},{0,0.5,1}} will do one red line, one green line, and the rest kinda-teal lines. Yeah, it's a bit of an advanced thing.
  31.  
  32. config.anchor = {"TOPRIGHT", "EventHorizonHandle", "BOTTOMRIGHT"}       -- EventHorizon's position. Format: {'POINT', 'AnchorFrame', 'RELATIVE', Xoffset (optional), Yoffset (optional)}. Set the anchor to something other than EventHorizonHandle to root EH in place and remove the anchor. Default = {"TOPRIGHT", "EventHorizonHandle", "BOTTOMRIGHT"} (anchor the TOPRIGHT of EH to EventHorizonHandle's BOTTOMRIGHT with no offset)
  33. config.width = 250                                              -- Width of a single bar, not counting its icon. The actual width of the frame is (width+height+[padding*2]).
  34. config.height = 18                                              -- Height of a single bar. If you use config.staticHeight, this is used for the width of the bar icons.
  35. config.spacing = 0                                              -- Vertical spacing between bars.
  36. config.scale = 1                                                -- The overall scale of the main frame.
  37. config.staticheight = false                             -- Changing this to a number will override config.height and tell EH to resize the bars instead of the frame. For example, 'config.staticheight = 150' will make EH 150 pixels tall. With 5 shown bars, each bar will be 30 pixels tall. Spacing is still used in this mode and will act the same as it does otherwise.
  38. config.staticframes = 4                                 -- When used with config.staticheight, sets a minimum number of bars to use static height settings with. For example, with staticframes = 4 and 3 bars shown, EventHorizon will use normal variable height settings.
  39. config.hideIcons = false                                -- Hides the bar icons completely. This will make the frame a little more narrow, as config.height will no longer add to its width.
  40.  
  41. config.past = -1.5                                              -- Number of seconds to show in the past. Default = -3 (yes, it's a negative number)
  42. config.future = 15                                              -- Number of seconds to show in the future. Recommended to keep this between 12-18 unless you've got some crazy configuration. Default = 12
  43.  
  44. config.texturedbars = true                              -- You have the choice between textures and solid colors. Remove this or comment it out to see what the solids look like. Default = true
  45. config.bartexture = "Interface\\Addons\\EventHorizon\\Smooth"   -- Full path, minus extension, of the bar texture to use. Default = "Interface\\Addons\\EventHorizon\\Smooth"
  46. config.texturealphamultiplier = 2               -- Most textures appear darker than a solid color because of the alpha value. To counteract this, the opacity of the color is multiplied by this number before it's applied to a texture.
  47. config.barbg = false                                    -- Shows a backdrop behind each individual bar. The color of the backdrop may be set within the color table below.
  48.  
  49. config.backdrop = true                                                                          -- Use the background and border frame? Default = true
  50. config.padding = 3                                                                                      -- Extra space between the bar edges and the backdrop/border.
  51. config.bg = "Interface\\ChatFrame\\ChatFrameBackground"         -- Frame background texture. Full path, no extension. Default = "Interface\\ChatFrame\\ChatFrameBackground"
  52. config.border = "Interface\\Tooltips\\UI-Tooltip-Border"        -- Border texture, same thing all over. Default = "Interface\\Tooltips\\UI-Tooltip-Border"
  53. config.edgesize = 8                                                                                     -- Thickness of the frame's border. Default = 8
  54. config.inset = {top = 2, bottom = 2, left = 2, right = 2}       -- Backdrop insets move the edges of the background, but leave the border untouched. Long story short, start at 1/4 your edgesize and adjust by 1 until it looks right. Default = {top = 2, bottom = 2, left = 2, right = 2}
  55.  
  56. config.stackFont = false                                -- Changes the font of the stack indicators. Usage: config.stackFont = "Interface\\AddOns\\FontDirectory\\FontName.ttf"
  57. config.stackFontSize = false                    -- Changes the font size of the stack indicators. Only usable with config.stackFont. Usage: config.stackFontSize = <number> (start at 12 and adjust from there if you're not sure)
  58. config.stackFontOutline = false                 -- Adds an outline to the font. Only usable with config.stackFont. Valid flags: "OUTLINE", "THICKOUTLINE", "MONOCHROME". Usage: config.stackFontSize = "FLAG"
  59. config.stackFontColor = false                   -- Changes the color of the stack indicators. This option available even if config.stackFont is not being used. Usage: config.stackFontColor = {Red,Green,Blue,(Alpha)} (default = {1,1,1}, alpha is optional)
  60. config.stackFontShadow = false                  -- Adds a shadow effect to the stack indicators. Only usable with config.stackFont. Setting this to true defaults it to black at 50% opacity. Best used without an outline. Usage: config.stackFontShadow = {Red,Green,Blue,(Alpha)} -OR- true ( {0,0,0,0.5} )
  61. config.stackFontShadowOffset = false    -- Changes the offset of the font shadow if config.stackFontShadow is set. Usage: config.stackFontShadowOffset = {x,y} (default = {1,-1})
  62. config.stackOnRight = false                             -- Changes the position of the stack indicators from the left of the frame to the right. Default = false. Usage: config.stackOnRight = true
  63.  
  64. -- The format for the color section is {Red, Green, Blue, Opacity/Alpha}. To color a bar or indicator by class, use {true, <burn>, <alpha>}.
  65. -- <burn> means color intensity - 0.5 burn darkens a color by 50%. 1.2 lightens it by 20%. 1 is baseline.
  66. local c = EventHorizon.colors
  67. c.sent = {true,Priest and 0.7 or 1,0.5}                 -- Marker line when a spellcast is sent to the server. Default = {true,Priest and 0.7 or 1,0.5} (class colored, dimmed a bit if you're a Priest, 50% opacity)
  68. c.tick = {true,Priest and 0.7 or 1,1}                   -- Tick markers. Default = {true,Priest and 0.7 or 1,1} (class colored, dimmed a bit if you're a Priest, opaque)
  69. c.channeltick = {0,1,0.2,0.25}                                  -- Tick markers for channeled spells. Default is the same as casting.
  70. c.casting = {0,1,0.2,0.25}                                                      -- Casting bars. Default = {0,1,0,0.25} (green, 0.25 unmodified alpha)
  71. c.castLine = {0,1,0,0.3}                                                -- The end-of-cast line, shown for casts and channels over 1.5 seconds. Default = {0,1,0,0.3} (green, 0.3 unmodified alpha)
  72. c.cooldown = {0.6,0.8,1,0.3}                                            -- Cooldown bars. Default = {0.6,0.8,1,0.3} (mute teal, 0.3 unmodified alpha)
  73. c.debuffmine = {true,Priest and 0.7 or 1,0.3}   -- YOUR debuff bars. Default = {true,Priest and 0.7 or 1,0.3} (class colored, dimmed a bit if you're a Priest, 0.3 unmodified alpha)
  74. c.debuff = {true,0.5,0.3}                                               -- OTHER PLAYERS' debuff bars. Default = {true,0.5,0.3} (class colored, darkened by 50%, 0.3 unmodified alpha)
  75. c.playerbuff = {true,Priest and 0.7 or 1,0.3}   -- Buff bars. Default = {true,Priest and 0.7 or 1,0.3} (class colored, dimmed a bit if you're a Priest, 0.3 unmodified alpha)
  76. c.nowLine = {1,1,1,0.3}                                                 -- The "Now" line.
  77. c.bgcolor = {0,0,0,0.6}                                                 -- Color of the frame's background. Default = {0,0,0,0.6} (black, 60% opacity)
  78. c.bordercolor = {1,1,1,1}                                               -- Color of the frame's border. Default = {1,1,1,1} (white, fully opaque)
  79. c.gcdColor = {1,1,1,0.5}                                                -- Color of the GCD indicator. Default = {1,1,1,0.5}
  80. c.barbgcolor = {1,1,1,0.1}                                              -- Color of bar backgrounds. Default = {1,1,1,0.1} (barely visible)
  81.  
  82. --[[ This table adjusts blending modes for most portions of EventHorizon. These are not normally usable on Statusbar objects, which EventHorizon is fairly unique about not using.
  83. From wowprogramming.com's descriptions (which are very apt):
  84.         'ADD' - Adds texture color values to the underlying color values, using the alpha channel; light areas in the texture lighten the background while dark areas are more transparent
  85.         'ALPHAKEY' - One-bit transparency; pixels with alpha values greater than ~0.8 are treated as fully opaque and all other pixels are treated as fully transparent
  86.         'BLEND' - Normal color blending, using any alpha channel in the texture image
  87.         'DISABLE' - Ignores any alpha channel, displaying the texture as fully opaque
  88.         'MOD'   - Ignores any alpha channel in the texture and multiplies texture color values by background color values; dark areas in the texture darken the background while light areas are more transparent
  89.  
  90. Setting blend modes to 'ADD' or 'MOD' can have a very nice effect.
  91. Default (nil/false) is 'BLEND'.
  92. Most entries in the color table support this, as demonstrated below. The backdrop and bar backgrounds are incompatible.
  93.  ]]--
  94. config.blendModes = {
  95.         sent = nil,
  96.         tick = nil,
  97.         channeltick = nil,
  98.         casting = nil,
  99.         castLine = nil,
  100.         cooldown = nil,
  101.         debuffmine = nil,
  102.         debuff = nil,
  103.         playerbuff = nil,
  104.         nowLine = nil,
  105.         gcdColor = nil,
  106. }
  107.  
  108. -- This little table judges the thickness and positioning of each bar element.
  109. -- It's all done by percentages, from the top of the bar. 0 is the absolute top, 0.35 is 35% down from there, 0.5 is halfway down the bar, etc. 1 is the bottom of the bar. Yes, you can use numbers greater than 1, but it will probably look odd.
  110. EventHorizon.layouts = {                -- You can actually add anything from the table above here, segments just inherit off 'default' if they're not included. Just tinker with the numbers if you want to see how it works.
  111.         tick = {                                        -- Tick markers.
  112.                 top = 0,
  113.                 bottom = 0.12,
  114.         },
  115.         channeltick = {
  116.                 top = 0,
  117.                 bottom = 0.12,
  118.         },
  119.         smalldebuff = {                         -- The recast line for spells like Vampiric Touch and Immolate.
  120.                 top = 0,
  121.                 bottom = 0.25,
  122.         },
  123.         cantcast = {                            -- The blank section below the recast line.
  124.                 top = 0.25,
  125.                 bottom = 1,
  126.         },
  127.         smallCooldown = {
  128.                 top = 0.5,
  129.                 bottom = 1,
  130.         },
  131.         default = {                                     -- Just about everything else.
  132.                 top = 0,
  133.                 bottom = 1,
  134.         },
  135. }
clone this paste RAW Paste Data