Thread Tools Display Modes
02-20-09, 02:44 AM   #761
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Might just be me imagining things but today, while i was trying to fix an error in my layout and thus having default blizzard frames displayed i've noticed something.
The cooldown animations on my target's debuffs, it's different than with oUF, some kind of yellowish sonar animation, is it possible to have the same with oUF ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
 
02-20-09, 03:11 AM   #762
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Originally Posted by Caellian View Post
Might just be me imagining things but today, while i was trying to fix an error in my layout and thus having default blizzard frames displayed i've noticed something.
The cooldown animations on my target's debuffs, it's different than with oUF, some kind of yellowish sonar animation, is it possible to have the same with oUF ?
I noticed that too.. Blizz is getting hi-tech on us
 
02-20-09, 03:15 AM   #763
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
Originally Posted by Freebaser View Post
I noticed that too.. Blizz is getting hi-tech on us
Indeedio!

Will you actually be able to play with the default UI in some time? :O
__________________
All I see is strobe lights blinding me in my hindsight.
 
02-20-09, 03:50 AM   #764
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Originally Posted by Wimpface View Post
Indeedio!

Will you actually be able to play with the default UI in some time? :O
Whut ??? no way, if i ever have to, i quit...
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
 
02-20-09, 04:56 AM   #765
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
The Blizz default frames are the best I've found for PvP thus far. Lots of others are more elegant (and I'm definitely a fan of oUF) and have cool features, but it's hard to match the blizzard UI for some things.

On the other hand, the blizzard UI is garbage for other things, like raid frames.

I've been working on and off on unit frames using oUF for quite some time now, but it's proven tricky to mimic some of the behavior of the blizzard frames, and it seems like there's always something else that I forgot to include.
 
02-20-09, 06:24 AM   #766
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Originally Posted by Dimpf View Post
The Blizz default frames are the best I've found for PvP thus far. Lots of others are more elegant (and I'm definitely a fan of oUF) and have cool features, but it's hard to match the blizzard UI for some things.

On the other hand, the blizzard UI is garbage for other things, like raid frames.

I've been working on and off on unit frames using oUF for quite some time now, but it's proven tricky to mimic some of the behavior of the blizzard frames, and it seems like there's always something else that I forgot to include.
Maybe you should take a look at oUF_Neav then, it's a blizzard frame replica.
Which features are you missing or finding more appealing in the default frames btw ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
 
02-20-09, 08:26 PM   #767
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
I'm trying to filter debuffs and it's completely driving me nuts. I searched this thread, the general thread, and even the wowace thread for some help. But I had no success, really.

I want to filter debuffs to only show debuffs i can dispel. It should work for all classes that can dispel.

Basically it should simply be
Code:
self.Debuffs.filter = false
set to
Code:
self.Debuffs.filter = true
Which would show all debuffs i can either cast or dispel myself.

I want to filter them on party and raid frames only, which is why I'm calling it separately for player/target/party....whatever.

BUT! Once I'm setting it to true, my debuffs magically become a "showeverything" frame, which includes even buffs...... I don't get it, setting it back to false, only shows debuffs. Which should be the basic behaviour of the debuff frame anyway.

Any help ?


EDIT:

I'm using
Code:
self.Debuffs = CreateFrame("Frame", nil, self)
instead of
Code:
self.Debuffs = debuffs
Could this be the reason? Or do i have to use both ? Does this has anything to do with "self.Debuffs.filter = true/false" at all ?

EDIT#2:
Ok, I figured it might be something like
Code:
self.Debuffs.filter = "HARMFUL"
However, I can't find the function that calls for "removable" (by player).

Last edited by Dawn : 02-20-09 at 10:27 PM.
 
02-20-09, 08:31 PM   #768
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
Originally Posted by Caellian View Post
Maybe you should take a look at oUF_Neav then, it's a blizzard frame replica.
Which features are you missing or finding more appealing in the default frames btw ?
Yeah, I'm familiar with it. One thing that I don't think Neav has is the PvP icon, as well as the debuff spiral mentioned above. Also, the castbar animation will flash "interrupted" if it's cancelled, and whatnot. I'll post a SS detailing what I especially like about the default later.
 
02-20-09, 10:06 PM   #769
Lùinwë
A Defias Bandit
Join Date: Jan 2009
Posts: 2
I would like to add reaction color on health bars for units of the other faction of the player. I tried different things like UnitFactionGroup or UnitCanAttack to do that but nothing works fine. I use Caellian actually.

How can I include this function in the code please ?

PS : Sorry for my poor english
 
02-21-09, 05:56 AM   #770
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
Originally Posted by Lùinwë View Post
I would like to add reaction color on health bars for units of the other faction of the player. I tried different things like UnitFactionGroup or UnitCanAttack to do that but nothing works fine. I use Caellian actually.

How can I include this function in the code please ?

PS : Sorry for my poor english
I believe you're looking for something like this:

Code:
	if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) or not UnitIsConnected(unit)) or not (unit == 'target') then
		self:SetBackdropColor(0, 0, 0, .8)
	else
		local r, g, b = UnitSelectionColor(unit)
		self:SetBackdropColor(r, g, b, .5)
	end
I use this to set the backdrop of my frame to that color, though you could do it to other frames. I believe that was originally written by Haste, or something like it.
 
