Not sure semlar, sorry.
I'm nearly finished with my new nameplate addon. Here is what I got so far: *edit* Tests are finished. rNamePlates2 is released. http://www.wowinterface.com/download...mePlates2.html |
Plenty of insight here explains why my nameplates have sucked so much on the ptr lately.
|
Quote:
|
Quote:
(Estoy usando traductor Google) |
I've come up with a new design which solves the one major drawback my previous method had, which was the 1 frame delay between updates so our nameplate would lag behind the real one.
Lua Code:
This works by creating an extra frame for every nameplate which is attached to the edge of the screen and the center of the nameplate, so that any time the nameplate moves it calls the OnSizeChanged script which is where we reposition our custom nameplate. Other than that it's the same as it was before, but now it only updates if the frame has actually moved, and it should stay above the unit's head as the camera moves, rather than lag behind. |
Looking good.
|
Nice one! I'll borrow this, thank alot:)
|
Genius idea. I love that.
I would add one exception to the setpoint function though. A function that checks if the plate is shown before you apply the new setpoint. Because otherwise you might show a plate that is not visible. Btw there is another thing that I read about. NamePlates change index on every /reloadui. But one could check the worldframe children on every OnUpdate until the first one pops up. After that one just checks for nameplates per index instead of parsing the children all the time. Here is the adapted code: Lua Code:
|
Quote:
As for scanning for new plates, I'm not suggesting that this is the best way to do it, I just wanted a compact example to demonstrate the positioning method. If you use the index approach, you may not want to break out of the loop after the first nameplate is found if the code has the potential to ever be run after more than one nameplate has already been created. |
I haven't really looked at the new 6.0 APIs closely, so I expect this to be debunked fast, but: what about exchanging the OnUpdate script for the new C.Timer (whatever it is called) thing? Being C-side, if it works, wouldn't it be much faster?
|
The actual callback function will take just as long to execute whether it's C_Timer or OnUpdate. I'm not too involved in nameplates, but I think that OnUpdate is exactly how often you need to do your stuff (eg before each frame is drawn), so there's no point in using a timer, and it would probably even be slightly worse, because you could never time it exactly according to each frame.
|
Just to post it here.
Since 6.0.2 the new rNamePlates is using the sizer technique semlar described. rNamePlates: https://code.google.com/p/rothui/sou...tes.lua?r=1311 With WoD going live in a few days a new aura module will be available. So if you need to do sth like that you can check the diff. Aura Module diff: https://code.google.com/p/rothui/sou...s.lua&old=1311 Current version: https://code.google.com/p/rothui/sou...NamePlates.lua Btw I would have loved calling the ScanAuras() function for mouseover units when NamePlate OnEnter is triggered. But as soon as I set NamePlate:EnableMouse(true) and anchor the OnEnter handler the click function on nameplates is broken. Anyone has a clue why? I mean the tooltip pops up if I have a nameplate. Wierd. Without EnableMouse the OnEnter handler does not fire. Grmpf. *edit* Updated rNamePlates to 60000.03. http://www.wowinterface.com/download...tesDiablo.html |
My old script that hid your frame before repositioning it is no longer necessary, and will in fact probably result in worse performance since textures are unloaded from memory when they're hidden and have to be read from the disk again when they're shown.
You can now safely parent and anchor to the base nameplate frame without much issue. However, I ran into major performance problems from nameplates scaling based on distance, and have hard-coded their min and max scale to the same number to prevent it from happening. Lua Code:
|
Quote:
|
All times are GMT -6. The time now is 10:03 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI