Thread Tools Display Modes
10-08-11, 05:05 PM   #1
zoktar
A Cliff Giant
AddOn Compiler - Click to view compilations
Join Date: Dec 2006
Posts: 72
TellMeWhen - Strata/Framelevel

As the title suggests, im having difficulty with strata and framelevels regarding tmw. Theres a place in group settings/position that lets you change Relative To, that currently says UIParent. Im thinking thats the strata right?. And on bottom theres a Frame Level selector from 1-100. So thats the sublevel right?.

It doesnt seem to recognize any other strata lines like BACKGROUND, LOW etc
  Reply With Quote
10-08-11, 06:52 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
No, the relative to line would be the anchor frame for positioning. (The x,y coordinates would be relative to that frame.) UIParent is the main frame of your entire UI that spans the whole screen.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-08-11, 08:12 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Frame strata is set by frame:SetFrameStrata() and if undefined defaults to MEDUIM. Framelevel by default is relative to how many parents the frame has. The higher this number, the later the frame is rendered, meaning it draws on top of all the lower frames in the same strata. For example, UIParent has no parent and gets a default framelevel of 1. PlayerFrame has UIParent as its parent, and gets a default frame level of 2, etc. Like frame strata, framelevel can be manually set as well by calling frame:SetFrameLevel(). It's advised to not have 2 frames of the same strata and framelevel overlap each other. The rendering engine is known to mesh elements of such frames together or simply randomly choose one to draw over the other.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 10-08-11 at 08:18 PM.
  Reply With Quote
10-08-11, 09:02 PM   #4
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 174
The rendering engine:

There are 7 stratas. Each strata is completely above the next strata. Frames need to belong to a strata, defaulting to MEDIUM.

Frames further have a frame level. Frame levels determine the rendering order of frames with respect to its parent frame.

Within each frame, there are several layers. Layers determine the rendering order of children textures and fontstrings.


Strata differences override frame levels. So frameA on MEDIUM parented to frameB on HIGH, will cause B to be drawn above A, regardless of framelevels. But visibility, alpha and scaling are controlled by frame parents, so whether A is visible depends entirely on B's visbility/alpha/scaling.

Anchoring of frames is on a totally different hierarchy from parent-child hierarchy. That is, frame positioning is independent of parent-child relationships.
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes
  Reply With Quote
10-09-11, 10:56 AM   #5
zoktar
A Cliff Giant
AddOn Compiler - Click to view compilations
Join Date: Dec 2006
Posts: 72
Now i feel bad for not learning lua. Thanks anyway.
  Reply With Quote
10-11-11, 03:47 AM   #6
zoktar
A Cliff Giant
AddOn Compiler - Click to view compilations
Join Date: Dec 2006
Posts: 72
alright had another look at this seems

/script TellMeWhen_Group44:SetFrameStrata("BACKGROUND")

works just fine, however when im trying to add it to an addon

TellMeWhen_Group44:SetFrameStrata("BACKGROUND")

and i get

1x Hideframes-v1.0\hideframes.lua:20: attempt to index global 'TellMeWhen_Group44' (a nil value)

and does not change the strata.
  Reply With Quote
10-11-11, 04:55 AM   #7
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
Your addon is probably being loaded and trying to call the 'TellMeWhen_Group44' before it exits.

You will need to add a check to see if Tell Me When is loaded, and probably register for the addon loaded event.
  Reply With Quote
10-11-11, 08:02 AM   #8
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by Ekaterina View Post
Your addon is probably being loaded and trying to call the 'TellMeWhen_Group44' before it exits.

You will need to add a check to see if Tell Me When is loaded, and probably register for the addon loaded event.
Or you could just do this in your AddOn's ToC file:

Code:
## OptionalDeps: TellMeWhen
This ensures that TellMeWhen will be loaded first, if it exists - if not, your AddOn will load normally.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
10-11-11, 10:41 AM   #9
zoktar
A Cliff Giant
AddOn Compiler - Click to view compilations
Join Date: Dec 2006
Posts: 72
Originally Posted by Torhal View Post
Or you could just do this in your AddOn's ToC file:

Code:
## OptionalDeps: TellMeWhen
This ensures that TellMeWhen will be loaded first, if it exists - if not, your AddOn will load normally.
added

## OptionalDeps: TellMeWhen

to the toc, still get index null and no strata change.
toc
-------
---------------------------------------------------------------
## Interface: 40200
## Title: RhozacTweak
## Notes: Various Tweaks
## Author: rhozac
## Version: v1.0
## OptionalDeps: TellMeWhen
## SavedVariables: RhozacTweak

RhozacTweak.lua
----------------------------------------------------------------
the lua
---------
TellMeWhen_Group44:SetFrameStrata("BACKGROUND")

--------------------------------------------------------------------
1x RhozacTweak-v1.0\RhozacTweak.lua:1: attempt to index global 'TellMeWhen_Group44' (a nil value)

nil

Locals:
---------------------------------------------------------------------
So what am i missing here?
edit: tried adding TellMeWhen_Options aswell, no change.
-----------------------------------------------------------------
edit2: im looking into this registering stuff atm. So my current guess is that blizz has frames registered globally somehow and are allowed to be config'ed anyware?. So i must register TellMeWhen_Group44 to be able to set the strata?. How far off am i ? =P

Last edited by zoktar : 10-11-11 at 12:11 PM.
  Reply With Quote
10-11-11, 04:01 PM   #10
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Ok, I looked at the code: TellMeWhen dynamically creates its group frames when they're needed. Your best bet is to hook "TMW:Group_Update()" (which is where the group frames are created) and check for the existence of that frame when it is called. However, are you absolutely sure you'll always need Group44? Since the creation is dynamic, the contents may be anything.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
10-11-11, 04:07 PM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If the frames are all named using the same pattern, and you want them all to be in the background, you could just loop through all possible frame names and check for existence:

Lua Code:
  1. for i = 1, 100 do
  2.      local f = _G["TellMeWhen_Group"..i]
  3.      if f then
  4.           f:SetFrameStrata("BACKGROUND")
  5.      end
  6. end
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » TellMeWhen - Strata/Framelevel

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