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

Untitled

By: a guest on Apr 2nd, 2014  |  syntax: None  |  size: 0.81 KB  |  views: 73  |  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 kn = LibStub('AceAddon-3.0'):GetAddon('KuiNameplates')
  2. local mod = kn:NewModule('CustomInjector', 'AceEvent-3.0')
  3. ------------------------------------------------------------------------ Show --
  4. function mod:PostShow(msg, f)
  5.         -- move health.p to centre
  6.         f.health.p:ClearAllPoints()
  7.         f.health.p:SetJustifyH('CENTER')
  8.         f.health.p:SetJustifyV('CENTER')
  9.         f.health.p:SetPoint('CENTER')
  10.  
  11.         if f.level.enabled then
  12.                 -- change boss level text
  13.                 if f.level:GetText() == 'Boss' then
  14.                         f.level:SetText('??')
  15.                 end
  16.  
  17.                 -- move level back to top left
  18.                 f.level:ClearAllPoints()
  19.                 f.level:SetPoint('BOTTOMRIGHT', f.health, 'BOTTOMRIGHT',
  20.                                        2.5, 0)
  21.         end
  22. end
  23.  
  24. -------------------------------------------------------------------- Register --
  25. mod:RegisterMessage('KuiNameplates_PostShow', 'PostShow')
clone this paste RAW Paste Data