WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   oUF - Layout discussion (https://www.wowinterface.com/forums/showthread.php?t=18363)

phrequency 05-10-09 11:45 AM

Quote:

Originally Posted by neolith (Post 134991)
I'm not sure I fully understand your problem, but this
Code:

self.Info:SetPoint("LEFT", self.Health)
anchors self.Info to self.Health. Change it to whatever you want to stick it to.

Okay- thanks. Problem solved.
I now need to be able to turn off buffs/debuffs for target, pet and target of target for oUF_coree

neolith 05-10-09 11:51 AM

Quote:

Originally Posted by phrequency (Post 135007)
Okay- thanks. Problem solved.
I now need to be able to turn off buffs/debuffs for target, pet and target of target for oUF_coree

Line 463:
Code:

if (unit == "target" or unit == "pet" or unit == "targettarget" or self:GetParent():GetName():match'oUF_Party') then
If you change that to
Code:

if (self:GetParent():GetName():match'oUF_Party') then
the auras should be removed for those frames. You should also remove lines 471-508 as the code there would be obsolete.

Icerat 05-14-09 06:07 AM

Hi

I've been playing around with ouf_coree for sometime now since v3.0 and have learnt allot,

With v3.12 Ive managed to get the name and level on the player/pet frames and change the textures used aswell along with the fonts, I've also reconfigure the the raid layout and got my party to show there targets (party targets).

With my limited knowledge I'm kinda stuck with one thing that's annoying my.

How do i get the pet frame to update its name when i use a vehicle? Like when i do the daily in the middle of the Dragonblight where you have to mount a dragon and shoot down the other dragons.

All the name shows is ?? when i use any vehicle and Not the Level and Name

Any help given appreciated and thanks for making learning fun again

Icerat

Copy of my current mess
http://www.mediafire.com/download.php?mzeydzmwkmi

Druidicbeast 05-14-09 08:25 AM

Quote:

Originally Posted by Icerat (Post 135895)

For the future whenever posting code you should either do so with code tags or use http://www.pastey.net/. :cool:

duhwhat 05-14-09 08:42 AM

Quote:

Originally Posted by p3lim (Post 131534)
You should never need to change the files in oUF

Thanks for your help pelim. This was working well, although the target frame filtered both debuffs AND buffs. Is there a way to white/blacklist only the debuffs?

Also, does anyone know where to look for a comprehensive list of "special" debuffs? I would prefer a whitelist method for debuff filtering, rather than blacklisting almost everything under the sun, but I would like to not miss any of these debuffs. For example, Pyrite, Engulf in Flames, etc.

p3lim 05-14-09 10:59 AM

Quote:

Originally Posted by duhwhat (Post 135901)
Thanks for your help pelim. This was working well, although the target frame filtered both debuffs AND buffs. Is there a way to white/blacklist only the debuffs?

Also, does anyone know where to look for a comprehensive list of "special" debuffs? I would prefer a whitelist method for debuff filtering, rather than blacklisting almost everything under the sun, but I would like to not miss any of these debuffs. For example, Pyrite, Engulf in Flames, etc.

To filter buffs:
Code:

local function customFilter(icons, unit, icon, name)
  if(whitelist[name] and not icon.debuff) then return true end
end

To filter debuffs:
Code:

local function customFilter(icons, unit, icon, name)
  if(whitelist[name] and icon.debuff) then return true end
end


Icerat 05-14-09 11:01 AM

OK thanks for the info, new link http://www.pastey.net/114209
excuse all the nub comments on the code hehe, its helps me learn.

So anyone got any ideas?
Harpz


Quote:

Originally Posted by Druidicbeast (Post 135898)
For the future whenever posting code you should either do so with code tags or use http://www.pastey.net/. :cool:

Quote:

Originally Posted by Icerat (Post 135895)
Hi

I've been playing around with ouf_coree for sometime now since v3.0 and have learnt allot,

With v3.12 Ive managed to get the name and level on the player/pet frames and change the textures used aswell along with the fonts, I've also reconfigure the the raid layout and got my party to show there targets (party targets).

With my limited knowledge I'm kinda stuck with one thing that's annoying my.

How do i get the pet frame to update its name when i use a vehicle? Like when i do the daily in the middle of the Dragonblight where you have to mount a dragon and shoot down the other dragons.

All the name shows is ?? when i use any vehicle and Not the Level and Name

Any help given appreciated and thanks for making learning fun again

Icerat

Copy of my current mess
http://www.mediafire.com/download.php?mzeydzmwkmi


duhwhat 05-15-09 10:58 AM

I'm seeing a bug with this pet frame code:

Code:

        if unit=="pet" then
                self:SetWidth(120)
                self:SetHeight(18)
                self.Health:SetHeight(14.5)
                self.Name:Hide()
                self.Health.value:SetPoint("RIGHT", 0, 9)
                    self.Power:SetHeight(2)
                self.Power.value:Show()
                self.Power.value:SetPoint("LEFT", self.Health, 0, 9)
                self.Power.value:SetJustifyH"LEFT"
                self.Level:Hide()
                self.Level:Hide()
                self.Health.value:Hide()
                self.Level:Hide()
                self.Name:Hide()
                self.disallowVehicleSwap = true
               
                if playerClass=="HUNTER" then
                        self.Health.colorReaction = false
                        self.Health.colorClass = false
                        self.Health.colorHappiness = true 
                end
               
                --
                -- oUF_BarFader
                --
                self.BarFade = true
                self.BarFadeAlpha = 0.2
        end

When mounting a vehicle for the first time after login, the pet frame turns black. Exiting and remounting causes the color to return to normal. Any idea what's causing this?

v6o 05-22-09 12:49 AM

Not really sure why. Did you set self.disallowVehicleSwap on the player as well?

Monolit 05-22-09 02:31 AM

Hello there, I finally managed to change freebgrid layout to fit my needs and i'm quite happy with a result


Though there is still one thing I would like to add. Nowadays when it comes down to raiding we need only first 5 groups to be shown, but there are few occasions when you want to see whole 40 people raid (e.g. Wintergrasp, Alterac Valley, etc.). So my idea was to make a function that is spawning groups 6-8 and make a slash command for it.

For example: /raid40 would spawn 8 groups raid and /raid25 - 5 groups raid.

I tried to implement this feature myself, but did not succeed, so for now I just made a simple config option for enabling raid40 layout via editing lua file.

Code:

local raid = {}
for i = 1, 5 do
    local raidg = oUF:Spawn('header', 'oUF_Raid'..i)
    raidg:SetManyAttributes('groupFilter', tostring(i),
                'showRaid', true,
                'point', 'LEFT',
                'xOffset', 5)
    table.insert(raid, raidg)
    if(i == 1) then   
        raidg:SetPoint('TOPLEFT', UIParent, 'CENTER', -105, -356)
    else
        raidg:SetPoint('TOPLEFT', raid[i-1], 'BOTTOMLEFT', 0, -4)
    end
end

----------------------------------------- specific spawning place for groups 6,7,8
if(raid40==true) then -- for config section
for i = 6, 8 do
    local raidg = oUF:Spawn('header', 'oUF_Raid'..i)
    raidg:SetManyAttributes('groupFilter', tostring(i),
                'showRaid', true,
                'yOffset', -4)
    table.insert(raid, raidg)
    if(i == 6) then   
        raidg:SetPoint('TOPLEFT', UIParent, 'CENTER', 120.5, -356)
    else
        raidg:SetPoint('TOPLEFT', raid[i-1], 'TOPRIGHT', 4, 0)
    end
end
end

So any help with implementing this feature would be appreciated.

jadakren 05-24-09 03:04 PM

I'm copying the method used by oUF_Grid where the display of certain raid groups is toggled via the function that determines wether or not to show party or raid frames.

Code:

function addon:SubGroups()
        local t = {}
        for i = 1, 8 do t[i] = 0 end
        for i = 1, GetNumRaidMembers() do
                        local s = select(3, GetRaidRosterInfo(i))
                        t[s] = t[s] + 1
        end
        return t
end
function addon:toggleGroupLayout()
        local zoneName = GetRealZoneText()
        local db = self.db.profile.frames
        if(InCombatLockdown()) then

                self:RegisterEvent("PLAYER_REGEN_ENABLED")

        else
                local groups = self.units.raid.group

                self:UnregisterEvent("PLAYER_REGEN_ENABLED")

                self:updateRaidFrame()
                self:updatePartyFrame()
        end
end
function addon:updatePartyFrame()
        if( GetNumPartyMembers() > 0 )then --there is party members to show
                if(GetNumRaidMembers() > 0)then
                        if not self.db.profile.frames.party.group.showInRaid then
                                self.units.party:Hide()
                        else
                                self.units.party:Show()
                        end
                else
                        self:Debug("Showing party frames")
                        for index,frame in pairs(self.units.raid.group)do frame:Hide() end
                        self.units.party:Show()
                end
        else
                self.units.party:Hide()
        end

end
function addon:updateRaidFrame(padding,margin)
        local padding = padding or 5
        local margin = margin or 10
       
        local raidFrame = self.units.raid
        if(GetNumRaidMembers() > 0) then
                self:Debug("Showing raid frames")                       
                for index,frame in pairs(raidFrame.group)do frame:Show() end
                raidFrame:Show()
        else
                self:Debug("Hiding raid frames")
                for index,frame in pairs(raidFrame.group)do frame:Hide() end
                raidFrame:Hide()
                return
        end

        local db = self.db.profile.frames.raid
       
        raidFrame:SetPoint(
                db.anchorFromPoint,
                UIParent,
                db.anchorToPoint,
                db.anchorX,
                db.anchorY)
               
        local roster = self:SubGroups()
        local largestGroup=1
        local largestNumberOfPartyMembers = 1
        local lastGroupWithPeople = false
        local firstGroupWithPeople = false
        local bottomPoint, topPoint = {},{}
        local numberOfGroupsWithPeople = 0
        local group
       
        for groupNumber,Population in ipairs(roster) do
                -- determine the first and last group. for height
                group = self.units.raid.group[self.groupMap[groupNumber]]
                if(group~=nil)then
                        if Population > 0 then
                                numberOfGroupsWithPeople = numberOfGroupsWithPeople + 1
                                if not firstGroupWithPeople then
                                        firstGroupWithPeople = groupNumber
                                end
                                lastGroupWithPeople = groupNumber
                                if Population >= largestNumberOfPartyMembers then
                                        self:Debug("Found larger group : ".. groupNumber .." :".. Population)
                                        --determine the group with the largest amount of players for width
                                                largestGroup = groupNumber
                                                largestNumberOfPartyMembers = Population
                                end
                        end                       
                end                       
        end
       
        self:Debug("group with greatest population : "..largestGroup)
        self:Debug("first group with people : "..firstGroupWithPeople)
        self:Debug("last group with people : "..lastGroupWithPeople)
        self:Debug("number of groups with people : "..numberOfGroupsWithPeople)
       
        local top = db.unit.height * lastGroupWithPeople
        local bottom = 0
        local left = 0
        local right = 0

        local height = 0
        for i=1,lastGroupWithPeople do
                height = height + (db.unit.height + db.group[self.groupMap[i]].anchorY)
        end
        height = height + db.group.One.anchorY
       
        raidFrame:SetHeight(height)
        raidFrame:SetWidth((db.unit.width + db.unit.xOffSet) * largestNumberOfPartyMembers + db.unit.xOffSet)
        raidFrame:Show()
       
end

function addon:PLAYER_REGEN_ENABLED()
        self:Debug("PLAYER_REGEN_ENABLED")
        self:toggleGroupLayout()
end
function addon:ZONE_CHANGED()
        self:Debug("ZONE_CHANGED")
        self:toggleGroupLayout()
end
function addon:PLAYER_LOGIN()
        self:Debug("PLAYER_LOGIN")
        self:toggleGroupLayout()
end
function addon:RAID_ROSTER_UPDATE()
        self:Debug("RAID_ROSTER_UPDATE")
        self:toggleGroupLayout()
end

function  addon:PARTY_MEMBERS_CHANGED()
        self:Debug("PARTY_MEMBERS_CHANGED")
        self:toggleGroupLayout()
end

function  addon:PARTY_LEADER_CHANGED()
        self:Debug("PARTY_LEADER_CHANGED")
        self:toggleGroupLayout()
end

This is only a small portion of it to show you how the showing of groups is handled.

Since i'm also making use of ace3Db and ace3Config here slash commands are based on the setup in oUF_Smee2_Groups_Config/config.lua.

So for example : /oufsmee2groups raid unlock

The whole project can be found here : http://github.com/airtonix/oufsmee2groups/tree/master

Waverian 05-26-09 11:32 PM

Does oUF have an internal method for sorting auras? I've only got a limited number of debuffs shown so having my debuffs shown first is important. I haven't got any code in my layout that should affect aura sorting, but it seems to work fine most of the time.

The problem is it sometimes doesn't work at all. I can't find the exact trigger but I think it fails whenever there are 3 rogues (I'm a rogue) in a raid, and results in my debuffs not being shown first.

Like I said I shouldn't have anything affecting this, but just in case: http://wowuidev.pastey.net/114954 Most of the potentially-relevant aura stuff is highlighted.

Is there a way to make sorting more consistent & reliable in my layout?

haste 05-27-09 11:18 AM

There is no internal way to sort auras in oUF. I could however give you a hook before :SetAuraPosition() is used, so you could run table.sort() on the set of icons and sort it yourself before they are positioned.

Waverian 05-27-09 02:10 PM

That would be nice. :)

Krag72 05-27-09 06:44 PM

I'm pretty sure one of the patches implemented a change so you always get your own debuffs first when checking. I went hunting in the patch notes but couldn't find anything spelled out there or in the UI & Macros forum.

Unless I'm totally mistaken and somehow dreamed that change, you may want to post it on the official UI forum as a question or bug if you can narrow down a scenario where you don't get your own debuffs returned first.

Waverian 05-27-09 09:46 PM

Quote:

Originally Posted by Krag72 (Post 138950)
I'm pretty sure one of the patches implemented a change so you always get your own debuffs first when checking. I went hunting in the patch notes but couldn't find anything spelled out there or in the UI & Macros forum.

Unless I'm totally mistaken and somehow dreamed that change, you may want to post it on the official UI forum as a question or bug if you can narrow down a scenario where you don't get your own debuffs returned first.

I've never experienced this default unit frames so I've managed to narrow the problem down to oUF or my personal layout. Unless there's somebody on the UI & Macro forum who knows more about oUF than haste, then this place is probably more appropriate. :p

haste 05-28-09 12:31 AM

Post a feature request so I don't forget it. I won't be home for the next couple of days, nor will I have access to any technology that can poke the Internet :).

