Advertisement
plumwd

myconfig.lua

Aug 28th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.21 KB | None | 0 0
  1. local EHN,ns = ...
  2.  
  3. local old = true
  4.  
  5.  
  6. if not old then
  7.  
  8. local _,class = UnitClass('player') -- These locals make in-line conditions a little easier. See the color section for a few examples.
  9. local DK = class == "DEATHKNIGHT"
  10. local Druid = class == "DRUID"
  11. local Hunter = class == "HUNTER"
  12. local Mage = class == "MAGE"
  13. local Monk = class == "MONK"
  14. local Paladin = class == "PALADIN"
  15. local Priest = class == "PRIEST"
  16. local Rogue = class == "ROGUE"
  17. local Shaman = class == "SHAMAN"
  18. local Warlock = class == "WARLOCK"
  19. local Warrior = class == "WARRIOR"
  20. ns.colors = {}
  21.  
  22.  
  23. -- DO NOT MODIFY ABOVE THIS LINE --
  24.  
  25. ns.pConfig = {
  26.     --Bar Options
  27.     height = 300,               -- Height of the total frame. EH will now automatically resize the height of spellBars depending on how many are active
  28.     width = 500,                -- Width of the total frame. (This includes the actual spellBar, as well as the icon)
  29.     barSpacing = 0,             -- Amount of space vertically between spellBars
  30.     minBars = 3,                -- If there are less than or equal to minBars shown, Eh will resize the bars as if there were minBars actually shown. In other words, the total frame will become shorter, rather than the bars becoming larger. You can also think of it like setting an upper-limit on how tall a spellBar can be. (that being height/minBars)
  31.     texture = "Interface\\Addons\\EventHorizon\\Smooth",
  32.                                 -- If a path to a texture, EH will use that. If a table of {r, g, b, a}, EH will use that.
  33.     textureAlphaMultiplier = 2, -- Textures generally appear darker than a solid color. The alpha value is multiplied by this to counteract this effect
  34.    
  35.     --Icon Options
  36.     icons = true,               -- If set to false or nil, EH will not show icons and only show the spellBar.
  37.     iconWidth = 0.1,            -- Width of the icon. If <1 EH assumes this is a percent of the width. If >1 EH will set it as a pixel value.
  38.    
  39.     --Stack Indicator Options
  40.     stackFont = false,          -- If this is set to a font path, EH will use that font for the stack indicator
  41.     stackSize = false,          -- Sets the font size of the indicator if set to a number
  42.     stackOutline = false,       -- Sets the outline of the font. Valid: "OUTLINE", "THICKOUTLINE", "MONOCHROME"
  43.     stackColor = false,         -- Sets the color of the font. {R, G, B, A}
  44.     stackShadow = false,        -- Sets whether there should be a shadow effect on the text
  45.     stackShadowOffset = false,  -- Sets the offset from the text the shadow should be {x,y}
  46.     stackPosition = false,      -- Sets the position and offset of the stack Indicator relative to the icon. { RelativePoint, xOffSet, yOffSet } Default: {"BOTTOMRIGHT", -2, 2}
  47.    
  48.     --Backdrop Options
  49.     backdrop = true,            -- Whether to setup a backdrop (true) or not (false)
  50.     texture = "Interface\\ChatFrame\\ChatFrameBackground",
  51.                                 -- Path to the texture to use as the backdrop
  52.     border = "Interface\\Tooltips\\UI-Tooltip-Border",
  53.                                 -- Path to the texture to use as a border
  54.     padding = 2,                -- Extra space (in pixels) between the barFrames/Icons and the backdrop
  55.     edgeSize = 8,               -- Thickness of the frame's border. You'll have to mess around with this if you change the border texture to make it look right
  56.     inset = {top = 2, bottom = 2, left = 2, right = 2},
  57.                                 -- Changes the distance between the border texture and the backdrop texture. Moves the backdrop in x pixels.
  58.    
  59.     --Time Settings
  60.     past = -3,                  -- Time in the past in seconds to show to the left of the now line (As a negative number)
  61.     future = 12,                -- Time in the future to show to the right of the now line
  62.     futureLog = false,          -- For the future, I may implement a log scale for the future if enabled. NYI
  63.    
  64. }
  65.  
  66. -- The format for the color section is {Red, Green, Blue, Opacity/Alpha}. To color a bar or indicator by class, use {true, <burn>, <alpha>}.
  67. -- <burn> means color intensity - 0.5 burn darkens a color by 50%. 1.2 lightens it by 20%. 1 is baseline.
  68. local c = ns.colors
  69. c.sent = {true,Priest and 0.7 or 1,0.5}
  70. 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)
  71. c.channeltick = {0,1,0.2,0.25}                  -- Tick markers for channeled spells. Default is the same as casting.
  72. c.casting = {0,1,0.2,0.25}                          -- Casting bars. Default = {0,1,0,0.25} (green, 0.25 unmodified alpha)
  73. 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)
  74. 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)
  75. c.debuff = {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)
  76. c.buff = {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)
  77. c.nowLine = {1,1,1,0.3}                         -- The "Now" line.
  78. c.bgcolor = {0,0,0,0.6}                         -- Color of the frame's background. Default = {0,0,0,0.6} (black, 60% opacity)
  79. c.bordercolor = {1,1,1,1}                       -- Color of the frame's border. Default = {1,1,1,1} (white, fully opaque)
  80. c.gcdColor = {1,1,1,0.5}                        -- Color of the GCD indicator. Default = {1,1,1,0.5}
  81.  
  82.  
  83. --[[ 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.
  84. From wowprogramming.com's descriptions (which are very apt):
  85.     '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
  86.     '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
  87.     'BLEND' - Normal color blending, using any alpha channel in the texture image
  88.     'DISABLE' - Ignores any alpha channel, displaying the texture as fully opaque
  89.     '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
  90.  
  91. Setting blend modes to 'ADD' or 'MOD' can have a very nice effect.
  92. Default (nil/false) is 'BLEND'.
  93. Most entries in the color table support this, as demonstrated below. The backdrop and bar backgrounds are incompatible.
  94.  ]]
  95. ns.blendModes = {
  96.     tick = "BLEND",
  97.     channeltick = "BLEND",
  98.     casting = "BLEND",
  99.     cooldown = "BLEND",
  100.     debuff = "BLEND",
  101.     buff = "BLEND",
  102.     nowLine = "BLEND",
  103.     gcdColor = "BLEND",
  104. }
  105.  
  106. -- This little table judges the thickness and positioning of each bar element.
  107. -- 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.
  108. ns.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.
  109.     tick = {                    -- Tick markers.
  110.         top = 0,
  111.         bottom = 0.12,
  112.     },
  113.     channeltick = {
  114.         top = 0,
  115.         bottom = 0.12,
  116.     },
  117.     smalldebuff = {             -- The recast line for spells like Vampiric Touch and Immolate.
  118.         top = 0.12,
  119.         bottom = 0.25,
  120.     },
  121.     cantcast = {                -- The blank section below the recast line.
  122.         top = 0.25,
  123.         bottom = 1,
  124.     },
  125.     default = {                 -- Just about everything else.
  126.         top = 0.12,
  127.         bottom = 1,
  128.     },
  129. }
  130.  
  131. else
  132.  
  133. local config = EventHorizon.config
  134. local _,class = UnitClass('player') -- These locals make in-line conditions a little easier. See the color section for a few examples.
  135. local DK = class == "DEATHKNIGHT"
  136. local Druid = class == "DRUID"
  137. local Hunter = class == "HUNTER"
  138. local Mage = class == "MAGE"
  139. local Paladin = class == "PALADIN"
  140. local Priest = class == "PRIEST"
  141. local Rogue = class == "ROGUE"
  142. local Shaman = class == "SHAMAN"
  143. local Warlock = class == "WARLOCK"
  144. local Warrior = class == "WARRIOR"
  145.  
  146. config.showTrinketBars = false          -- Show bars for your equipped trinkets? Default = true
  147. 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.
  148. 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.
  149.  
  150. config.enableRedshift = false           -- Enable Redshift's show/hide functions? Default = false
  151. config.Redshift.showCombat = true       -- Always show EH in combat. Default = true
  152. config.Redshift.showHarm = true         -- Show EH if targeting an attackable unit, in or out of combat. Default = true
  153. config.Redshift.showHelp = false        -- Show EH if targeting a friendly (unattackable) unit, in or out of combat. Default = false
  154. config.Redshift.showBoss = true         -- Always show EH when targeting a boss-level unit, regardless of its attackable state. Default = true
  155. config.Redshift.showFocus = false       -- Always show EH while a focus unit exists, in or out of combat. Default = false
  156. 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
  157. config.Redshift.hideVitals = true       -- Hide EventHorizon_Vitals as well when the main frame is hidden. Default = true
  158.  
  159. 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.
  160. 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.
  161.  
  162. 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)
  163. config.width = 400                      -- Width of a single bar, not counting its icon. The actual width of the frame is (width+height+[padding*2]).
  164. config.height = 18                      -- Height of a single bar. If you use config.staticHeight, this is used for the width of the bar icons.
  165. config.spacing = 0                      -- Vertical spacing between bars.
  166. config.scale = 1                        -- The overall scale of the main frame.
  167. config.staticheight = 150               -- 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.
  168. config.staticframes = 3                 -- 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.
  169. 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.
  170.  
  171. config.past = -1                        -- Number of seconds to show in the past. Default = -3 (yes, it's a negative number)
  172. config.future = 8                       -- Number of seconds to show in the future. Recommended to keep this between 12-18 unless you've got some crazy configuration. Default = 12
  173.  
  174. 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
  175. config.bartexture = "Interface\\Addons\\EventHorizon\\Smooth"   -- Full path, minus extension, of the bar texture to use. Default = "Interface\\Addons\\EventHorizon\\Smooth"
  176. 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.
  177. config.barbg = false                    -- Shows a backdrop behind each individual bar. The color of the backdrop may be set within the color table below.
  178.  
  179. config.backdrop = true                                      -- Use the background and border frame? Default = true
  180. config.padding = 3                                          -- Extra space between the bar edges and the backdrop/border.
  181. config.bg = "Interface\\ChatFrame\\ChatFrameBackground"     -- Frame background texture. Full path, no extension. Default = "Interface\\ChatFrame\\ChatFrameBackground"
  182. config.border = ""  -- Border texture, same thing all over. Default = "Interface\\Tooltips\\UI-Tooltip-Border"
  183. config.edgesize = 8                                         -- Thickness of the frame's border. Default = 8
  184. 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}
  185.  
  186. config.stackFont = false                -- Changes the font of the stack indicators. Usage: config.stackFont = "Interface\\AddOns\\FontDirectory\\FontName.ttf"
  187. 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)
  188. config.stackFontOutline = false         -- Adds an outline to the font. Only usable with config.stackFont. Valid flags: "OUTLINE", "THICKOUTLINE", "MONOCHROME". Usage: config.stackFontSize = "FLAG"
  189. 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)
  190. 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} )
  191. config.stackFontShadowOffset = false    -- Changes the offset of the font shadow if config.stackFontShadow is set. Usage: config.stackFontShadowOffset = {x,y} (default = {1,-1})
  192. 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
  193.  
  194. -- The format for the color section is {Red, Green, Blue, Opacity/Alpha}. To color a bar or indicator by class, use {true, <burn>, <alpha>}.
  195. -- <burn> means color intensity - 0.5 burn darkens a color by 50%. 1.2 lightens it by 20%. 1 is baseline.
  196. local c = EventHorizon.colors
  197. 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)
  198. 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)
  199. c.channeltick = {0,1,0.2,0.25}                  -- Tick markers for channeled spells. Default is the same as casting.
  200. c.casting = {0,1,0.2,0.7}                           -- Casting bars. Default = {0,1,0,0.25} (green, 0.25 unmodified alpha)
  201. c.castLine = {0,0,0,0.7}                        -- 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)
  202. c.cooldown = {0.6,0.8,1,0.9}                        -- Cooldown bars. Default = {0.6,0.8,1,0.3} (mute teal, 0.3 unmodified alpha)
  203. c.debuffmine = {true,Priest and 0.5 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)
  204. c.debuff = {true,0.5,0.7}                       -- OTHER PLAYERS' debuff bars. Default = {true,0.5,0.3} (class colored, darkened by 50%, 0.3 unmodified alpha)
  205. c.playerbuff = {true,Priest and 0.5 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)
  206. c.nowLine = {1,1,1,0.3}                         -- The "Now" line.
  207. c.bgcolor = {0,0,0,0.6}                         -- Color of the frame's background. Default = {0,0,0,0.6} (black, 60% opacity)
  208. c.bordercolor = {1,1,1,1}                       -- Color of the frame's border. Default = {1,1,1,1} (white, fully opaque)
  209. c.gcdColor = {1,1,1,0.5}                        -- Color of the GCD indicator. Default = {1,1,1,0.5}
  210. c.barbgcolor = {1,1,1,0.1}                      -- Color of bar backgrounds. Default = {1,1,1,0.1} (barely visible)
  211.  
  212. --[[ 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.
  213. From wowprogramming.com's descriptions (which are very apt):
  214.     '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
  215.     '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
  216.     'BLEND' - Normal color blending, using any alpha channel in the texture image
  217.     'DISABLE' - Ignores any alpha channel, displaying the texture as fully opaque
  218.     '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
  219.  
  220. Setting blend modes to 'ADD' or 'MOD' can have a very nice effect.
  221. Default (nil/false) is 'BLEND'.
  222. Most entries in the color table support this, as demonstrated below. The backdrop and bar backgrounds are incompatible.
  223.  ]]
  224. config.blendModes = {
  225.     sent = nil,
  226.     tick = nil,
  227.     channeltick = nil,
  228.     casting = nil,
  229.     castLine = nil,
  230.     cooldown = nil,
  231.     debuffmine = nil,
  232.     debuff = nil,
  233.     playerbuff = nil,
  234.     nowLine = nil,
  235.     gcdColor = nil,
  236. }
  237.  
  238. -- This little table judges the thickness and positioning of each bar element.
  239. -- 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.
  240. 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.
  241.     tick = {                    -- Tick markers.
  242.         top = 0,
  243.         bottom = 0.12,
  244.     },
  245.     channeltick = {
  246.         top = 0,
  247.         bottom = 0.12,
  248.     },
  249.     smalldebuff = {             -- The recast line for spells like Vampiric Touch and Immolate.
  250.         top = 0.12,
  251.         bottom = 0.25,
  252.     },
  253.     cantcast = {                -- The blank section below the recast line.
  254.         top = 0.25,
  255.         bottom = 1,
  256.     },
  257.     smallCooldown = {
  258.         top = 0.5,
  259.         bottom = 1,
  260.     },
  261.     default = {                 -- Just about everything else.
  262.         top = 0.12,
  263.         bottom = 1,
  264.     },
  265. }
  266.  
  267. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement