Closed Thread
Thread Tools Display Modes
Unread 11-03-08, 01:42 PM   #201
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 268
Originally Posted by hipjipp View Post
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
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Unread 11-03-08, 01:48 PM   #202
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by Caellian View Post
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.
p3lim is offline  
Unread 11-04-08, 05:14 AM   #203
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
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.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline  
Unread 11-04-08, 06:04 AM   #204
hipjipp
A Cliff Giant
 
hipjipp's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 79
Originally Posted by zork View Post
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).
__________________
Being boring is fine too.
hipjipp is offline  
Unread 11-04-08, 06:56 AM   #205
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
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.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline  
Unread 11-04-08, 09:45 AM   #206
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by zork View Post
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
p3lim is offline  
Unread 11-05-08, 07:31 AM   #207
Kellen
A Deviate Faerie Dragon
Join Date: Mar 2008
Posts: 18
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)

Last edited by Kellen : 11-05-08 at 07:36 AM.
Kellen is offline  
Unread 11-05-08, 08:55 AM   #208
Blt
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 2
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.
Blt is offline  
Unread 11-05-08, 09:47 AM   #209
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by Kellen View Post
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 is offline  
Unread 11-05-08, 09:48 AM   #210
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by Blt View Post
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/
p3lim is offline  
Unread 11-05-08, 09:50 AM   #211
Kellen
A Deviate Faerie Dragon
Join Date: Mar 2008
Posts: 18
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)

Last edited by Kellen : 11-05-08 at 09:52 AM.
Kellen is offline  
Unread 11-05-08, 10:36 AM   #212
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by p3lim View Post
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.
haste is offline  
Unread 11-05-08, 11:11 AM   #213
Kellen
A Deviate Faerie Dragon
Join Date: Mar 2008
Posts: 18
Originally Posted by haste View Post
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.
Kellen is offline  
Unread 11-05-08, 12:29 PM   #214
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
Haste is there a documentation somewhere. Once I had a link to a small oUF API documentation but I cannot find it anymore.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline  
Unread 11-05-08, 12:35 PM   #215
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
The document your thinking of is also outdated. There are some docs inline in the files now however.
haste is offline  
Unread 11-05-08, 01:04 PM   #216
ObbleYeah
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 159
Originally Posted by haste View Post
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 is offline  
Unread 11-06-08, 01:58 PM   #217
ObbleYeah
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 159
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.
Attached Images
 

Last edited by ObbleYeah : 11-06-08 at 02:04 PM. Reason: attaching texture
ObbleYeah is offline  
Unread 11-06-08, 02:12 PM   #218
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by ObbleYeah View Post
Also, is there some way to set Strata on a FontString?
http://wowprogramming.com/docs/widge...n/SetDrawLayer
p3lim is offline  
Unread 11-07-08, 03:47 AM   #219
saulhudson
A Deviate Faerie Dragon
 
saulhudson's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 10
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.
saulhudson is offline  
Unread 11-07-08, 03:48 AM   #220
Errrwin
A Kobold Labourer
Join Date: Apr 2008
Posts: 1
Smile 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.
Errrwin is offline  
Closed Thread

Go BackWoWInterface » 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