Closed Thread
Thread Tools Display Modes
Unread 10-01-08, 08:57 AM   #1
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
oUF - Layout discussion

The old oUF thread over at WoWace has become, quite a monster to say it softly. It's a mess of bug reports, layout issues and general issues/feature people have/want.

Please use this thread for layout discussion only.

Related forum thread: oUF - General discussion
Bug reports and feature requests should be posted over at the author portal. Issues with specific layouts should be posted in their respective place (not here, unless you are the author of the layout in question (and don't you dare to bend this exception! :p)).

Last edited by haste : 10-01-08 at 09:02 AM.
haste is offline  
Unread 10-01-08, 10:27 AM   #2
MoonWitch
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 342
Haste, is there actually a way to overwrite/override the pvp functions, because I prefer a textual tag, but would like to do that by not editting the oUF core?
MoonWitch is offline  
Unread 10-01-08, 10:54 AM   #3
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
There isn't any internal functions for that on PvP, mostly because it's a shared event, and the shared event system is still to be written.

You can however do: self.UNIT_FACTION = myOwnUpdatePvPFunction;. Setting functions directly on the layout doesn't touch the core at all.
haste is offline  
Unread 10-01-08, 11:41 AM   #4
MoonWitch
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 342
Originally Posted by haste View Post
There isn't any internal functions for that on PvP, mostly because it's a shared event, and the shared event system is still to be written.

You can however do: self.UNIT_FACTION = myOwnUpdatePvPFunction;. Setting functions directly on the layout doesn't touch the core at all.
Thanks I'll do that. I still get freaked out when I see the pvp icon, so I figured it'd be better for my heart to use text. :P
MoonWitch is offline  
Unread 10-02-08, 02:52 AM   #5
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
Is it possible to change the level of a text (fontstring) the same way it works for frames (SetFrameLevel).
I'm toying with portraits and would like to display something over it, but right now the portrait comes above of the text.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Unread 10-02-08, 04:06 AM   #6
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,343
Maybe I can help you out here. You could just use a helperframe that lays between portrait and text.

Code:
    
    --I don't know the Portrait call but it should be similar
    self.pm1 = CreateFrame("PlayerModel", nil, self)
    self.pm1:SetFrameStrata("BACKGROUND")
    self.pm1:SetAllPoints(self)
    self.pm1:SetUnit(unit)
    --self.pm1:SetModelScale(1)
    self.pm1:SetCamera(0)    
    --self.pm1:SetRotation(0)    
    
    self.pm1helper = CreateFrame("FRAME", nil, self.pm1)
    self.pm1helper:SetFrameStrata("LOW")
    self.pm1helper:SetAllPoints(self.pm1)
    
    self.pm1helper.Text = SetFontString(self.pm1helper, nil, 13, "THINOUTLINE")
    self.pm1helper.Text:SetPoint('CENTER', 0, 0)
__________________
| 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)

Last edited by zork : 10-02-08 at 04:25 AM.
zork is online now  
Unread 10-02-08, 05:33 AM   #7
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
Ahhh, clever, gonna give it a try right now

Actually it's not really helping much in my case, here's what i'm trying to do.



Unfortunately i already had to lower the portrait's alpha to 0.25 to be able to read the value and see the healthbar progression.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 10-02-08 at 07:28 AM.
Caellian is offline  
Unread 10-02-08, 08:47 AM   #8
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,343
Originally Posted by Caellian View Post
Ahhh, clever, gonna give it a try right now
Unfortunately i already had to lower the portrait's alpha to 0.25 to be able to read the value and see the healthbar progression.
Please post the code of your fontstring, helper and the portrait.
__________________
| 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 online now  
Unread 10-02-08, 08:54 AM   #9
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
Originally Posted by zork View Post
Please post the code of your fontstring, helper and the portrait.
In the example above i didn't use any helper, here it is though

Code:
	self.Health.value = SetFontString(self.Health, font,(unit == 'player' or unit == 'target') and 10 or 9)
Code:
			self.Portrait = CreateFrame('PlayerModel', nil, self)
			self.Portrait.type = '3D'
			self.Portrait:SetAlpha(.25)
			self.Portrait:SetPoint('TOPLEFT', self.Health, 'TOPLEFT', 0, -.5)
			self.Portrait:SetPoint('BOTTOMRIGHT', self.Health, 'BOTTOMRIGHT', .5, -.5)
In this case, it looks ok but isn't really useable, if i increase the alpha, the value and also the health bar progression are impossible to see.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 10-02-08 at 08:56 AM.
Caellian is offline  
Unread 10-02-08, 09:09 AM   #10
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
At what layer is your font-strings created? OVERLAY should position your text above the model just fine.
haste is offline  
Unread 10-02-08, 09:11 AM   #11
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
Originally Posted by haste View Post
At what layer is your font-strings created? OVERLAY should position your text above the model just fine.
Yes
Code:
local fs = parent:CreateFontString(nil, 'OVERLAY')
But you made me think i had to do this to have my mouseover highlight to work corectly
Code:
	self.Health:SetFrameLevel(unit and 1 or 2)
Code:
	self.Highlight = self:CreateTexture(nil, 'HIGHLIGHT')
	self.Highlight:SetAllPoints(self.Health)
	self.Highlight:SetBlendMode('ADD')
	self.Highlight:SetTexture('Interface\\AddOns\\oUF_Caellian\\media\\mouseoverHighlight')
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 10-02-08 at 09:15 AM.
Caellian is offline  
Unread 10-02-08, 09:27 AM   #12
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Then it's probably your portrait that has a rather high frame level. You can do the following however:
a) Change the frame level of the portrait.
or
b) Create the font-strings with the portrait as parent.
haste is offline  
Unread 10-02-08, 10:08 AM   #13
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
Weird, i'm sure i tried to change the portrait level before and it didn't work for some reason, now it does. Anyway thanks, though i don't know yet if i like the result or not

