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)

Caellian 11-03-08 01:42 PM

Quote:

Originally Posted by hipjipp (Post 107929)
Thanks! Working nicely now. Now i'm just going to add a border around it to make it look sleeker.. =)

Edit: I can't seem to get my self.Threat.bg to be created by self.Threat, it bums out.
Code:

Attempt to call method "CreateTexture" (a nil value)
Code:

self.Threat = self.Health:CreateTexture(nil,"BACKGROUND")
self.Threat:SetTexture(statusbar)
self.Threat:SetPoint("RIGHT", self, "LEFT", -2, 0)
self.Threat:SetHeight(20)
self.Threat:SetWidth(10)

self.Threat.bg = self.Threat:CreateTexture(nil, "BORDER")
self.Threat.bg:SetAllPoints(self.Threat)
self.Threat.bg:SetTexture(.25, .25, .25)


From my understanding you're trying to create a texture attached to another texture instead of a status bar, a .bg needs a statusbar to attach to, any higher instance correct me if i'm wrong :)

p3lim 11-03-08 01:48 PM

Quote:

Originally Posted by Caellian (Post 107943)
From my understanding you're trying to create a texture attached to another texture instead of a status bar, a .bg needs a statusbar to attach to, any higher instance correct me if i'm wrong :)

The frame object name has nothing to do with it.

The issue is, however, you cant make a texture a parent to something.

zork 11-04-08 05:14 AM

Is there already a way to implement smooth healthbar fading?

Means: If I loose 1000hp the hp will slowly drip to the new instead of showing it instantly. That would require a onUpdate functionality though.

hipjipp 11-04-08 06:04 AM

Quote:

Originally Posted by zork (Post 108007)
Is there already a way to implement smooth healthbar fading?

Means: If I loose 1000hp the hp will slowly drip to the new instead of showing it instantly. That would require a onUpdate functionality though.

Try oUF_Smooth, it does what you want (if i got it correctly ofc).

zork 11-04-08 06:56 AM

Thanks. Hopefully I can use it for my orbs too. Had problem with using round textures and vertical statusbars, so the the orbs contain a transparent statusbar and a Texture that has a SetTexCoord that is changed on every UpdateHealth.

p3lim 11-04-08 09:45 AM

Quote:

Originally Posted by zork (Post 108012)
Thanks. Hopefully I can use it for my orbs too. Had problem with using round textures and vertical statusbars, so the the orbs contain a transparent statusbar and a Texture that has a SetTexCoord that is changed on every UpdateHealth.

It only hooks the :SetValue() function, so there shouldnt be any issues

Kellen 11-05-08 07:31 AM

I noticed some odd behavior for targettarget/focustarget/partytarget frames. The health number value only seems to be updated when the frame is first shown/selected. The status bar updates, just not the number.

I'm using tags, so that could be a factor. Although, I've used the same tags in the normal player and target frames and they work and update fine.

Is there some limitation to the tag system here? Should I just wait for the new one on the horizon?

(Edit) The example I'm triggering with:
Code:

oUF.Tags['[percenthp]'] = function(u)
  local l, h = UnitHealth(u), UnitHealthMax(u)
  if UnitIsDeadOrGhost(u) then
    return oUF.Tags['[dead]'](u)
  else
    return string.format('%d%%', math.floor(l/h*100+0.5))
  end
end
oUF.TagEvents['[percenthp]'] = 'UNIT_HEALTH UNIT_MAXHEALTH'

...

self.Health.value = SetFontString(self.Health, 14, '')
self.Health.value:SetPoint('RIGHT', -5, 0)
self.Health.value:SetText('[percenthp]')
local health = self.Health.value
table.insert(self.TaggedStrings, health)


Blt 11-05-08 08:55 AM

Here is a slightly silly question:

How do you make the raid/party frames grow horizontally instead of vertically?

At first it looked like it would be as easy as switching
Code:

raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffSet', -2)
to something like

Code:

raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'xOffSet', 2)
However that doesn't seem to actually do anything at all.

p3lim 11-05-08 09:47 AM

Quote:

Originally Posted by Kellen (Post 108140)
I noticed some odd behavior for targettarget/focustarget/partytarget frames. The health number value only seems to be updated when the frame is first shown/selected. The status bar updates, just not the number.

I'm using tags, so that could be a factor. Although, I've used the same tags in the normal player and target frames and they work and update fine.

Is there some limitation to the tag system here? Should I just wait for the new one on the horizon?

(Edit) The example I'm triggering with:
Code:

oUF.Tags['[percenthp]'] = function(u)
  local l, h = UnitHealth(u), UnitHealthMax(u)
  if UnitIsDeadOrGhost(u) then
    return oUF.Tags['[dead]'](u)
  else
    return string.format('%d%%', math.floor(l/h*100+0.5))
  end
end
oUF.TagEvents['[percenthp]'] = 'UNIT_HEALTH UNIT_MAXHEALTH'

...

self.Health.value = SetFontString(self.Health, 14, '')
self.Health.value:SetPoint('RIGHT', -5, 0)
self.Health.value:SetText('[percenthp]')
local health = self.Health.value
table.insert(self.TaggedStrings, health)