02-21-09, 06:06 AM   #771
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
Originally Posted by Dimpf View Post
Yeah, I'm familiar with it. One thing that I don't think Neav has is the PvP icon, as well as the debuff spiral mentioned above. Also, the castbar animation will flash "interrupted" if it's cancelled, and whatnot. I'll post a SS detailing what I especially like about the default later.

Firstly, i believe PvP icons + the cooldown spiral are included with _Neav, and they're relatively easy to add in if not. The interrupted thing could prove more tricky, but you could dig up some code from something like azcastbar for it (it's probably a relatively simple OnUpdate)

Edit:
Code:
if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) or not UnitIsConnected(unit)) or not (unit == 'target') then
		self:SetBackdropColor(0, 0, 0, .8)
	else
		local r, g, b = UnitSelectionColor(unit)
		self:SetBackdropColor(r, g, b, .5)
	end
I believe you need to wrap { } round UnitSelectionColor(unit)?

Last edited by ObbleYeah : 02-21-09 at 06:11 AM.
 
02-21-09, 08:44 AM   #772
Lùinwë
A Defias Bandit
Join Date: Jan 2009
Posts: 2
Originally Posted by Dimpf View Post
I believe you're looking for something like this:

Code:
	if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) or not UnitIsConnected(unit)) or not (unit == 'target') then
		self:SetBackdropColor(0, 0, 0, .8)
	else
		local r, g, b = UnitSelectionColor(unit)
		self:SetBackdropColor(r, g, b, .5)
	end
Thank you for your help, my error was in the code for the color.

Originally Posted by ObbleYeah View Post
I believe you need to wrap { } round UnitSelectionColor(unit)?
I think you have to use it only when you write tags, for example :
Code:
['MANA'] = {.11,.22,.33}
 
02-21-09, 03:12 PM   #773
Soulcleaver
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 65
hey guys im using oUF_Neav in my new ui: DarkenedBlizz UI and ive got a few stuff they want in it... so how do i get this ui:



to get to look like this:......?




ive tried alot in the lua but allways messes it up and only thing i can manage is to show the status text but as u see in the first pic and not like i want it plz help^^

NBhope you see that the portraits are in 3d in the how i want it to be pic)


Code:

Code:
local time
local _G = getfenv(0)

for _, v in pairs({
    InterfaceOptionsPartyRaidPanelPartyBackground,
    InterfaceOptionsPartyRaidPanelPartyPets,
    InterfaceOptionsCombatPanelTargetOfTarget,
    InterfaceOptionsCombatPanelTOTDropDown,
    InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait,
}) do
    v:SetAlpha(0.35)
    v:Disable()
    v.Enable = v.Disable
end
    
local function CreateFont(parentName, font, fontSize, fontStyle, xShadow, yShadow)
	local f = parentName:CreateFontString(nil, "OVERLAY")
	f:SetFont(font, fontSize, fontStyle)
	f:SetShadowOffset(xShadow, yShadow)
	return f
end

local function menu(self)   
	local unit = self.unit:sub(1, -2)
	local cunit = self.unit:gsub("(.)", string.upper, 1)

	if (unit == "party" or unit == "partypet") then
		ToggleDropDownMenu(1, nil, _G["PartyMemberFrame"..self.id.."DropDown"], "cursor", 0, 0)
	elseif(_G[cunit.."FrameDropDown"]) then
		ToggleDropDownMenu(1, nil, _G[cunit.."FrameDropDown"], "cursor", 0, 0)
	end
end

local function NumFormat(i)
    if (i >= 1000000) then
        return ("%.3fK"):format(i / 1e6):gsub("%.", "M ")
    elseif (i >= 100000) then
        return ("%.3f"):format(i / 1e3):gsub("%.", "K ")
    else
        return i
    end
end

local function UpdateColor(self, unit, func)
	local colorA, colorB
	local _, class = UnitClass(unit)

    for i = 1, 4 do
        if (unit == "party"..i) then
            colorA = oUF.colors.class[class]
        end
    end

    if (unit == "pet" and GetPetHappiness()) then
		colorA = oUF.colors.happiness[GetPetHappiness()]
    elseif (unit == "player" or not UnitIsFriend("player", unit) and UnitIsPlayer(unit) and UnitClass(unit)) then
		colorA = oUF.colors.class[class]
	else
		colorB = {1, 1, 1}
	end

	if (colorA) then
		self:SetTextColor(colorA[1], colorA[2], colorA[3])
	elseif (colorB) then
		self:SetTextColor(colorB[1], colorB[2], colorB[3])
	end
end

local function OverrideUpdateLevel(self, unit, name)
    local level = UnitLevel(unit)
    local color = GetDifficultyColor(level)

    if (level < 0) then 
        self.Level:SetTextColor(1, 0, 0)
    else
        self.Level:SetTextColor(color.r, color.g, color.b)
    end
    
    if (UnitClassification(unit) == "elite") then
        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Elite")
    elseif (UnitClassification(unit) == "rareelite") then
        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite")
    elseif (UnitClassification(unit) == "rare") then
        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare")
    elseif (UnitClassification(unit) == "worldboss") then
        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Elite")
    else
        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame")
    end
end