Also, oUF just displays the buffs/debuff in the order they were returned by the API. These are sortable, so implementing a custom sorting function just requires a proper hook before the default SetAuraPosition() function. Unless you want to re-implement that one instead that is.

v6o 05-28-09 01:40 AM

Yeah after some patch and it's pretty long time ago now player debuffs are always listed first.
I don't have any "HARMFUL" filter or anything set so I don't know if adding a filter changes the order though.

After 3.1 where vehicle starting working properly, your vehicle debuffs are also always first.

p3lim 05-28-09 08:51 AM

By API player's buffs or debuffs on any target is first, thats default.

What I did to my layou was to greyscale every debuff on my target except mine, that way I could track them easier, seemed to work well :)

I never liked the whole "make player debuffs 10x larger" concept.

Waverian 05-28-09 05:16 PM

Quote:

Originally Posted by p3lim (Post 139086)
By API player's buffs or debuffs on any target is first, thats default.

What I did to my layou was to greyscale every debuff on my target except mine, that way I could track them easier, seemed to work well :)

I never liked the whole "make player debuffs 10x larger" concept.

I stole the greyscale non-self debuffs from you a while ago. :p Rather like it, but for some reason in some situations my debuffs aren't being shown first. I've only got 8 debuffs shown at any given time which more often than not means mine isn't shown at all.

I can't troubleshoot to find out where the problem is much since the only time it happens is during raids. :/


All times are GMT -6. The time now is 08:28 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI