Thread Tools Display Modes
01-11-09, 01:26 AM   #461
level12wizard
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 2
I have a small question about cast bar time text formats.

I want the cast time text show the duration left on the cast, instead of counting up how far they are in the cast (not sure what to call that).

So instead of a two second cast going "0.0, 0.1, 0.2...1.8, 1.9, 2.0" I want it to go "2.0, 1.9, 1.8....0.2, 0.1, 0.0".

Hopefully that's clear enough, how can it be done? I've peeked around various layouts but can't figure it out. Thanks for your time.
 
01-11-09, 08:18 AM   #462
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
Originally Posted by level12wizard View Post
I have a small question about cast bar time text formats.

I want the cast time text show the duration left on the cast, instead of counting up how far they are in the cast (not sure what to call that).

So instead of a two second cast going "0.0, 0.1, 0.2...1.8, 1.9, 2.0" I want it to go "2.0, 1.9, 1.8....0.2, 0.1, 0.0".

Hopefully that's clear enough, how can it be done? I've peeked around various layouts but can't figure it out. Thanks for your time.
At the bottom of this post, Haste gives the answer
__________________
All I see is strobe lights blinding me in my hindsight.
 
01-12-09, 06:53 PM   #463
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
WTB tags for basic colors in oUF :P

Code:
tags = {
	["[white]"]       = "|cffffffff"
	["[yellow]"]    = "|cffffff00"
	["[cyan]"] = "|cff00ffff"
}
etc

and stupid targeted pets got a dark blue health bar, want to display reaction color instead.
previously i used a dirty code in my OverrideUpdateHealth
Code:
	
if not t then
	if UnitPlayerControlled(unit) then 
		r, g, b = 0, 1, 0
	end
end
currently i got
Code:
	self.Health.colorDisconnected = true
	self.Health.colorTapping = true
	self.Health.colorClass = true
	self.Health.colorReaction = true

Last edited by Bruners : 01-12-09 at 07:29 PM.
 
01-12-09, 08:52 PM   #464
level12wizard
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 2
Originally Posted by Wimpface View Post
At the bottom of this post, Haste gives the answer
Can anyone give a deeper explanation? I don't understand how to use self:CustomDelayText() and self:CustomTimeText(), I just end up breaking stuff.

Sorry for the dumb question, but it's the only thing I couldn't figure out myself.


edit: I can't believe it was that obvious and yet I somehow still didn't do it right. Thanks, Philr (and Wimpface, and of course Haste). /sigh

Last edited by level12wizard : 01-13-09 at 07:58 AM.
 
01-13-09, 06:32 AM   #465
Philr
A Defias Bandit
Join Date: Dec 2008
Posts: 3
Originally Posted by level12wizard View Post
Can anyone give a deeper explanation? I don't understand how to use self:CustomDelayText() and self:CustomTimeText(), I just end up breaking stuff.

Sorry for the dumb question, but it's the only thing I couldn't figure out myself.
This works for me, in the layout function:

Code:
            self.Castbar.CustomTimeText = function(self, duration)
                if self.casting then
                    self.Time:SetFormattedText("%.1f", self.max - duration)
                elseif self.channeling then
                    self.Time:SetFormattedText("%.1f", duration)
                end
            end
 
01-13-09, 08:38 AM   #466
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,711
Originally Posted by Bruners View Post
WTB tags for basic colors in oUF :P

Code:
tags = {
	["[white]"]       = "|cffffffff"
	["[yellow]"]    = "|cffffff00"
	["[cyan]"] = "|cff00ffff"
}
etc

and stupid targeted pets got a dark blue health bar, want to display reaction color instead.
previously i used a dirty code in my OverrideUpdateHealth
Code:
	
if not t then
	if UnitPlayerControlled(unit) then 
		r, g, b = 0, 1, 0
	end
end
currently i got
Code:
	self.Health.colorDisconnected = true
	self.Health.colorTapping = true
	self.Health.colorClass = true
	self.Health.colorReaction = true
