Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- You are free to use this as you wish, but please give credits if you use it as a base for your layout.
- I've tried to make it as easy to understand as possible, hopefully it's gonna be a good base for everyone to use.
- Huge credits to p3lim, as the base code is his. Also big credits to Led and Carebear, as they both inspired in some way.
- --]]
- -- Some local variables, it can also be seen as a config. Simply change the values of the variables to get some effect!
- local FONT = 'Interface\\AddOns\\oUF_Haori\\semplice.ttf'
- local BARTEXTURE = 'Interface\\AddOns\\oUF_Haori\\WaB.tga'
- local TEXTURE = 'Interface\\ChatFrame\\ChatFrameBackground'
- local BACKDROP = {
- bgFile = TEXTURE, insets = {top = -1, bottom = -1, left = -1, right = -1}
- }
- -- Set this to false if you want to use another buff addon such as Satrina's Buff Frames.
- local HIDE_DEFAULT_BUFFS = true
- local STYLE_TEMP_ENCHANTS = true -- Weapon enchants such as Windfury Weapon.
- -- Healthbars
- local HEALTH_USE_CLASS_COLOR = false -- Classcolored healthbars.
- local HEALTH_CUSTOM_COLOR = { r=0.18, b=0.18, g=0.18} -- What color to use if not the above setting is true.
- -- Powerbars
- local POWER_USE_CLASS_COLOR = true -- Classcolored powerbars.
- local POWER_CUSTOM_COLOR = { r=1, b=1, g=1} -- What color to use if not the above setting is true.
- -- Alright, we're done with those for now.
- -- Here we create a function to shorten health values from stuff like 2360003 to 2.36m, or 236000 to 236k. Wonderful!
- -- To be quite honest, this isn't mine. It's p3lims, credit where credit is due!
- local function ShortenValue(value)
- if(value >= 1e6) then
- return ('%.2fm'):format(value / 1e6):gsub('%.?0+([km])$', '%1')
- elseif(value >= 1e4) then
- return ('%.1fk'):format(value / 1e3):gsub('%.?0+([km])$', '%1')
- else
- return value
- end
- end
- -- Tags start here, edit these to modify hp displays, mana displays, etc etc. I'll try to comment as good as possible on them.
- --[[
- YES, THE HEALTH TAG, THE MOST FUN ONE. Kind of, no. Usually the most complex one, complex isn't fun. Well, sometimes it is, it's most often not.
- Well, what this does, is simply putting the health text in this format:
- If target is Disconnected, Dead, or a Ghost, it will say so.
- If they're not any of the above, it will show
- Enemy Target: His current HP, in white.
- Player: Nothing if you're on full health, if you lose health however it will display your current missing HP. SCARY HUH.
- Any other shit with not full health, it'd show health in this format: Health / MaxHealth.
- Else, it'll just show MaxHealth.
- --]]
- oUF.Tags['WimpfaceHP'] = function(unit)
- local min, max = UnitHealth(unit), UnitHealthMax(unit)
- local status = not UnitIsConnected(unit) and 'DC' or UnitIsGhost(unit) and 'Ghost' or UnitIsDead(unit) and 'Dead'
- if(status) then
- return status
- elseif(unit == 'target' and UnitCanAttack('player', unit)) then
- return ('%s'):format(ShortenValue(min))
- elseif(unit == 'player' and min ~= max) then
- return ('|cffff0000%d|r'):format(min - max)
- elseif(min ~= max) then
- return ('%s |cff0090ff/|r %s'):format(ShortenValue(min), ShortenValue(max))
- else
- return max
- end
- end
- --[[
- Right, extremely simple tag to display mana, rage etc.
- Basically, it shows your power, holy shit so complex.
- --]]
- oUF.Tags['WimpfacePOWAH'] = function(unit)
- local power = UnitPower(unit)
- if(power > 0 and not UnitIsDeadOrGhost(unit)) then
- local _, type = UnitPowerType(unit)
- local colors = _COLORS.power
- return ('%s%d|r'):format(Hex(colors[type] or colors['RUNES']), power)
- end
- end
- --[[
- Name tag, if it's tapped or DC'd it's grey. GREY I TELL YOU. OR is it gray? I don't know. l2englosh much
- If it isn't, it's just normal white. Shit that's not any fun or special at all. Well no, but it's awesome.
- --]]
- oUF.TagEvents['WimpfaceNAMEZ'] = 'UNIT_NAME_UPDATE UNIT_REACTION UNIT_FACTION'
- oUF.Tags['WimpfaceNAMEZ'] = function(unit)
- local reaction = UnitReaction(unit, 'player')
- local r, g, b = 1, 1, 1
- if((UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) or not UnitIsConnected(unit)) then
- r, g, b = 3/5, 3/5, 3/5
- end
- return ('%s%s|r'):format(Hex(r, g, b), UnitName(unit))
- end
- --[[
- We use this tag for raid and party frames only.
- Shows name if full health, dead/ghost/dc if any of those apply, and otherwise missing HP.
- --]]
- oUF.TagEvents['WimpfaceRAIDZ'] = 'UNIT_NAME_UPDATE'
- oUF.Tags['WimpfaceRAIDZ'] = function(unit)
- local name = UnitName(unit)
- local min, max = UnitHealth(unit), UnitHealthMax(unit)
- local status = not UnitIsConnected(unit) and 'DC' or UnitIsGhost(unit) and 'Ghost' or UnitIsDead(unit) and 'Dead'
- if(status) then
- return status
- elseif(min ~= max) then
- return ('|cffff0000%d|r'):format(min - max)
- else
- return name
- end
- end
- -- We're done with tags now.
- -- Now, we feel like creating a function to... well, spawn the menu that shows up when right clicking.
- local function SpawnMenu(self)
- ToggleDropDownMenu(1, nil, _G[string.gsub(self.unit, '^.', string.upper)..'FrameDropDown'], 'cursor')
- end
- -- Style buffs, because we want to. Basically just a 1px black border around it.
- local function PostCreateAura(element, button)
- button:SetBackdrop(BACKDROP)
- button:SetBackdropColor(0, 0, 0)
- button.cd:SetReverse()
- button.icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
- button.icon:SetDrawLayer('ARTWORK')
- end
- -- Ripped from p3lim, like a lot of shit in here. It's because it's all brilliant though.
- local function PostUpdateDebuff(element, unit, button, index)
- if(UnitIsFriend('player', unit) or button.isPlayer) then
- local _, _, _, _, type = UnitAura(unit, index, button.filter)
- local color = DebuffTypeColor[type] or DebuffTypeColor.none
- button:SetBackdropColor(color.r * 3/5, color.g * 3/5, color.b * 3/5)
- button.icon:SetDesaturated(false)
- else
- button:SetBackdropColor(0, 0, 0)
- button.icon:SetDesaturated(true)
- end
- end
- local function CustomCastText(element, duration)
- element.Time:SetFormattedText('%.1f', element.channeling and duration or (element.max - duration))
- end
- local function PostCastStart(element)
- local text = element.Text
- if(element.interrupt) then
- text:SetTextColor(1, 0, 0)
- else
- text:SetTextColor(1, 1, 1)
- end
- end
- if HIDE_DEFAULT_BUFFS == true then
- _G["BuffFrame"]:Hide()
- _G["BuffFrame"]:UnregisterAllEvents()
- _G["BuffFrame"]:SetScript("OnUpdate", nil)
- end
- MakeFS = function(parent, justify)
- local f = parent:CreateFontString(nil, "OVERLAY")
- f:SetFont(FONT, 8, "OUTLINE")
- f:SetShadowColor(0, 0, 0, 0)
- f:SetShadowOffset(0,0)
- if(justify) then f:SetJustifyH(justify) end
- return f
- end
- if(STYLE_TEMP_ENCHANTS) then
- for i = 1, 2 do
- _G["TempEnchant"..i.."Icon"]:Hide()
- _G["TempEnchant"..i.."Count"]:Hide()
- _G["TempEnchant"..i.."Border"]:Hide()
- _G["TempEnchant"..i.."Duration"] = MakeFS(UIParent)
- _G["TempEnchant"..i]:ClearAllPoints()
- _G["TempEnchant"..i]:SetAllPoints(_G["TempEnchant"..i.."Duration"])
- end
- elseif(not HIDE_DEFAULT_BUFFS) then
- _G["TemporaryEnchantFrame"]:Hide()
- _G["TemporaryEnchantFrame"]:SetScript("OnUpdate", nil)
- _G["TempEnchant1"]:SetScript("OnUpdate", nil)
- _G["TempEnchant2"]:SetScript("OnUpdate", nil)
- end
- -- Right, here we make changes to different units based on different shit. Mostly because we want to and... it's hot and quite easy to change.
- local UnitSpecific = {
- player = function(self)
- -- Spawn the leader icon, terrific!
- local leader = self.Health:CreateTexture(nil, 'OVERLAY')
- leader:SetPoint('TOPLEFT', self, 0, 8)
- leader:SetSize(16, 16)
- self.Leader = leader
- -- Spawn the assistant icon, terrific again!
- local assistant = self.Health:CreateTexture(nil, 'OVERLAY')
- assistant:SetPoint('TOPLEFT', self, 0, 8)
- assistant:SetSize(16, 16)
- self.Assistant = assistant
- -- Set the width of the frame. HURR DURR
- self:SetAttribute('initial-width', 220)
- local buffs = CreateFrame("Frame", nill, self)
- buffs:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -55, -55)
- buffs.initialAnchor = "TOPRIGHT"
- buffs["growth-y"] = "DOWN"
- buffs["growth-x"] = "LEFT"
- buffs:SetHeight(500)
- buffs:SetWidth((21.7 + 3) * 20)
- buffs.spacing = 6
- buffs.size = 21.7
- buffs.PostCreateIcon = PostCreateAura
- self.Buffs = buffs
- local debuffs = CreateFrame("Frame", nill, self)
- debuffs:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", 0, -475)
- debuffs.initialAnchor = "TOPRIGHT"
- debuffs["growth-x"] = "LEFT"
- debuffs["growth-y"] = "DOWN"
- debuffs:SetHeight(500)
- debuffs:SetWidth((21.7 + 3) * 20)
- debuffs.spacing = 6
- debuffs.size = 21.7
- debuffs.PostCreateIcon = PostCreateAura
- self.Debuffs = debuffs
- end,
- target = function(self)
- local buffs = CreateFrame('Frame', nil, self)
- buffs:SetPoint('TOPLEFT', self, 'TOPLEFT', 0, 24)
- buffs:SetSize(236, 44)
- buffs.num = 20
- buffs.size = 20
- buffs.spacing = 4
- buffs.initialAnchor = 'TOPLEFT'
- buffs['growth-y'] = 'UP'
- buffs.PostCreateIcon = PostCreateAura
- self.Buffs = buffs
- local cpoints = self:CreateFontString(nil, 'OVERLAY', 'SubZoneTextFont')
- cpoints:SetPoint('RIGHT', self, 'LEFT', -9, 0)
- cpoints:SetJustifyH('RIGHT')
- self:Tag(cpoints, '|cffffffff[cpoints]|r')
- self:SetAttribute('initial-width', 220)
- end,
- pet = function(self)
- local auras = CreateFrame('Frame', nil, self)
- auras:SetPoint('TOPRIGHT', self, 'TOPLEFT', -4, 0)
- auras:SetSize(236, 44)
- auras.size = 20
- auras.spacing = 4
- auras.initialAnchor = 'TOPRIGHT'
- auras['growth-x'] = 'LEFT'
- auras.PostCreateIcon = PostCreateAura
- self.Auras = auras
- self:SetAttribute('initial-width', 121)
- end,
- raid = function(self, unit)
- self:SetAttribute('initial-height', 30)
- self:SetAttribute('initial-width', 30)
- shared(self, unit)
- local health = self.Health
- health:ClearAllPoints()
- health:SetAllPoints(self)
- health.Smooth = nil
- health:SetOrientation("VERTICAL")
- if (IsAddOnLoaded("oUF_HealComm4")) then
- local heal = CreateFrame('StatusBar', nil, health)
- heal:SetHeight(0)
- heal:SetWidth(0)
- heal:SetStatusBarTexture(BARTEXTURE)
- heal:SetStatusBarColor(0, 1, 0, 0.4)
- heal:SetPoint("BOTTOM", health, "BOTTOM")
- self.HealCommBar = heal
- self.HealCommOthersOnly = true
- self.HealCommTimeframe = 2
- end
- if (IsAddOnLoaded("oUF_ResComm")) then
- local rescomm = CreateFrame("StatusBar", nil, self)
- rescomm:SetStatusBarTexture([=[Interface\Icons\Spell_Holy_Resurrection]=])
- rescomm:SetAllPoints(self)
- rescomm:SetAlpha(.25)
- local texObject = rescomm:GetStatusBarTexture()
- texObject:SetTexCoord(0.07, 0.93, 0.07, 0.93)
- texObject:SetVertTile(false)
- texObject:SetHorizTile(false)
- rescomm.OthersOnly = true
- self.ResComm = rescomm
- end
- local icon = CreateFrame("Frame", nil, self)
- icon:SetPoint("CENTER")
- icon:SetHeight(22)
- icon:SetWidth(22)
- icon:Hide()
- local iconTex = icon:CreateTexture(nil, "ARTWORK")
- iconTex:SetAllPoints(icon)
- iconTex:SetTexCoord(0.07, 0.93, 0.07, 0.93)
- local overlay = icon:CreateTexture(nil, "OVERLAY")
- overlay:SetTexture(gxMedia.buttonOverlay)
- overlay:SetPoint("TOPLEFT", icon, -1, 1)
- overlay:SetPoint("BOTTOMRIGHT", icon, 1, -1)
- local cooldown = CreateFrame("Cooldown", nil, icon)
- cooldown:SetPoint("TOPLEFT", icon, 2, -2)
- cooldown:SetPoint("BOTTOMRIGHT", icon, -1, 1)
- local count = cooldown:CreateFontString(nil, "OVERLAY")
- count:SetPoint("BOTTOMRIGHT", 0, 0)
- count:SetJustifyH("RIGHT")
- count:SetFont(gxMedia.font, 10, "OUTLINE")
- count:SetTextColor(0.84, 0.75, 0.65)
- local backdrop = CreateFrame("Frame", nil, icon)
- backdrop:SetPoint("TOPLEFT", icon, "TOPLEFT", -3.5, 3)
- backdrop:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 4, -3.5)
- backdrop:SetFrameStrata("LOW")
- backdrop:SetBackdrop(BACKDROP)
- backdrop:SetBackdropColor(0, 0, 0, 1)
- backdrop:SetBackdropBorderColor(0, 0, 0)
- icon.Texture = iconTex
- icon.Overlay = overlay
- icon.Count = count
- icon.Cooldown = cooldown
- icon.Backdrop = backdrop
- self.DebuffIcon = icon
- local raidInfo = self:CreateFontString(nil, "OVERLAY")
- raidInfo:SetFont(gxMedia.font, 14)
- raidInfo:SetShadowColor(0, 0, 0)
- raidInfo:SetShadowOffset(1.25, -1.25)
- raidInfo:SetPoint("CENTER", self)
- raidInfo:SetTextColor(0.84, 0.75, 0.65)
- self:Tag(raidInfo, "[raidcolor][WimpfaceRAIDZ]")
- self.RaidInfo = raidInfo
- local leader = self.Leader
- leader:SetHeight(8)
- leader:SetWidth(8)
- leader:SetPoint("CENTER", self, "TOPLEFT")
- local masterLooter = self.MasterLooter
- masterLooter:SetHeight(8)
- masterLooter:SetWidth(8)
- masterLooter:SetPoint("CENTER", self, "TOPLEFT", 8, 0)
- if (oUF.Indicators) then
- local auraStatus
- auraStatus = self:CreateFontString(nil, "ARTWORK")
- auraStatus:SetPoint("TOPLEFT", -2, 1)
- auraStatus:SetFont(FONT, 8, "OUTLINE|MONOCHROME")
- self:Tag(auraStatus, oUF.Indicators["TL"])
- self.AuraStatusTopLeft = auraStatus
- auraStatus = self:CreateFontString(nil, "ARTWORK")
- auraStatus:SetPoint("TOPRIGHT", 3, 1)
- auraStatus:SetFont(FONT, 8, "OUTLINE|MONOCHROME")
- self:Tag(auraStatus, oUF.Indicators["TR"])
- self.AuraStatusTopRight = auraStatus
- auraStatus = self:CreateFontString(nil, "ARTWORK")
- auraStatus:ClearAllPoints()
- auraStatus:SetPoint("BOTTOMLEFT", -2, 1)
- auraStatus:SetFont(FONT, 8, "OUTLINE|MONOCHROME")
- self:Tag(auraStatus, oUF.Indicators["BL"])
- self.AuraStatusBottomLeft = auraStatus
- auraStatus = self:CreateFontString(nil, "ARTWORK")
- auraStatus:SetPoint("CENTER", self, "BOTTOMRIGHT", 1, 1)
- auraStatus:SetFont(FONT, 8, "OUTLINE|MONOCHROME")
- self:Tag(auraStatus, oUF.Indicators["BR"])
- self.AuraStatusBottomRight = auraStatus
- end
- local role = self:CreateTexture(nil, "OVERLAY")
- role:SetHeight(12)
- role:SetWidth(12)
- role:SetPoint("CENTER", self, "TOPRIGHT")
- self.LFDRole = role
- end,
- }
- local function Shared(self, unit)
- self.colors.power.MANA = {0, 144/255, 1}
- self:RegisterForClicks('AnyUp')
- self:SetScript('OnEnter', UnitFrame_OnEnter)
- self:SetScript('OnLeave', UnitFrame_OnLeave)
- local health = CreateFrame('StatusBar', nil, self)
- health:SetStatusBarTexture(BARTEXTURE)
- if HEALTH_USE_CLASS_COLOR then
- health.colorClass = true
- health.colorTapping = true
- health.colorDisconnected = true
- health.colorReaction = true
- else
- health:SetStatusBarColor(HEALTH_CUSTOM_COLOR.r, HEALTH_CUSTOM_COLOR.g, HEALTH_CUSTOM_COLOR.b)
- end
- health.frequentUpdates = true
- self.Health = health
- local healthBG = health:CreateTexture(nil, 'BORDER')
- healthBG:SetAllPoints()
- healthBG:SetTexture(1/3, 1/3, 1/3)
- local healthValue = health:CreateFontString(nil, 'OVERLAY')
- healthValue:SetPoint('RIGHT', health, -2, -20)
- healthValue:SetFont(FONT, 8, 'OUTLINE|MONOCHROME')
- healthValue:SetJustifyH('RIGHT')
- healthValue.frequentUpdates = 1/4
- self:Tag(healthValue, '[WimpfaceHP]')
- self:SetBackdrop(BACKDROP)
- self:SetBackdropColor(0, 0, 0)
- -- health:SetBackdrop(BACKDROP)
- -- health:SetBackdropColor(0, 0, 0)
- if(unit == 'player' or unit == 'target' or unit == 'pet' or unit == 'targettarget') then
- local power = CreateFrame('StatusBar', nil, self)
- power:SetPoint('TOPRIGHT', 1)
- power:SetPoint('TOPLEFT', 1)
- power:SetStatusBarTexture(BARTEXTURE)
- power.frequentUpdates = true
- power:SetHeight(1)
- self.Power = power
- if POWER_USE_CLASS_COLOR then
- power.colorClass = true
- power.colorReaction = unit ~= 'pet'
- power.colorTapping = true
- power.colorDisconnected = true
- else
- power:SetStatusBarColor(POWER_CUSTOM_COLOR.r, POWER_CUSTOM_COLOR.g, POWER_CUSTOM_COLOR.b)
- end
- power.colorHappiness = unit == 'pet'
- power.colorPower = unit == 'pet'
- local powerBG = power:CreateTexture(nil, 'BORDER')
- powerBG:SetAllPoints()
- powerBG:SetTexture(TEXTURE)
- powerBG.multiplier = 1/3
- power.bg = powerBG
- -- power:SetBackdrop(BACKDROP)
- -- power:SetBackdropColor(0, 0, 0)
- if not(unit == 'target' or unit == 'targettarget') then
- local powerValue = health:CreateFontString(nil, 'OVERLAY')
- powerValue:SetPoint('LEFT', health, 2, -20)
- powerValue:SetFont(FONT, 8, 'OUTLINE|MONOCHROME')
- powerValue:SetJustifyH('LEFT')
- powerValue.frequentUpdates = 0.1
- self:Tag(powerValue, '[WimpfacePOWAH]')
- end
- local raidicon = health:CreateTexture(nil, 'OVERLAY')
- raidicon:SetPoint('TOP', self, 0, 8)
- raidicon:SetSize(16, 16)
- self.RaidIcon = raidicon
- health:SetHeight(18)
- health:SetPoint('BOTTOMRIGHT')
- health:SetPoint('BOTTOMLEFT')
- self.menu = SpawnMenu
- self:SetAttribute('type2', 'menu')
- self:SetAttribute('initial-height', 20)
- end
- if(unit == 'focus' or unit:find('target')) then
- local name = health:CreateFontString(nil, 'OVERLAY')
- name:SetPoint('LEFT', health, 2, -20)
- name:SetPoint('RIGHT', healthValue, 'LEFT')
- name:SetFont(FONT, 8, 'OUTLINE|MONOCHROME')
- name:SetJustifyH('LEFT')
- self:Tag(name, '[WimpfaceNAMEZ< ][|cff0090ff>rare<|r]')
- local debuffs = CreateFrame('Frame', nil, self)
- debuffs.spacing = 4
- debuffs.initialAnchor = 'TOPLEFT'
- debuffs.PostCreateIcon = PostCreateAura
- self.Debuffs = debuffs
- if(unit == 'target') then
- debuffs.num = 20
- debuffs.size = 21.7
- debuffs['growth-y'] = 'DOWN'
- debuffs.PostUpdateIcon = PostUpdateDebuff
- debuffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -20)
- else
- health:SetHeight(18)
- self:SetAttribute('initial-height', 20)
- self:SetAttribute('initial-width', 121)
- end
- if(unit == 'focus') then
- debuffs:SetPoint('TOPLEFT', self, 'TOPRIGHT')
- debuffs.onlyShowPlayer = true
- elseif(unit ~= 'target') then
- debuffs:SetPoint('TOPLEFT', self, 'TOPRIGHT', 4, 0)
- debuffs.initialAnchor = 'TOPLEFT'
- debuffs['growth-x'] = 'RIGHT'
- end
- debuffs:SetSize(230, 21.7)
- end
- if(unit == 'player' or unit == 'target') then
- local castbar = CreateFrame('StatusBar', nil, self)
- castbar:SetSize(205, 16)
- castbar:SetStatusBarTexture(BARTEXTURE)
- castbar:SetStatusBarColor(0.18, 0.18, 0.18)
- castbar:SetBackdrop(BACKDROP)
- castbar:SetBackdropColor(0, 0, 0)
- castbar.CustomTimeText = CustomCastText
- self.Castbar = castbar
- local castbarBG = castbar:CreateTexture(nil, 'BORDER')
- castbarBG:SetAllPoints()
- castbarBG:SetTexture(1/3, 1/3, 1/3)
- local castbarTime = castbar:CreateFontString(nil, 'OVERLAY')
- castbarTime:SetPoint('RIGHT', -2, 0)
- castbarTime:SetFont(FONT, 8, 'OUTLINE|MONOCHROME')
- castbarTime:SetJustifyH('RIGHT')
- castbar.Time = castbarTime
- local castbarText = castbar:CreateFontString(nil, 'OVERLAY')
- castbarText:SetPoint('LEFT', 2, 0)
- castbarText:SetPoint('RIGHT', castbarTime)
- castbarText:SetFont(FONT, 8, 'OUTLINE|MONOCHROME')
- castbarText:SetJustifyH('LEFT')
- castbar.Text = castbarText
- local castbarDummy = CreateFrame('Frame', nil, castbar)
- castbarDummy:SetSize(21, 21)
- castbarDummy:SetBackdrop(BACKDROP)
- castbarDummy:SetBackdropColor(0, 0, 0)
- local castbarIcon = castbarDummy:CreateTexture(nil, 'ARTWORK')
- castbarIcon:SetAllPoints()
- castbarIcon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
- castbar.Icon = castbarIcon
- if(unit == 'target') then
- castbar.PostCastStart = PostCastStart
- castbar.PostChannelStart = PostCastStart
- castbar:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -60)
- castbarDummy:SetPoint('BOTTOMLEFT', castbar, 'BOTTOMRIGHT', 4, 0)
- else
- castbar:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -60)
- castbarDummy:SetPoint('BOTTOMRIGHT', castbar, 'BOTTOMLEFT', -4, 0)
- end
- end
- if(UnitSpecific[unit]) then
- return UnitSpecific[unit](self)
- end
- end
- oUF.colors.power.MANA = {0, 144/255, 1}
- oUF:RegisterStyle('Haori', Shared)
- for unit, layoutFunc in next, unitSpecific do
- oUF:RegisterStyle('Haori - ' .. unit:gsub("^%l", string.upper), layoutFunc)
- end
- oUF:Factory(function(self)
- self:SetActiveStyle('Haori')
- self:Spawn('player'):SetPoint('CENTER', UIParent, 'CENTER', -175, -230)
- self:Spawn('pet'):SetPoint('CENTER', UIParent, 'CENTER', -250, -230)
- self:Spawn('focus'):SetPoint('CENTER', UIParent, 'CENTER', -250, -80)
- self:Spawn('target'):SetPoint('CENTER', UIParent, 'CENTER', 175, -230)
- self:Spawn('targettarget'):SetPoint('CENTER', UIParent, 'CENTER', 349, -230)
- self:SetActiveStyle("Haori - Raid")
- local group = self:SpawnHeader(nil, nil, "raid,party",
- "showPlayer", true,
- "showRaid", true,
- "ShowParty", true,
- "yOffset", 5,
- "xOffset", 5,
- "maxColumns", 8,
- "point", "BOTTOM",
- "unitsPerColumn", 5,
- "columnSpacing", 5,
- "columnAnchorPoint", "LEFT",
- "groupingOrder", "1,2,3,4,5,6,7,8",
- "groupBy", "GROUP"
- )
- group:SetPoint("CENTER", UIParent, "CENTER", 0, -275)
- end)
- local testui = TestUI or function() end
- TestUI = function()
- testui()
- UnitAura = function()
- -- name, rank, texture, count, dtype, duration, timeLeft, caster
- return 'penancelol', 'Rank 2', 'Interface\\Icons\\Spell_Holy_Penance', random(5), 'Magic', 0, 0, "player"
- end
- if(oUF) then
- for i, v in pairs(oUF.units) do
- if(v.UNIT_AURA) then
- v:UNIT_AURA("UNIT_AURA", v.unit)
- end
- end
- end
- end
- SlashCmdList.TestUI = TestUI
- SLASH_TestUI1 = "/testui"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement