Thread Tools Display Modes
02-02-10, 12:55 PM   #1
Saiorse
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 16
Need help with overlapping

Hey guys, just started tinkering around with ouf this past weekend so please be gentle, aka treat me like an infant.

I've been working on editing ouf_alza to better suit my needs, and came across an impass. I was looking to lower the name/health text so that it show up on top of the frame, but it looks like the uf frame level is higher than the numbers/words, or something.

Here is a screenshot:

I'm just looking to have the words show up on top of the frames. Thanks to anyone who can offer suggestions.
  Reply With Quote
02-02-10, 02:47 PM   #2
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Investigate if one of the two has a higher or lower layer.
  Reply With Quote
02-02-10, 03:23 PM   #3
Saiorse
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 16
Thank you .

It had something to do with the parent frame; for anyone else who has this problem, I just entered the code

info:SetParent(self.Health)

at the top of the info configuration.

Now I just need to figure out this cast bar...

I'm trying to remove the spell name/cast timer from it, as I much prefer just a generic, plain cast bar. However, whenever I try to remove the code from the .lua file, it comes up with an error in game.
  Reply With Quote
02-02-10, 03:39 PM   #4
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Can you paste the code that you changed here?
  Reply With Quote
02-02-10, 03:49 PM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Be careful with setParent. You should never leave the "self" object. Otherwise your frames will not react correctly (example if self gets hidden/shown)

What I found out to be "best practice" is to work with helper frames. Just create yourself helper frames.

Code:
local helper1 = CreateFrame("Frame",nil,self)
helper1:SetFrameLevel(5)
You can then anchor anything to that helper frames.

If you need another layer above just create another helper frame with an even higher framelevel.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
02-02-10, 03:59 PM   #6
Saiorse
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 16
I changed from:

Code:
    --[[ Info text ]]
    local info = MakeFS(self)
    if(unit=="target") then
        info:SetPoint("TOPLEFT", ppp or hpp, "TOPRIGHT")
        info:SetJustifyH("RIGHT")
        info:SetPoint("RIGHT")
        self:Tag(info, "[difficulty][smartlevel]|r [name]")
    elseif(unit=="targettarget" or unit=="focus" or unit=="focustarget") then
        info:SetPoint("BOTTOM", self, "TOP", 0, 3)
        info:SetPoint("LEFT")
        info:SetPoint("RIGHT")
        self:Tag(info, "[name]")
    elseif(not unit) then
        info:SetParent(self.Health)
        info:SetPoint("RIGHT")
        info:SetPoint("LEFT")
        info:SetJustifyH("CENTER")
        self:Tag(info, "[name]")
    end
to

Code:
    --[[ Info text ]]
    local info = MakeFS(self)
    if(unit=="target") then
	info:SetParent(self.Health)
        info:SetPoint("BOTTOM", self, "CENTER",  0, 3)
        info:SetJustifyH("LEFT")
        info:SetPoint("LEFT")
        self:Tag(info, "[difficulty][smartlevel]|r [name]")
    elseif(unit=="targettarget" or unit=="focus" or unit=="focustarget") then
	info:SetParent(self.Health)
        info:SetPoint("BOTTOM", self, "CENTER",  0, 0)
        info:SetPoint("LEFT")
        info:SetPoint("LEFT")
        self:Tag(info, "[name]")
    elseif(not unit) then
        info:SetParent(self.Health)
        info:SetPoint("TOPRIGHT")
        info:SetPoint("TOPLEFT")
        info:SetJustifyH("CENTER")
        self:Tag(info, "[name]")
    end
So I didn't delete any lines, I just added one right under " if(unit=="target") then ".

Okay. Self = player unit frame? Sorry I'm so dreadfully noobish. And thanks so much for the code; definitely saving that one.
  Reply With Quote
02-02-10, 04:24 PM   #7
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Bigger elements like health, power, aura, castbar etc needs or atleast should be parented to self, while strings and such should be parented to those.

I'd suggest using self.Health as parent when you create the fontstring, awell using OVERLAY or ARTWORK as layer, like this:
Code:
local info = self.Health:CreateFontString(nil, 'OVERLAY')
  Reply With Quote
02-02-10, 04:52 PM   #8
Saiorse
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 16
Okay, awesome, thank you! I will be saving that code as well.

As for my cast bar question, here is the situation. It's kind of hard to explain without seeing it, so I've taken some pictures to help.

The only line I've edited in the code is to change the casting bar color. I changed it from

Code:
self.Castbar:SetStatusBarColor(r, g, b)
to

Code:
self.Castbar:SetStatusBarColor(0.67, 0.83, 0.45)
.

For the most part, it works in game. The only problems I have is when I am mid-cast, and target someone else who is mid-cast. Their cast bar will be green, but mine will turn white.

Here are pictures:

Casting without a target:

Casting while targeting someone else who is also casting:

After the initial cast, say if I am spamming a target while they are spamming something else, both bars revert to green. It's quite peculiar.

I hope I've made myself clear; please let me know if I didn't.
  Reply With Quote
02-03-10, 04:42 AM   #9
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Off-topic: Nice to see your finally digging into the oUF scene! :O

On-topic: I have no idea how to fix your problem >.> I just tinker and tinker
  Reply With Quote
02-10-10, 09:59 PM   #10
Taroven
A Cyclonian
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 49
Hopefully I'm not too late replying, haven't been lurking as often as usual.

I've had similar issues in the past, and rather than resort to forcing framelevels I just got into the habit of setting a different strata per major element. It's not always the most attractive option, but it does work and completely prevents bars from randomly going behind others.
Code:
self.Castbar:SetFrameStrata('HIGH')
Should be all you need to fix that.
__________________
Former author of EventHorizon Continued and Other Releases.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Need help with overlapping


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