The colors you can do yourself, its a waste using tags for it.

The dark blue color you refer to is the return color of UnitSelectionColor(), this can be changed as you like.
 
01-13-09, 10:02 PM   #467
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
Originally Posted by p3lim View Post
The colors you can do yourself, its a waste using tags for it.

The dark blue color you refer to is the return color of UnitSelectionColor(), this can be changed as you like.
but how to do that without using PreUpdateHealth, OverrideUpdateHealth or PostUpdateHealth
 
01-14-09, 06:27 AM   #468
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
Raid frames

Hi there,

i have a little problem with the raid frames, sometimes the power bar goes along the screen, sometimes it happens with the healthbar :

Here

My code for spawning the raid frames is :

Code:
local raid = {}
for i = 1, 8 do
	local raidgroup = oUF:Spawn('header', 'oUF_Raid'..i)
	raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffSet', -6)
	table.insert(raid, raidgroup)
	if(i==1) then
		raidgroup:SetPoint('TOPLEFT', UIParent, 20, -190)
	elseif (i==5) then
		raidgroup:SetPoint('TOPLEFT', UIParent, 20, -350)
	else
		raidgroup:SetPoint('TOPLEFT', raid[i-1], 'TOPRIGHT', 10, 0)
	end		
	raidgroup:Show()
end
if i don't do the elseif all is going fine...

I think i'm doing something wrong, but what ?
 
01-14-09, 06:53 AM   #469
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Most likely a plug-in issue.
 
01-14-09, 07:08 AM   #470
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
I use Smooth, Experience and Reputation.
The only one i could think is the culript is Smooth.
I'll try without it.
Thanks for the quick reply

EDIT : This is it, it's Smooth the culript.

But i have another question :
Sometimes the background of the raid frames is going crazy and keep changing colors (like having a debuff on everyone in the raid). Is this related to Alterac and the event there or another pb with my layout ?

Last edited by Rostok : 01-14-09 at 07:13 AM.
 
01-14-09, 10:09 AM   #471
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Okay super dumb question... I'm getting this down finally after forever but i cant seem to figure out how to put in and absolute Heath number then go down from there.. say u have 10000hp and as u get beat down it goes down.. not sure if i have to create an OVERLAY and add it to that or what .. i know dumb question
__________________
 
01-14-09, 10:17 AM   #472
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
Code:
oUF.Tags["[health1000hp]"] = function(unit)
  local m, n = UnitHealthMax(unit), UnitHealth(unit)
  return m == 0 and 0 or n ~= m and string.format("-%s|r", (m - n)) or m == n and m
end
would display 0 if you got 0 health, full health if you got full and how much health you are missing. Was this what you wanted? Else you can just choose to display UnitHealth()
 
01-14-09, 10:26 AM   #473
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Originally Posted by Bruners View Post
Code:
oUF.Tags["[health1000hp]"] = function(unit)
  local m, n = UnitHealthMax(unit), UnitHealth(unit)
  return m == 0 and 0 or n ~= m and string.format("-%s|r", (m - n)) or m == n and m
end
would display 0 if you got 0 health, full health if you got full and how much health you are missing. Was this what you wanted? Else you can just choose to display UnitHealth()
thats perfect thank you..

Also one more question i cant get my stoopid party frames to show am i doin somethign wrong???
Code:
local party = oUF:Spawn('header', 'oUF_Party')
party:SetPoint('TOP', UIParent, 'TOPLEFT', 0, 500)
party:SetManyAttributes(
	"showParty", true,   
	"showRaid", false,   
	"columnSpacing", 10,   
	"unitsPerColumn", 1,   
	"maxColumns", 4,   
	"columnAnchorPoint", "LEFT",   
	"xOffset", 20   
)
party:SetAttribute("template", "oUF_Party")
__________________
 
01-14-09, 10:28 AM   #474
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
Originally Posted by Alkar View Post
thats perfect thank you..