Anyway, i'd like to understand something, since i've added portraits, i've created a "fake" frame above them so they don't look so flat, i've anchored a few things to that "fake" frame, like health value, power value and so on and it works just fine. But, when i try to do the same with Druidmana, it works but return an error. I'm not sure to understand it because it works for everything else using the exact same method, why not for Druidmana.

Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:56: attempt to index local 'parent' (a nil value)
Count: 1

Call Stack:
[C]: ?
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:56: in function <Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:55>
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:464: in function `style'
Interface\AddOns\oUF\ouf.lua:212: in function <Interface\AddOns\oUF\ouf.lua:206>
Interface\AddOns\oUF\ouf.lua:269: in function <Interface\AddOns\oUF\ouf.lua:266>
Interface\AddOns\oUF\ouf.lua:323: in function `Spawn'
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:614: in main chunk
Line 464 being my SetFontString
Code:
	if(IsAddOnLoaded('oUF_DruidMana')) then
		if(portraits == true) then
			self.DruidManaText = SetFontString(self.Portrait2, font, 10)
			self.DruidManaText:SetPoint('CENTER', 0, 1)
			self.DruidManaText:SetTextColor(1, .49, .04)
		else
			self.DruidManaText = SetFontString(self.Health, font, 10)
			self.DruidManaText:SetPoint('CENTER', 0, 1)
			self.DruidManaText:SetTextColor(1, .49, .04)
		end
	end
In the following example it's working just fine
Code:
		if(portraits == true) then
			self.CombatFeedbackText = SetFontString(self.Portrait2, fontnum, 18, 'OUTLINE')
			self.CombatFeedbackText:SetPoint('CENTER', 0, 1)
		else
			self.CombatFeedbackText = SetFontString(self.Health, fontnum, 18, 'OUTLINE')
			self.CombatFeedbackText:SetPoint('CENTER', 0, 1)
		end
Another question, i want to hide my target's name if it's casting and display the castbar text instead.
This didn't work, apparently self.Castbar.Text:GetText()) is not correct, is there any other way ? (only the hide part doesn't work here, the rest is fine, i just paste the whole thing)
Code:
	if(unit == 'target') then
		self.Name:ClearAllPoints()
		if(not self.Castbar.Text:GetText()) then
			if(self.Power.value:GetText()) then
				self.Name:SetPoint('CENTER', 0, 1)
			else
				self.Name:SetPoint('LEFT', 1, 1)
			end
		else
			self.Name:Hide()
		end
	end
