Thread Tools Display Modes
04-09-09, 02:57 PM   #1
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
frame strata issue for fontstrings

I'm trying to set up a fontstring "strata" that overlays a texture (art) on my unitframes.

I create frames like normal, but with stratas for health and power to have more control of things overlapping each other.
...
self.Health:SetFrameStrata("LOW")
self.Health:SetFrameLevel(3)
...
self.Power:SetFrameStrata("LOW")
self.Power:SetFrameLevel(3)
...
the art code looks like this
Code:
		TargetBG:SetFrameStrata("LOW")
		TargetBG:SetFrameLevel(5)

I'm doing the text strings with tags, like that:
Code:
	local health = self.Health:CreateFontString(nil, 'OVERLAY')
	health:SetFontObject(GameFontNormal)
	health:SetPoint('RIGHT', -3, 10)
	self:Tag(health, '[smarthp]')
	health:SetFont(font, fontsize, "OUTLINE")	
	health:SetDrawLayer("OVERLAY")
I tried it with the red part, but it's still below the art.
Everything looks right, the backdrop is below the bars, the background of the bars is below the bars, too. the bars are below the art texture. ... but the freaking font string is below the art texture, too.

Any ideas ?
  Reply With Quote
04-09-09, 03:20 PM   #2
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Just to explain it some more. The reason why I use FrameStrata is the art.

I need to achieve those "layers":

1 - background texture art (backdrop so to say, but it's a texture)
2 - self.health/power.bg > background behind health/power bar
3 - health/power bar texture
4 - art
5 - oUF Tags (...fontstrings ... for hp/power value, name, etc.)
6 - glow for the art

I hope that explains it a bit better. I already have it working, except for #5 - the fontstrings/tags are below the art and not visible.

I use a different texture for basically any frame (player, target, ToT, ....).
  Reply With Quote
04-09-09, 05:13 PM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Originally Posted by Dawn View Post
Just to explain it some more. The reason why I use FrameStrata is the art.

I need to achieve those "layers":

1 - background texture art (backdrop so to say, but it's a texture)
2 - self.health/power.bg > background behind health/power bar
3 - health/power bar texture
4 - art
5 - oUF Tags (...fontstrings ... for hp/power value, name, etc.)
6 - glow for the art

I hope that explains it a bit better. I already have it working, except for #5 - the fontstrings/tags are below the art and not visible.

I use a different texture for basically any frame (player, target, ToT, ....).
The trick is always working with helper or anchorframes. Just create a helper frame with all the level needed and make the fontstring use this layer as parent. Problem solved.
Glowing Fog is special. You always need a frame above that since models will be always top of that layer. But FrameLevel can you solve most issues here.

You can have all Helper Frames on "BACKGROUND" except for frames that must be above the glow. Those must be on "LOW" strata or atleast one above the model. Sepereate those layers inbetween by using FrameLevel. I did this in rBottomBarStyler btw.

The FontDraw*** layer does nothing. Helper frames do all tha magic
__________________
| 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
04-09-09, 07:01 PM   #4
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Which, means I should parent oUF Tags to another frame that I can give a real framestrata. Mhm, ok. I'll try this. Thanks
  Reply With Quote
04-09-09, 08:56 PM   #5
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
It works, but it's still a "little" annoying *cough*

However i'm getting there, slowly ....



I have to re-parent every unit to the holder frame or make a holder frame for every unit. It doesn't look very "clean", but it works.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » frame strata issue for fontstrings


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