local function OverrideUpdateName(self, event, unit)
    if (self.unit == unit) then
        if (self.Background) then
            if (UnitIsDead(unit) or UnitIsGhost(unit) or UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then
                self.Background:SetVertexColor(0.5, 0.5, 0.5)
            elseif (UnitIsFriend(unit, "player") and UnitIsPlayer(unit)) then
                self.Background:SetVertexColor(RAID_CLASS_COLORS[select(2, UnitClass(unit))].r, RAID_CLASS_COLORS[select(2, UnitClass(unit))].g, RAID_CLASS_COLORS[select(2, UnitClass(unit))].b)
            elseif not UnitIsFriend(unit, "player") and UnitIsPlayer(unit) then 
                self.Background:SetVertexColor(0.9, 0, 0)
            else
                self.Background:SetVertexColor(UnitSelectionColor(unit))
            end
        end

        if (unit == "target" or unit == "player" or unit == "focus") then
            OverrideUpdateLevel(self, unit, name)
        end
        
        UpdateColor(self.Name, unit, "SetTextColor")
    end
end

local function PostUpdateHealth(self, event, unit, bar, min, max)
    if (UnitIsDead(unit) or UnitIsGhost(unit) or not UnitIsConnected(unit)) then
        bar.value:SetText((UnitIsDead(unit) and "Dead") or (UnitIsGhost(unit) and "Ghost") or (not UnitIsConnected(unit) and "Offline"))
    elseif (unit == "targettarget") then
        bar.value:SetText((min/max * 100 < 100 and string.format("%d%%", min/max * 100)) or "")
    else
        bar.value:SetText(NumFormat(min).." / "..NumFormat(max))
    end
    
    if (UnitIsDead(unit) or (UnitIsGhost(unit)) or not UnitIsConnected(unit)) then
        self.Health:SetStatusBarColor(0.5, 0.5, 0.5)
    else
        self.Health:SetStatusBarColor(0, 1, 0)
    end
    
   self:UNIT_NAME_UPDATE(event, unit)
end

local function PostUpdatePower(self, event, unit, bar, min, max)
    if (UnitIsDead(unit) or (UnitIsGhost(unit)) or not UnitIsConnected(unit)) then
        bar:SetValue(0)
        bar.value:SetText("")
    elseif (min == 0) then
        bar.value:SetText("")
    elseif (not UnitHasMana(unit)) then
        bar.value:SetText(min)
    elseif (min == max) then 
        bar.value:SetText(min)
    else
        if (UnitHasMana(unit)) then
            if (unit == "player") then
                bar.value:SetText(min)
            else
                bar.value:SetText(min.." / "..max)
            end
        else
            bar.value:SetText(min)
        end
    end
end

local function PostCreateAuraIcon(self, button, icons)
	icons.showDebuffType = true
    
    button:SetWidth(20)
    button:SetHeight(20)
    
	button.cd:SetReverse()
    button.cd:ClearAllPoints()
    button.cd:SetPoint("TOPRIGHT", button, "TOPRIGHT", -1, -1)
    button.cd:SetPoint("BOTTOMLEFT", button, "BOTTOMLEFT", 1, 1)

    button.icon:SetTexCoord(0.04, 0.96, 0.04, 0.96)
     
	button.overlay:SetTexture(oUF_Neav.media.border)
	button.overlay:SetTexCoord(0, 1, 0, 1)
    button.overlay:ClearAllPoints()
    button.overlay:SetPoint("TOPRIGHT", button, "TOPRIGHT", 2.5, 2.5)
    button.overlay:SetPoint("BOTTOMLEFT", button, "BOTTOMLEFT", -2.5, -2.5)
    
	button.overlay.Hide = function(self) 
        self:SetVertexColor(0.65, 0.65, 0.65) 
    end
end

local function frameStyle(self, unit)
	self.menu = menu
	self:EnableMouse(true)    
    self:SetFrameStrata((unit == "targettarget") and "MEDIUM" or "LOW")
	self:RegisterForClicks("anyup")
    self:SetAttribute("*type2", "menu")
	self:SetScript("OnEnter", UnitFrame_OnEnter)
	self:SetScript("OnLeave", UnitFrame_OnLeave)
    
    self.PostCreateAuraIcon = PostCreateAuraIcon

    self:SetAttribute("initial-height", (unit == "player" or unit == "target" or unit == "focus") and 42 or 30)
    self:SetAttribute("initial-width", (unit == "player" or unit == "target" or unit == "focus") and 175 or 105)

        -- health
	self.Health = CreateFrame("StatusBar", nil, self)
	self.Health:SetHeight((self:GetHeight() * 0.81))
	self.Health:SetStatusBarTexture(oUF_Neav.media.statusbar, "BORDER")
    self.Health:SetHeight(12)
    self.Health:SetWidth(119)
    self.PostUpdateHealth = PostUpdateHealth

	self.Health.value = CreateFont(self.Health, "Fonts\\ARIALN.ttf", oUF_Neav.size.fontSmall * 1.1, nil, 1, -1)
	self.Health.value:SetPoint("CENTER", self.Health, 0, 1)

        -- power
    self.Power = CreateFrame("StatusBar", nil, self)
    self.Power:SetStatusBarTexture(oUF_Neav.media.statusbar, "BORDER")
    self.Power:SetPoint("TOPLEFT", self.Health, "BOTTOMLEFT", 0, -1)
    self.Power:SetPoint("TOPRIGHT", self.Health, "BOTTOMRIGHT", 0, -1)
    self.Power.colorPower = true 
	self.Power.colorHappiness = true  
    self.PostUpdatePower = PostUpdatePower

    self.Power.value = CreateFont(self.Power, "Fonts\\ARIALN.ttf", oUF_Neav.size.fontSmall * 1.1, nil, 1, -1)
    self.Power.value:SetPoint("CENTER", self.Power, 0, 1)

    if (unit == "targettarget") then
        self.Power.value:Hide()
    end
    
        -- background
    self.bg = self.Power:CreateTexture(nil, "BACKGROUND")
    self.bg:SetTexture(oUF_Neav.media.statusbar)
    self.bg:SetVertexColor(0, 0, 0, 0.35)
    self.bg:SetPoint("TOPRIGHT", self.Health, 0, (unit == "player") and 19 or 0)
    self.bg:SetPoint("BOTTOMLEFT", self.Power)
    
        -- name
    self.Name = CreateFont(self.Health, oUF_Neav.media.font, oUF_Neav.size.fontBig, nil, 1, -1)
    self.Name:SetJustifyH("CENTER")
    self.Name:SetHeight(10)
    self.Name:SetText("[name]")
    self:Tag(self.Name, "[name]")
    self.UNIT_NAME_UPDATE = OverrideUpdateName
    
        -- pvpicons
    self.PvP = self.Health:CreateTexture(self:GetName().."PVPIcon", "OVERLAY", self)
    self.PvP:SetHeight(64)

        -- portraits
    self.Portrait = self:CreateTexture(nil, "BACKGROUND")
    self.Portrait:SetWidth((unit == "player" or unit == "target" or unit == "focus") and 64 or 37)
    self.Portrait:SetHeight((self.Portrait:GetWidth()))
    
        -- masterlooter
    self.MasterLooter = self.Health:CreateTexture(nil, "OVERLAY")
    self.MasterLooter:SetHeight(16)
    self.MasterLooter:SetWidth(16)
    
        -- groupleader
    self.Leader = self.Health:CreateTexture(nil, "OVERLAY")
    self.Leader:SetHeight(16)
    self.Leader:SetWidth(16)
        
        -- raidicons
    self.RaidIcon = self.Health:CreateTexture(nil, "OVERLAY")
    self.RaidIcon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons", "OVERLAY")
    self.RaidIcon:SetHeight(20)
    self.RaidIcon:SetWidth(20)
    self.RaidIcon:SetPoint("CENTER", self.Portrait, "TOP", 0, -1)

        -- texture anchor
    self.f = CreateFrame("Frame", self:GetName().."TextureFrame", self)
    self.f:SetParent(self)
    
        -- texture
    self.Overlay = self.Health:CreateTexture(nil, "MEDIUM")
    self.Overlay:SetParent(self.f)
    
        -- glow texture
    if (unit == "pet" or unit == "player" or self:GetParent():GetName():match("Party")) then
        self.Glow = self.Health:CreateTexture(self:GetName().."Glow", "BACKGROUND")
        self.Glow:SetAlpha(0)
    end
    
        -- player ------------------------------------------------------
        
    if (unit == "player") then
        self.f:SetHeight(100)
        self.f:SetWidth(232)
        self.f:SetPoint("CENTER", self, -20, -7)
        
        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame")
        self.Overlay:SetTexCoord(1, 0.09375, 0, 0.78125)
        self.Overlay:SetAllPoints(self.f)
        
        if (oUF_Neav.show.pvpicons) then
            self.PvPTimer = self.Health:CreateFontString(self:GetName().."PVPTimer", "OVERLAY")
            self.PvPTimer:SetFont("Fonts\\ARIALN.ttf", oUF_Neav.size.fontSmall)
            self.PvPTimer:SetShadowOffset(1, -1)
            self.PvPTimer:SetPoint("CENTER", self.f, "TOPLEFT", 38, -15)
        end
        
        self.Glow:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Flash")
        self.Glow:SetTexCoord(0.9453125, 0, 0, 0.181640625)
        self.Glow:SetPoint("TOPLEFT", self.f, "TOPLEFT", 13, 0)
        self.Glow:SetHeight(93)
        self.Glow:SetWidth(242)
        
        self.Leader:SetPoint("TOPLEFT", self.f, 45, -10)
        self.MasterLooter:SetPoint("TOPLEFT", self.f, 85, -10)

        self.Level = CreateFont(self.Health, "Interface\\AddOns\\oUF_Neav\\media\\font.ttf", 17, "OUTLINE", 0, 0)
        self.Level:SetPoint("CENTER", self.f, -62, -15)
        self.Level:SetText("[level]")
        self:Tag(self.Level, "[level]")
        
        self.Name:SetPoint("CENTER", self.f, 50, 19)
        self.Portrait:SetPoint("TOPLEFT", self.f, 42, -12)
        self.PvP:SetPoint("TOPLEFT", self.f, 18, -20)
        self.Health:SetPoint("TOPLEFT", self.f, 106, -41)
        
        self:SetScale(oUF_Neav.unitframe.player.scale)
    end
        
        -- pet ------------------------------------------------------
            
    if (unit == "pet") then
        self.Debuffs = CreateFrame("Frame", nil, self)
        self.Debuffs:SetFrameStrata("BACKGROUND")
        self.Debuffs:SetHeight(20 * 3)
        self.Debuffs:SetWidth(20 * 3)
        self.Debuffs.size = oUF_Neav.unitframe.pet.auraSize
        self.Debuffs.spacing = 4
        self.Debuffs:SetPoint("TOPLEFT", self, "CENTER", -15, -19)
        self.Debuffs.initialAnchor = "TOPLEFT"
        self.Debuffs["growth-y"] = "DOWN"
        self.Debuffs["growth-x"] = "RIGHT"
        self.Debuffs.num = 6 
        
        self.f:SetHeight(53)
        self.f:SetWidth(128)
        self.f:SetPoint("CENTER", self, 1, -3)

        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-SmallTargetingFrame")
        self.Overlay:SetPoint("TOPLEFT", self.f, 0, -2)
        self.Overlay:SetHeight(64)
        self.Overlay:SetWidth(128)
        
        self.Name:SetPoint("BOTTOMLEFT", self.Health, "TOPLEFT", 0, 5)
        self.Name:SetJustifyH("LEFT")
        self.Name:SetWidth(100)
        self.Name:SetHeight(10)
        
        self.Health:SetHeight(8)
        self.Health:SetWidth(69)
        self.Health:SetPoint("TOPLEFT", self.f, 46, -22)

        self.Portrait:SetPoint("TOPLEFT", self.f, 7, -6)
        
        self.PvP:SetHeight(50)
        self.PvP:SetPoint("CENTER", self, "LEFT", 1, -8)
        
        self.Glow:SetTexture("Interface\\TargetingFrame\\UI-PartyFrame-Flash")
        self.Glow:SetTexCoord(0, 1, 1, 0)
        self.Glow:SetHeight(64)
        self.Glow:SetWidth(128)
        self.Glow:SetPoint("TOPLEFT", self.f, -4, 11)      

        self:SetScale(oUF_Neav.unitframe.pet.scale) 
    end
    
        -- target + focus ------------------------------------------------------

    if (unit == "target" or unit == "focus") then
        self.Auras = CreateFrame("Frame", nil, self)
		self.Auras.gap = true
        self.Auras.size = oUF_Neav.unitframe.target.auraSize
        self.Auras:SetHeight(self.Auras.size * 3)
        self.Auras:SetWidth(self.Auras.size * 6)
		self.Auras:SetPoint("TOPLEFT", self, "BOTTOMLEFT", -4, -5)
		self.Auras.initialAnchor = "TOPLEFT"
        self.Auras["growth-x"] = "RIGHT"
        self.Auras["growth-y"] = "DOWN"
		self.Auras.numBuffs = 40
		self.Auras.numDebuffs = 40
		self.Auras.spacing = 4
        
        self.f:SetHeight(100)
        self.f:SetWidth(232)
        self.f:SetPoint("CENTER", self, 20, -7)

        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame")
        self.Overlay:SetTexCoord(0.09375, 1, 0, 0.78125)
        self.Overlay:SetAllPoints(self.f)
        
        self.Background = self.Health:CreateTexture(self:GetName().."Background", "BACKGROUND")
        self.Background:SetTexture("Interface\\AddOns\\oUF_Neav\\media\\nameBackground")
        self.Background:SetTexCoord(0.2, 0.8, 0.3, 0.7)
        self.Background:SetHeight(18)
        self.Background:SetPoint("BOTTOMRIGHT", self.Health, "TOPRIGHT")
        self.Background:SetPoint("BOTTOMLEFT", self.Health, "TOPLEFT") 

        self.Leader:SetPoint("TOPRIGHT", self.f, -45, -10)
        
        self.MasterLooter:SetPoint("TOPRIGHT", self.f, -85, -10)

        self.Level = CreateFont(self.Health, "Interface\\AddOns\\oUF_Neav\\media\\font.ttf", 17, "OUTLINE", 0, 0)
        self.Level:SetPoint("CENTER", self.f, 63.5, -15)
        self.Level:SetText("[level]")
        self:Tag(self.Level, "[level]")

        self.CombatFeedbackText = CreateFont(self.Health, oUF_Neav.media.font, 18, "OUTLINE", 0, 0)
        self.CombatFeedbackText:SetPoint("CENTER", self.Portrait)
        
        self.Portrait:SetPoint("TOPRIGHT", self.f, -42, -12)
        self.PvP:SetPoint("TOPRIGHT", self.f, 3, -20)
        self.Health:SetPoint("TOPRIGHT", self.f, -106, -41)
        
        self.Name:SetPoint("CENTER", self.f, -52, 19)
        self.Name:SetWidth(110)
        
        self:SetScale(oUF_Neav.unitframe.target.scale)
        
        if (select(2, UnitClass("Player")) == "ROGUE" or select(2, UnitClass("Player")) == "DRUID") then
            self.CPoints = CreateFont(self.Health, DAMAGE_TEXT_FONT, 22, "OUTLINE", 0, 0)
            self.CPoints:SetPoint("RIGHT", self.Portraitbg, "LEFT", 8, 0)
            self.CPoints:SetTextColor(1, 1, 1) 
        end
    end
    
    if (unit == "focus") then
        self.t1 = self.Health:CreateTexture(nil, "BACKGROUND")
        self.t1:SetWidth(24)
        self.t1:SetHeight(16)
        self.t1:SetTexture("Interface\\CharacterFrame\\UI-CharacterFrame-GroupIndicator")
        self.t1:SetTexCoord(0.53125, 0.71875, 0, 1)
        self.t1:SetPoint("BOTTOMRIGHT", self, "TOP", 40, 0)
        self.t1:SetAlpha(0.7)
        
        self.t2 = self.Health:CreateTexture(nil, "BACKGROUND")
        self.t2:SetWidth(38)
        self.t2:SetHeight(16)
        self.t2:SetTexture("Interface\\CharacterFrame\\UI-CharacterFrame-GroupIndicator")
        self.t2:SetPoint("RIGHT", self.t1, "LEFT")
        self.t2:SetTexCoord(0.1875, 0.53125, 0, 1)
        self.t2:SetAlpha(0.7)
        
        self.t3 = self.Health:CreateTexture(nil, "BACKGROUND")
        self.t3:SetWidth(24)
        self.t3:SetHeight(16)
        self.t3:SetTexture("Interface\\CharacterFrame\\UI-CharacterFrame-GroupIndicator")
        self.t3:SetTexCoord(0, 0.1875, 0, 1)
        self.t3:SetPoint("RIGHT", self.t2, "LEFT")
        self.t3:SetAlpha(0.7)

        self.f1 = self.Health:CreateFontString(nil, "OVERLAY")
        self.f1:SetFont("Fonts\\ARIALN.ttf", oUF_Neav.size.fontSmall + 1)
        self.f1:SetShadowOffset(1, -1)
        self.f1:SetPoint("CENTER", self.t2, 0, -1)
        self.f1:SetText("Focus")
        self.f1:SetAlpha(0.7)
        
        self:SetMovable(true)
        self:RegisterForDrag("LeftButton")
        
        self:SetScript("OnDragStart", function(self)
            if (IsShiftKeyDown()) then
                self:ClearAllPoints() 
                self:StartMoving() 
            end
        end)

        self:SetScript("OnDragStop", function(self) 
            self:StopMovingOrSizing()
        end)
    end
    
        -- targetstarget ------------------------------------------------------
        
    if (unit == "targettarget") then
        self:SetAttribute("initial-height", 20)
		self:SetAttribute("initial-width", 85)
        
        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetofTargetFrame")
        self.Overlay:SetTexCoord(0.015625, 0.7265625, 0, 0.703125)
        self.Overlay:SetPoint("CENTER", self, 0, 0)
        self.Overlay:SetHeight(45)
        self.Overlay:SetWidth(93)
        
        self.Name:SetPoint("TOPLEFT", self, "CENTER", -3, -11)
        self.Name:SetJustifyH("LEFT")
        self.Name:SetWidth(100)
        
        self.Health:SetHeight(7)
        self.Health:SetWidth(47)
        self.Health:SetPoint("CENTER", self, 22, 4)

        self.Health.value:SetPoint("CENTER", self, "CENTER", 23, 1)

        self.Portrait:SetPoint("LEFT", self, "CENTER", -43, 0)
        
        self:SetScale(oUF_Neav.unitframe.targetstarget.scale)
    end

        -- party ------------------------------------------------------
            
    if (self:GetParent():GetName():match("Party")) then
        self.Debuffs = CreateFrame("Frame", nil, self)
        self.Debuffs:SetFrameStrata("BACKGROUND")
        self.Debuffs:SetHeight(20)
        self.Debuffs:SetWidth(20 * 3)
        self.Debuffs.size = oUF_Neav.unitframe.party.auraSize
        self.Debuffs.spacing = 4
        self.Debuffs:SetPoint("LEFT", self, "RIGHT", 7, 7)
        self.Debuffs.initialAnchor = "LEFT"
        self.Debuffs["growth-y"] = "DOWN"
        self.Debuffs["growth-x"] = "RIGHT"
        self.Debuffs.num = 3 
        
        self.f:SetHeight(53)
        self.f:SetWidth(128)
        self.f:SetPoint("CENTER", self, 1, 2)

        self.Overlay:SetTexture("Interface\\TargetingFrame\\UI-PartyFrame")
        self.Overlay:SetPoint("TOPLEFT", self.f, 0, -2)
        self.Overlay:SetHeight(64)
        self.Overlay:SetWidth(128)

        self.Leader:SetPoint("TOPLEFT", self.f, 2, 0)
        
        self.MasterLooter:SetPoint("TOPLEFT", self.f, 29, 0)

        self.Name:SetPoint("TOPLEFT", self.Power, "BOTTOMLEFT", -1, -5)
        self.Name:SetJustifyH("LEFT")
        self.Name:SetWidth(100)
        
        self.Health:SetPoint("TOPLEFT", self.f, 47, -12)
        self.Health:SetHeight(8)
        self.Health:SetWidth(70)
    
        self.Portrait:SetPoint("TOPLEFT", self.f, 7, -6)
        
        self.PvP:SetPoint("TOPLEFT", self.f, -9, -10)
        self.PvP:SetHeight(46)
        self.PvP:SetWidth(46)

        self.Glow:SetTexture("Interface\\TargetingFrame\\UI-PartyFrame-Flash")
        self.Glow:SetHeight(63)
        self.Glow:SetWidth(128)
        self.Glow:SetPoint("TOPLEFT", self.f, -3, 2)
        
        self:SetScale(oUF_Neav.unitframe.party.scale)
    end
        
    if (unit == "player" and oUF_Neav.unitframe.player.mouseoverText or unit == "pet" and oUF_Neav.unitframe.pet.mouseoverText or unit == "target" and oUF_Neav.unitframe.target.mouseoverText or unit == "focus" and oUF_Neav.unitframe.focus.mouseoverText or self:GetParent():GetName():match("Party") and oUF_Neav.unitframe.party.mouseoverText) then
        self.Health.value:Hide()
        self.Power.value:Hide()
        
        self:SetScript("OnEnter", function(self) 
            self.Health.value:Show() 
            self.Power.value:Show()
            UnitFrame_OnEnter(self) 
        end) 
        
        self:SetScript("OnLeave", function(self) 
            self.Health.value:Hide() 
            self.Power.value:Hide()
            UnitFrame_OnLeave(self) 
        end)
    end
    
    self.Power:SetHeight((self.Health:GetHeight() - 1))
    
    self.PvP:SetWidth((self.PvP:GetHeight()))
    
    if (not oUF_Neav.show.pvpicons) then
        self.PvP:Hide()
        self.PvP.Show = function() end
    end
    
    if (unit == "pet" or self:GetParent():GetName():match("Party")) then
		self.Range = true
		self.inRangeAlpha = 1
		self.outsideRangeAlpha = 0.6
    end
    
    self.disallowVehicleSwap = true

end

oUF:RegisterStyle("nUnits", frameStyle)
oUF:SetActiveStyle("nUnits")

local player = oUF:Spawn("player", "Player")
player:SetPoint(oUF_Neav.unitframe.player.position[1], oUF_Neav.unitframe.player.position[2], oUF_Neav.unitframe.player.position[3], oUF_Neav.unitframe.player.position[4], oUF_Neav.unitframe.player.position[5])

local pet = oUF:Spawn("pet", "PlayerPet")
pet:SetPoint(oUF_Neav.unitframe.pet.position[1], Player, oUF_Neav.unitframe.pet.position[3], oUF_Neav.unitframe.pet.position[4], oUF_Neav.unitframe.pet.position[5])

local target = oUF:Spawn("target", "Target")
target:SetPoint(oUF_Neav.unitframe.target.position[1], oUF_Neav.unitframe.target.position[2], oUF_Neav.unitframe.target.position[3], oUF_Neav.unitframe.target.position[4], oUF_Neav.unitframe.target.position[5])

local tot = oUF:Spawn("targettarget", "TargetsTarget")
tot:SetPoint(oUF_Neav.unitframe.targetstarget.position[1], Target, oUF_Neav.unitframe.targetstarget.position[3], oUF_Neav.unitframe.targetstarget.position[4], oUF_Neav.unitframe.targetstarget.position[5])

local focus = oUF:Spawn("focus", "Focus")
focus:SetPoint("LEFT", UIParent, 45, -50.35)

local party = oUF:Spawn("header", "Party")   
party:SetPoint(oUF_Neav.unitframe.party.position[1], oUF_Neav.unitframe.party.position[2], oUF_Neav.unitframe.party.position[3], oUF_Neav.unitframe.party.position[4], oUF_Neav.unitframe.party.position[5])
party:SetManyAttributes(
    "showParty", true, "yOffset", -30
)
if (oUF_Neav.show.party) then
    party:Show()
end

local event = CreateFrame("Frame", nil, Player)
    
local inLeft = event:CreateTexture(nil, "BACKGROUND")
inLeft:SetWidth(24)
inLeft:SetHeight(16)
inLeft:SetTexture("Interface\\CharacterFrame\\UI-CharacterFrame-GroupIndicator")
inLeft:SetTexCoord(0, 0.1875, 0, 1)
inLeft:SetPoint("BOTTOMLEFT", Player, "TOP", -40, 0)

local inCenter = event:CreateTexture(nil, "BACKGROUND")
inCenter:SetWidth(38)
inCenter:SetHeight(16)
inCenter:SetTexture("Interface\\CharacterFrame\\UI-CharacterFrame-GroupIndicator")
inCenter:SetPoint("LEFT", inLeft, "RIGHT")
inCenter:SetTexCoord(0.1875, 0.53125, 0, 1)

local inRight = event:CreateTexture(nil, "BACKGROUND")
inRight:SetWidth(24)
inRight:SetHeight(16)
inRight:SetTexture("Interface\\CharacterFrame\\UI-CharacterFrame-GroupIndicator")
inRight:SetTexCoord(0.53125, 0.71875, 0, 1)
inRight:SetPoint("LEFT", inCenter, "RIGHT")

local inText = event:CreateFontString(nil, "OVERLAY")
inText:SetFont("Fonts\\ARIALN.ttf", oUF_Neav.size.fontSmall + 1)
inText:SetShadowOffset(1, -1)
inText:SetPoint("CENTER", inCenter, 0, -1)
inText:SetAlpha(0.6)
    
event:SetScript("OnEvent", function(self)
    local name, rank, subgroup
    local numRaidMembers = GetNumRaidMembers()

    inCenter:SetAlpha(0)
    inLeft:SetAlpha(0)
    inRight:SetAlpha(0)
    inText:SetText("")

    if (numRaidMembers == 0) then
        inCenter:SetAlpha(0)
        inLeft:SetAlpha(0)
        inRight:SetAlpha(0)
        inText:SetText("")
        return
    end
    
    for i = 1, MAX_RAID_MEMBERS do
        if (i <= numRaidMembers) then
            name, rank, subgroup = GetRaidRosterInfo(i)
            if (name == UnitName("player")) then
                inText:SetText(GROUP.." "..subgroup)
                inCenter:SetWidth(inText:GetWidth())
                inCenter:SetAlpha(0.7)
                inLeft:SetAlpha(0.7)
                inRight:SetAlpha(0.7)
            end
        end
    end
    
    if (HIDE_PARTY_INTERFACE == "1") then
        party:Hide()
    end
end)

if (oUF_Neav.show.pvpicons) then
    event:SetScript("OnUpdate", function(self, elapsed)
        if (IsPVPTimerRunning()) then
            time = GetPVPTimer()
        else
            time = nil
        end

        if (time) then
            time = time - elapsed * 1000
            local timeLeft = time
            if (timeLeft < 0) then
                PlayerPVPTimer:SetText("")
            end
            PlayerPVPTimer:SetFormattedText(SecondsToTimeAbbrev(floor(timeLeft/1000)))
        else
            PlayerPVPTimer:SetText("")
        end
    end)
end

event:RegisterEvent("PLAYER_LOGIN")
event:RegisterEvent("CVAR_UPDATE")
event:RegisterEvent("RAID_ROSTER_UPDATE")
event:RegisterEvent("PARTY_LEADER_CHANGED")
event:RegisterEvent("PARTY_MEMBER_CHANGED")
 
02-21-09, 05:38 PM   #774
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
The blizzard UI provides:

• A very obvious indication of of whether a mob is elite
• Resting/Level/Boss/Combat/Leader/Master Looter indicators (easy to do, but i'm listing things I like)
• Obvious reaction colors (hostile, tapped, neutral, etc)
• Threat indication around the frame by color.
• Castbar on target that doesn't just disappear the instant the cast finishes, and displays interrupted, border pulses green when the cast finishes successfully and whatnot.
• Buffs/Debuffs that are larger if you put the buff/debuff on them, as well as the gold radar thing mentioned earlier
• Non-distracting, non-animated frames.
• Debuff indicators on ToT
• Multiple rows of Debuffs/Buffs, that change position based on hostility of the unit (IE, if they're friendly, buffs appear on top, and debuffs below, and if hostile, the other way around. This makes it easy to look for a buff/debuff quickly)
• Buffs/Debuffs don't get covered by ToT as in _Neav
• Nice CP display around the frame.
• Solid combat feedback on the portrait frame.

I agree, though. They are ugly, which is my #1 complaint. Other than that, I've found that they are extremely solid, despite missing a druid mana bar (which I use DruidBar for) and a default 'nice' display for HP/power (which I use a modified version of CT_UF for).



As such, I've been working on and off on writing frames that mimic all of the functionality, but are more aesthetically pleasing. I wouldn't say it's especially close to achieving that goal at the moment, though.


Last edited by Dimpf : 02-21-09 at 05:49 PM.
 
02-21-09, 05:57 PM   #775
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Dimpf View Post
The blizzard UI provides:
1 A very obvious indication of of whether a mob is elite
2 Resting/Level/Boss/Combat/Leader/Master Looter indicators (easy to do, but i'm listing things I like)
3 Obvious reaction colors (hostile, tapped, neutral, etc)
4 Threat indication around the frame by color.
5 Castbar on target that doesn't just disappear the instant the cast finishes, and displays interrupted, border pulses green when the cast finishes successfully and whatnot.
6 Buffs/Debuffs that are larger if you put the buff/debuff on them, as well as the gold radar thing mentioned earlier
7 Non-distracting, non-animated frames.
8 Debuff indicators on ToT
9 Multiple rows of Debuffs/Buffs, that change position based on hostility of the unit (IE, if they're friendly, buffs appear on top, and debuffs below, and if hostile, the other way around. This makes it easy to look for a buff/debuff quickly)
10 Buffs/Debuffs don't get covered by ToT as in _Neav
11 Nice CP display around the frame.
12Solid combat feedback on the portrait frame.
1 Can be done with oUF
2 Can be done with oUF
3 Can be done with oUF
4 Can be done with oUF
5 Something id like aswell, an offset on the hide with alpha or something
6 Can be done, but is a bit tricky
7 Clearly depends what you want to add in or not.
8 Can be done..
9 Not sure if that is possible or not with oUF
10 Thats an issue with that layout
11 Can be done with oUF, see Caellian's layout
12 Can be done with oUF Combat Feedback plug-in
 
02-21-09, 06:03 PM   #776
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
Right. To clarify, I have no problem with oUF. It's just combining everything into one layout, and doing it in a way that the end result is aesthetically pleasing that is the challenge.

Edit: I also posted that list partly hoping that addon authors would see it, and take the practical elements of a UF into account, and include a little more functionality along with their clever designs.

Last edited by Dimpf : 02-21-09 at 06:23 PM.
 
02-21-09, 07:00 PM   #777
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Quick question:

self.Health.bg.colorClass = true
self.Health.bg.colorClassNPC = true

That only works on the non-bg huh?
 
02-21-09, 07:04 PM   #778
Dimpf
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 25
Yep. I had the same question a few pages back. I think my solution was to color the background in an onUpdate health function, but ended up not using it because looked lame.
 
02-21-09, 07:09 PM   #779
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by MoonWitch View Post
Quick question:

self.Health.bg.colorClass = true
self.Health.bg.colorClassNPC = true

That only works on the non-bg huh?
The backgrounds color is inherited from the parent. If you use the default color* flags that is .
 
02-21-09, 07:51 PM   #780
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by haste View Post
The backgrounds color is inherited from the parent. If you use the default color* flags that is .
Unfortunately I don't.
I use a grey-ish front, wanted to make the background slightly classcolored. Which I can do in the onUpdate (I had it that way), but don't like the overload of code. I can live without it :P

I'm just trying to clean up my code, and avoid loooong if loops

And I take it this isn't just blergh, but plain wrong? (It works fine up to the :SetManyAttributes)
oUF:Spawn("player"):SetPoint("RIGHT", UIParent, "CENTER", -75, -165):SetManyAttributes('initial-width', width, 'initial-height', height)

Last edited by MoonWitch : 02-21-09 at 08:00 PM.
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off