A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
|
Originally Posted by Mischback
Can you please show CreateRaidLayout()? The styling should be in there.
For your range-checking: Again, it's fragmented, looks like you're supporting the oUF-built in range-checking and the spell-range plugin...
I'm not using this plugin, nor am I supporting this in my layout, so I can't really say anything about it...
My guess would be, that we can sort it out, if we see CreateRaidLayout().
|
This should be all of CreateRaidLayout:
Code:
local function CreateRaidLayout(self, unit)
self:SetScript('OnEnter', UnitFrame_OnEnter)
self:SetScript('OnLeave', UnitFrame_OnLeave)
self:SetAttribute('initial-height', oUF_Neav.units.raid.height)
self:SetAttribute('initial-width', oUF_Neav.units.raid.width)
-- health bar
self.Health = CreateFrame('StatusBar', nil, self)
self.Health:SetStatusBarTexture(oUF_Neav.media.statusbar, 'ARTWORK')
self.Health:SetFrameStrata('LOW')
self.Health:SetAllPoints(self)
self.Health:SetFrameLevel(1)
self.Health:SetOrientation('HORIZONTAL')
self.Health:SetBackdrop{
bgFile = 'Interface\\Buttons\\WHITE8x8',
insets = {
left = -1.5,
right = -1.5,
top = -1.5,
bottom = -1.5
},
}
self.Health:SetBackdropColor(0, 0, 0)
self.Health.PostUpdate = UpdateHealth
self.Health.colorClass = true
self.Health.Smooth = true
-- health background
self.Health.Background = self.Health:CreateTexture(nil, 'BORDER')
self.Health.Background:SetAllPoints(self.Health)
self.Health.Background:SetTexture(oUF_Neav.media.statusbar)
-- power bar
self.Power = CreateFrame('StatusBar', nil, self)
self.Power:SetWidth(55)
self.Power:SetFrameLevel(4)
self.Power:SetHeight(4)
self.Power:SetStatusBarTexture(oUF_Neav.media.statusbar, 'ARTWORK')
self.Power:SetParent(self)
self.Power:SetPoint("CENTER", self.Health, "CENTER", 0, -14)
self.Power:SetBackdrop{
bgFile = 'Interface\\AddOns\\GrizzlySharedMedia\\statusbar\\HalC',
insets = {
left = 0,
right = 0,
top = -1.5,
bottom = 0
},
}
self.Power:SetBackdropColor(0.3, 0.3, 0.3)
-- power bar bg
self.Power.bg = self.Power:CreateTexture(nil, "BORDER")
self.Power.bg:SetAllPoints(self.Power)
self.Power.bg:SetTexture(bartex)
-- power bar function
self.Power.colorDisconnected = true
self.Power.colorClass = false
self.Power.colorPower = true
self.PostUpdatePower = updatePower
self.Power.Smooth = true
self.Power.frequentUpdates = true
-- health text
self.Health.Value = self.Health:CreateFontString(nil, 'OVERLAY')
self.Health.Value:SetPoint('BOTTOM', 0, 5)
self.Health.Value:SetFont(oUF_Neav.media.font, 10)
self.Health.Value:SetShadowOffset(1, -1)
self:Tag(self.Health.Value, '[hpperc]')
-- name text
self.Name = self.Health:CreateFontString(nil, 'OVERLAY')
self.Name:SetPoint('TOP', 0, -6)
self.Name:SetFont(oUF_Neav.media.fontThick, 12)
self.Name:SetShadowOffset(1, -1)
self.Name:SetTextColor(1, 1, 1)
self:Tag(self.Name, '[name:Raid]')
-- aggro text
self.Aggro = self.Health:CreateFontString(nil, 'OVERLAY')
self.Aggro:SetPoint('CENTER', self, 'TOP')
self.Aggro:SetFont(oUF_Neav.media.font, 11, 'OUTLINE')
self.Aggro:SetShadowColor(0, 0, 0, 0)
self.Aggro:SetTextColor(1, 1, 1)
table.insert(self.__elements, UpdateThreat)
self:RegisterEvent('PLAYER_TARGET_CHANGED', UpdateThreat)
self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', UpdateThreat)
self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', UpdateThreat)
-- masterlooter icons
self.MasterLooter = self.Health:CreateTexture('$parentMasterLooterIcon', 'OVERLAY', self)
self.MasterLooter:SetHeight(11)
self.MasterLooter:SetWidth(11)
self.MasterLooter:SetPoint('RIGHT', self.Health, 'TOPRIGHT', -1, 1)
-- leader icons
self.Leader = self.Health:CreateTexture('$parentLeaderIcon', 'OVERLAY', self)
self.Leader:SetHeight(12)
self.Leader:SetWidth(12)
self.Leader:SetPoint('LEFT', self.Health, 'TOPLEFT', 1, 0)
-- raid icons
self.RaidIcon = self.Health:CreateTexture(nil, 'OVERLAY')
self.RaidIcon:SetHeight(18)
self.RaidIcon:SetWidth(18)
self.RaidIcon:SetPoint('CENTER', self, 'TOP')
self.RaidIcon:SetTexture('Interface\\TargetingFrame\\UI-RaidTargetingIcons')
-- readycheck icons
self.ReadyCheck = self.Health:CreateTexture(nil, 'OVERLAY')
self.ReadyCheck:SetPoint('TOPRIGHT', self.Health, -7, -7)
self.ReadyCheck:SetPoint('BOTTOMLEFT', self.Health, 7, 7)
self.ReadyCheck.delayTime = 4
self.ReadyCheck.fadeTime = 1
-- debuff icons
self.Icon = CreateFrame('Frame')
self.Icon:SetParent(self)
self.Icon:SetFrameStrata('MEDIUM')
self.Icon.Icon = self.Icon:CreateTexture(nil, 'ARTWORK', self.Icon)
self.Icon.Icon:SetPoint('CENTER', self.Health)
self.Icon.Icon:SetHeight(oUF_Neav.units.raid.iconSize)
self.Icon.Icon:SetWidth(oUF_Neav.units.raid.iconSize)
self.Icon.Icon:SetTexCoord(0.07, 0.93, 0.07, 0.93)
self.Icon.Count = self.Icon:CreateFontString(nil, 'OVERLAY', self.Icon)
self.Icon.Count:SetPoint('BOTTOMRIGHT', self.Icon.Icon, 1, 0)
self.Icon.Count:SetFont(oUF_Neav.media.font, 14, 'OUTLINE')
self.Icon.Count:SetShadowColor(0, 0, 0, 0)
self.Icon.Count:SetTextColor(1, 1, 1)
self.Icon.Border = self.Icon:CreateTexture(nil, 'BORDER', self.Icon)
self.Icon.Border:SetPoint('CENTER', self.Health)
self.Icon.Border:SetHeight(oUF_Neav.units.raid.iconSize + 7)
self.Icon.Border:SetWidth(oUF_Neav.units.raid.iconSize + 7)
self.Icon.Border:SetTexture('Interface\\Addons\\oUF_Neav\\media\\borderIcon')
self.Icon.Border:SetVertexColor(1, 1, 1)
table.insert(self.__elements, UpdateAura)
self:RegisterEvent('UNIT_AURA', UpdateAura)
self:RegisterEvent('UNIT_DEAD', UpdateAura)
-- create indicators
if (select(2, UnitClass('player')) == 'SHAMAN' or select(2, UnitClass('player')) == 'DRUID') then
CreateIndicators(self, unit)
end
-- playertarget border
if (oUF_Neav.units.raid.showTargetBorder) then
self.TargetBorder = self.Health:CreateTexture(nil, 'BORDER', self)
self.TargetBorder:SetPoint('TOPRIGHT', self.Health, 7, 7)
self.TargetBorder:SetPoint('BOTTOMLEFT', self.Health, -7, -7)
self.TargetBorder:SetTexture('Interface\\Addons\\oUF_Neav\\media\\borderTarget')
self.TargetBorder:SetVertexColor(unpack(oUF_Neav.units.raid.targetBorderColor))
self.TargetBorder:Hide()
self:RegisterEvent('PLAYER_TARGET_CHANGED', UpdateTargetBorder)
end
-- range check
self.Range = {
insideAlpha = 1,
outsideAlpha = 0.3,
}
self.SpellRange = {
insideAlpha = 1,
outsideAlpha = 0.3,
}
return self
end
|