Note: WTB [tt] tag plz ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 10-03-08 at 01:47 PM.
Caellian is offline  
Unread 10-03-08, 03:57 PM   #14
vadda
A Defias Bandit
Join Date: Oct 2008
Posts: 3
Creating Frame

Hi!

I wanted to create a black frame under player and target-frame.

It worked for the player-frame, as you can see on the screenshot:


But I'm not able to get it working for the target-frame.
Any ideas how the code should look like?

Here's my noobish code for the player-frame:
Code:
blackbar = CreateFrame("Frame", nil, self)
blackbar:SetHeight(15)
blackbar:SetWidth(230)
blackbar:SetFrameStrata("LOW")
t = blackbar:CreateTexture(nil,"BACKGROUND")
t:SetTexture(0,0,0)
t:SetAllPoints(blackbar)
blackbar.texture = t
blackbar:SetPoint('TOP', self, 'BOTTOM', 0, -9)
thx,
Vadda
vadda is offline  
Unread 10-03-08, 05:07 PM   #15
Coldfury
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 18
Originally Posted by vadda View Post
Hi!
Any ideas how the code should look like?
im pretty sure its the :SetPoint('TOP', self, 'BOTTOM', 0, -9) part. You should use the name of the frames instead(names are defined where you spawn the frame) or use "oUF.units.player" and "oUF.units.target".

something like
blackframe:SetPoint('TOP', oUF.units.player, 'BOTTOM', 0, -9)
blackframe2:SetPoint('TOP', oUF.units.target, 'BOTTOM', 0, -9)
Coldfury is offline  
Unread 10-03-08, 05:15 PM   #16
Coldfury
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 18
@Caellian:

try using "SetFont" instead of "SetFontString".

ie.: self.DruidManaText = SetFont(font, 10)





which lead me to the question... why use setfontstring? what does it have more than setfont? whats the point of setting a parent there?
Coldfury is offline  
Unread 10-03-08, 05:26 PM   #17
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,229
Originally Posted by Coldfury View Post
@Caellian:

try using "SetFont" instead of "SetFontString".

ie.: self.DruidManaText = SetFont(font, 10)





which lead me to the question... why use setfontstring? what does it have more than setfont? whats the point of setting a parent there?

Its a function to create the whole fontstring
p3lim is offline  
Unread 10-03-08, 05:37 PM   #18
vadda
A Defias Bandit
Join Date: Oct 2008
Posts: 3
Originally Posted by Coldfury View Post

something like
blackframe:SetPoint('TOP', oUF.units.player, 'BOTTOM', 0, -9)
blackframe2:SetPoint('TOP', oUF.units.target, 'BOTTOM', 0, -9)
I created a second blackbar like this:

Code:
blackbar2 = CreateFrame("Frame", nil, oUF.units.target)
blackbar2:SetHeight(150)
blackbar2:SetWidth(300)
blackbar2:SetFrameStrata("LOW")
bla = blackbar2:CreateTexture(nil,"BACKGROUND")
bla:SetTexture(0,0,0)
bla:SetAllPoints(blackbar2)
blackbar2.texture = bla
blackbar2:SetPoint('TOP', oUF.units.target, 'BOTTOM', 0, 90)

Now I see the second black-bar constantly on the bottom of the screen.
Even if I have no target selected. Quite weird.
vadda is offline  
Unread 10-03-08, 05:43 PM   #19
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
Originally Posted by Coldfury View Post
@Caellian:

try using "SetFont" instead of "SetFontString".

ie.: self.DruidManaText = SetFont(font, 10)

which lead me to the question... why use setfontstring? what does it have more than setfont? whats the point of setting a parent there?
I use SetFontString instead of CreateFontString because i have a SetFontString function at the top of my layout including all the default i want for all my fonts, so i don't have to repeat them each time. I don't know if it's a good reason but that's why i do that

Code:
self.DruidManaText = SetFont(self.Portrait2, font, 10)
Didn't work

Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:458: attempt to call global 'SetFont' (a nil value)
But anyway, i really have no clue why it works for everything but DruidMana.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Unread 10-04-08, 12:44 AM   #20
zynix
A Cliff Giant
 
zynix's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
some help please

how in the earth do you move stuff, do you need to edit something in the .lua files or something


would love you help

Zynix
zynix 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