Also one more question i cant get my stoopid party frames to show am i doin somethign wrong???
Code:
local party = oUF:Spawn('header', 'oUF_Party')
party:SetPoint('TOP', UIParent, 'TOPLEFT', 0, 500)
party:SetManyAttributes(
	"showParty", true,   
	"showRaid", false,   
	"columnSpacing", 10,   
	"unitsPerColumn", 1,   
	"maxColumns", 4,   
	"columnAnchorPoint", "LEFT",   
	"xOffset", 20   
)
party:SetAttribute("template", "oUF_Party")
your missing the party:Show()
 
01-14-09, 10:40 AM   #475
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
ROFLMAO!!!!!! im soo retarded
__________________
 
01-14-09, 10:45 AM   #476
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Ok humm got This now


[2009/01/14 09:42:59-815-x1]: Interface\FrameXML\SecureTemplates.lua:457: bad argument #1 to 'strupper' (string expected, got nil):
Interface\FrameXML\SecureTemplates.lua:457: in function <Interface\FrameXML\SecureTemplates.lua:456>:
Interface\FrameXML\SecureTemplates.lua:615: in function <Interface\FrameXML\SecureTemplates.lua:559>:
Interface\FrameXML\SecureTemplates.lua:854: in function `SecureGroupHeader_Update':
Interface\FrameXML\SecureTemplates.lua:449: in function `SecureGroupHeader_OnAttributeChanged':
<string>:"*:OnAttributeChanged":1: in function <[string "*:OnAttributeChanged"]:1>
<in C code>: in function `SetAttribute'
oUF-1.3.1\ouf.lua:14: in function `SetManyAttributes'
oUF_Moo-1.0\oUF_Moo.lua:466: in main chunk

---

when i added
party:show()
also want it to hide when in a raid :P

Sorry for so many questions
__________________
 
01-14-09, 11:00 AM   #477
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
you need to do a check then, as I don't know how you spawn your frames this will be provisional
Code:
if(GetNumRaidMembers() > 5) then
  party:Hide()
  raid:Show()
else
  party:Show()
end
in this you should add an in combat check to avoid secure bull crap, look at other layouts that got both raid frames and party frames.
 
01-14-09, 11:15 AM   #478
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Originally Posted by Bruners View Post
you need to do a check then, as I don't know how you spawn your frames this will be provisional
Code:
if(GetNumRaidMembers() > 5) then
  party:Hide()
  raid:Show()
else
  party:Show()
end
in this you should add an in combat check to avoid secure bull crap, look at other layouts that got both raid frames and party frames.
Worked perfectly thank ya Bruners Ur help has been great
__________________
 
01-14-09, 12:03 PM   #479
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
As far as the custom tags

Code:
oUF.Tags["[health1000hp]"] = function(unit)
  local m, n = UnitHealthMax(unit), UnitHealth(unit)
  return m == 0 and 0 or n ~= m and string.format("-%s|r", (m - n)) or m == n and m
end
how would i incorperate that in??

Would it be a OverLAY that i have to add to get it on the health bar or would it be the same as say the way ya added chara name or lvl or whatnot ?
__________________
 
01-14-09, 12:08 PM   #480
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
Getting some issues with my power update.

Code:
local updatePower = function(self, event, unit, bar, min, max)
	if(UnitIsDead(unit) or UnitIsGhost(unit)) then
		bar:SetValue(0)
	elseif(not UnitIsConnected(unit)) then
		bar.value:SetText()
	elseif unit=="player" or unit=="target" then 
	    bar.value:SetFormattedText('%s/%s', numberize(min), floor(min/max*100))
		
		local _, ptype = UnitPowerType(unit)
		local color = self.colors.power[ptype]
		if(color) then bar.value:SetTextColor(color[1], color[2], color[3]) end
	end
end
I want my self.Power.value to colour by powertype, but after several different methods i'm still stuck with black colouring and a headache
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion


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