Tags are currently bugged with ToT and some other frames

p3lim 11-05-08 09:48 AM

Quote:

Originally Posted by Blt (Post 108148)
Here is a slightly silly question:

How do you make the raid/party frames grow horizontally instead of vertically?

At first it looked like it would be as easy as switching
Code:

raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffSet', -2)
to something like

Code:

raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'xOffSet', 2)
However that doesn't seem to actually do anything at all.

There are some attributes that does that, but I cant remember any of them right now. Take a look over at the SecureHeaders.lua file at http://wowcompares.com/

Kellen 11-05-08 09:50 AM

You need to set the 'point' (anchor point) attribute:

Code:

raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'xOffSet', 5, 'point', 'LEFT')
(Note I changed the offset too)

haste 11-05-08 10:36 AM

Quote:

Originally Posted by p3lim (Post 108152)
Tags are currently bugged with ToT and some other frames

They are far from bugged. They don't have any code to handle eventless units because the currently stable tag system has too much overhead for polling. It's very much intended.

Kellen 11-05-08 11:11 AM

Quote:

Originally Posted by haste (Post 108160)
They are far from bugged. They don't have any code to handle eventless units because the currently stable tag system has too much overhead for polling. It's very much intended.

Noted. I see that the tag system has been rewritten, so I'll wait for that to become stable before making substantial changes.

zork 11-05-08 12:29 PM

Haste is there a documentation somewhere. Once I had a link to a small oUF API documentation but I cannot find it anymore.

haste 11-05-08 12:35 PM

The document your thinking of is also outdated. There are some docs inline in the files now however.

ObbleYeah 11-05-08 01:04 PM

Quote:

Originally Posted by haste (Post 108175)
The document your thinking of is also outdated. There are some docs inline in the files now however.

Cool, i hadn't known about this before :-)

ObbleYeah 11-06-08 01:58 PM

1 Attachment(s)
Getting a strange texture problem with my portraits, i'm trying to put my overlay on top of the 2D portrait, but the overlay texture won't appear at all. Yes, the texture is the right size to be loaded by Wow, and yes, i've tried multiple attempts to get it working, including reverting back to my original portrait code which definitely did work.
Here's the code i'm using at the mo.

Code:

        if(unit=='player' or unit=='target') then
    self.Portraitbg = CreateFrame("Frame",nil,self)
          if unit=='player' then
      self.Portraitbg:SetPoint('CENTER', UIParent, 'CENTER', -322, -54)
          else
          self.Portraitbg:SetPoint('CENTER', UIParent, 'CENTER', -322, 36)
          end
      self.Portraitbg:SetWidth(30)
      self.Portraitbg:SetHeight(30) 
      self.Portrait = self.Portraitbg:CreateTexture(nil, "BACKGROUND")
      self.Portrait:SetPoint("TOPLEFT",self.Portraitbg,"TOPLEFT",0,-0)
      self.Portrait:SetPoint("BOTTOMRIGHT",self.Portraitbg,"BOTTOMRIGHT",-0,0)
      self.Portraitglossf = CreateFrame("Frame",nil,self.Portraitbg)
      self.Portraitglossf:SetAllPoints(self.Portraitbg)
      self.Portraitglosst = self.Portraitglossf:CreateTexture(nil, "BACKGROUND")
          if unit=='player' then
      self.Portraitglosst:SetPoint('CENTER', UIParent, 'CENTER', -340, -58)
          else
          self.Portraitglosst:SetPoint('CENTER', UIParent, 'CENTER', -340,  32)
          end
      self.Portraitglosst:SetTexture[=[Interface\AddOns\oUF_obble\textures\portoverlay.tga]=]
          self.Portraitglosst:SetHeight(70)
          self.Portraitglosst:SetWidth(70)
      self.Portraitglosst:SetVertexColor(90/255,208/255,243/255)

And i'l attach the texture, just in case i have got the wrong size and gimps messing about with me :(




Also, is there some way to set Strata on a FontString?
thanks.

p3lim 11-06-08 02:12 PM

Quote:

Originally Posted by ObbleYeah (Post 108305)
Also, is there some way to set Strata on a FontString?

http://wowprogramming.com/docs/widge...n/SetDrawLayer

saulhudson 11-07-08 03:47 AM

Health text Colour
 
Hi guys

How can I colour the health text value by there health status.

So for say 2890 hp or 30% make the text red. Not the bar colour but the text itself.

I currently basically do this atm.

bar.value:SetText("|cff33EE44"..numberize(cur) .."|r.".. d.."%")

Which is Lyns code giving something like this 5000.50%.

Any help greatlt appreciated.

Errrwin 11-07-08 03:48 AM

Missing HP instead of current HP
 
Hello boys and girls. :)

I started using Lyn's UI for oUF and even though it is brilliant (bot Lyn's creation and oUF), I still would like one small change. As a healer I am interested in my target's missing HP instead of his current HP. What is the code for missing HP? I think (hope :P) I can change it in the LUA, but I just have no clue where to look for.

Any pointers would be greatly appreciated. :)


All times are GMT -6. The time now is 04:31 AM.

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