Combo Points Conditional Formating
Hey guys! First of all let me thanks Haste and all the developers of oUF Layouts. I've been messing with my oUF Layout, I'm using oUF_Hypocrisy, but I've been changing it so much over time that it doesn't resemble almost anything of Hypocrisy now. Tho I like how the code is organized so it's a nice framework to build my customization around it. Anyway... the question
I'm showing text for the Combo Points. It's working alright. I've searched the old oUF Topic and I've only found reference to Combo Points of a question from Roth, but it had nothing to do with this. So here I am. Like I was saying I'm displaying the Combo Points with the code bellow. It's working alright, but the colored part is what I want to work but it isn't. I want to display the Combo Points RED if I have 5 CP's on the target. Thing is the text is always in White. I guess it has something to do with the updates or something... Code:
if unit=="target" then -greven |
At the time of the layout being put in place, the combo points will always be zero. Strip out the yellow part and register the combo point update event (can't remember it right now) pointing to a function that changes the text color.
|
Oh I see... I imagined it had to do with the update of the combo points. Going to try to achieve that then... even If I'll have to do some try and error. :p
|
Code:
local function updateCombo(self) |
Quote:
|
The first argument of any custom event for oUF is a reference to the frame triggering it.
Code:
local function UpdateComboPoints(self, event, unit) |
Thanks for the help guys. The below code isn't doing anything, not getting any error, but it simply doesn't change color. Not even if I get 1 2 3 4 combo points. I've set the text to green to test it, nada.
I have this outside the layout function: Code:
local function UpdateComboPointsFormat(self, event, unit) Code:
Note the commented, that is what it USED to do, now I want the text to be red when I have 5 combo points. It Bugs me not to be able to use a debugger (no pun intended :D). Kinda blind to "program" this way. |
Try this:
Code:
local function UpdateComboPointsFormat(self, event, unit) |
Quote:
So the final code to "color" combo points is, if anyone interested: Code:
local function UpdateComboPointsFormat(self, event, unit) Quote:
Awesome! More Quick Feedback to the combo points. :) Thanks a lot to all that helped me. |
All times are GMT -6. The time now is 03:29 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI