Nameplate creation with oUF
Hi all,
Just now, I've started to create a nameplate for my UI with oUF and I guess the main task is coloring the health bar (I wanna override oUF's built-in ColorUpdate function so...) based on each different cases like:
and so on. I am pretty sure there are more cases that I should consider, but I ain't sure of what they could be :confused: Any ideas, please? -- EDIT #1 Okay, I made a super simple prototype which currently has health bar, health text and name text only, but clicking a nameplate doesn't seem to select a target. Do I have to register "OnClick" script which calls "TargetUnit" function? -- EDIT #2 And about aura creation, should I just use aura element built in oUF? |
I think I found a bug.
Before we go further, please have a look at the following video. (Seems like I can't embed a video on post :() https://youtu.be/nyx3-vpUidA So what is happening here is that I have cast "Brutal Slash", an AOE skill of feral druid that deals a certain amount of damage to nearby enemies. However, as you can see, the health bar is only updated for an enemy that is currently selected as a target. My code currently doesn't do that much and pretty sure I didn't touch anything from nameplate element in oUF. Lua Code:
|
I have noticed this issue too, I fixed it by applying this in my CallbackUpdate
Lua Code:
Just so you know the callback is called when you spawn them Lua Code:
@lightspark might be able to spread some more info on this as to why this happens. Be sure you are applying self.Health.frequentUpdates = true in your code Also yes you can use the auras creation off oUF. |
Quote:
But why do you explicitly disable mouse events? o_O They should be disabled by default, well, unless you do something that enables them. Quote:
|
Thanks to both Kkthnx and lightspark.
I just revised my code and found that I had the following lines of code: Lua Code:
What I thought was as long as I don't enable a mouse these functions would not run, but seems like these would automatically enable mouse even if I don't manually enable them. Good practice haha!! But lightspark, do you know what is going on with a bug on the video? I really can't figure out why this is happening :confused: |
Quote:
Quote:
|
Quote:
Sorry, my bad haha;;;; -- EDIT #1 Thank you, it's working perfectly :banana: |
If you need any further help please do ask! We will be more than happy to help! @lightspark, I will show a video about the whole EnableMouse(false) deal later today after I get my coffee and get my kids off with their aunt! :eek:
|
Okay okay. I am dumb. Figured it out.
This code is preventing the clicks. Lua Code:
|
It happens to all of us :p
|
All times are GMT -6. The time now is 10:51 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI