WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Addon causing UI elements to turn transparent (https://www.wowinterface.com/forums/showthread.php?t=54186)

Joker119 08-10-16 09:15 PM

Addon causing UI elements to turn transparent
 
This may be a more general lua question, but I haven't had ANY luck in that forum, seeing as how my addon uses oUF maybe someone here can help...

So this is a new bug that popped up with the legion pre-patch.
Before the pre-patch everything worked peachy and perfect. Now, not so much.

I have an addon that replaces the player frame with health and power orbs. (diablo 3 style).
I also have a neat little animation option that puts one of a number of choosable animations ontop of the standard orb texture, to give alot more flavor and customizability to it.

Unfortunately, for some reason as of 7.0.3, whenever the UI is reloaded (through /reload or zone change) if the orb displaying an animation is not 100% full, it glitches the UI, turning basically everything transparent (see screenshot) aside from the addon's artwork and the primary actionbar.

Also the animation of the orbs doesn't appear to "unfill" properly when the orb is depleted, not sure if this issue is related or not.

Any ideas what could cause such a bug? And what I might do to fix it other than removing or recoding the animations completely?
I'd much rather patch the existing code than have to rewrite it all due to time constraints between work and school.


http://imgur.com/a/d6qFN
Before and after /reload with animations enabled on power bar.

code can be viewed here:
https://github.com/galaxy119/Roth_UI

Phanx 08-12-16 12:12 AM

Quote:

Originally Posted by Galaxy119 (Post 317789)
Unfortunately, for some reason as of 7.0.3, whenever the UI is reloaded (through /reload or zone change) if the orb displaying an animation is not 100% full, it glitches the UI, turning basically everything transparent (see screenshot) aside from the addon's artwork and the primary actionbar.

If it only happens under those conditions, it should be fairly easy to work around. Set a flag on PLAYER_ENTERING_WORLD. Skip all updates (or just the problematic part of the update) if the flag isn't set. Clear the flag on PLAYER_LEAVING_WORLD. You may need to experiment with additional events (you can use RegisterAllEvents to build a log of all events in the order they occur during reload/zone change) and/or using timers (eg. remove the animation if the flag is unset, then add it back with a timer if PEW is too soon).

Joker119 08-15-16 12:29 AM

Quote:

Originally Posted by Phanx (Post 317851)
If it only happens under those conditions, it should be fairly easy to work around. Set a flag on PLAYER_ENTERING_WORLD. Skip all updates (or just the problematic part of the update) if the flag isn't set. Clear the flag on PLAYER_LEAVING_WORLD. You may need to experiment with additional events (you can use RegisterAllEvents to build a log of all events in the order they occur during reload/zone change) and/or using timers (eg. remove the animation if the flag is unset, then add it back with a timer if PEW is too soon).

As far as I can tell, it already waits for PEW to update the orb model (model refers to the animation, the non-animated texture of the orb is just refered to as the statusbar in the code)
Lua Code:
  1. --update model func
  2.     function model:Update()
  3.       local cfg = db.char[self.type].model
  4.       self:SetCamDistanceScale(cfg.camDistanceScale)
  5.       self:SetPosition(0,cfg.pos_x,cfg.pos_y)
  6.       self:SetRotation(cfg.rotation)
  7.       self:SetPortraitZoom(cfg.portraitZoom)
  8.       self:ClearModel()
  9.       --self:SetModel("interface\\buttons\\talktomequestionmark.m2") --in case setdisplayinfo fails
  10.       self:SetDisplayInfo(cfg.displayInfo)
  11.     end
  12.     model.type = orb.type
  13.     model:SetScript("OnEvent", function(self) self:Update() end)
  14.     model:RegisterEvent("PLAYER_ENTERING_WORLD")
  15.     model:SetScript("OnShow", function(self) self:Update() end)
  16.     model:Update()
  17.     orb.model = model

As always you can find the rest of the code here: https://github.com/galaxy119/Roth_UI

Also the orb animations don't update properly, as the orb unfills, the animation is suppose to unfill aswell, however it does not.

Joker119 08-15-16 01:31 AM

It appears something i've done at some point has broken the animation more.
Now it won't unfill from depleted orbs, and the animation does not re-appear upon /reload or zone changes, but does upon login.

Healbotadin 09-09-16 02:38 AM

I know it's been a while, but any updates or fixes for this? I'm now running into the same problem with ouf_Diablo. It is definitely tied to the orb animations since it only really happens if I load or reload while dead (or lacking a large amount of health/mana).

zork 09-13-16 02:39 AM

Afaik that issues is fixed. Check http://www.wowinterface.com/download...ysRevival.html


All times are GMT -6. The time now is 02:36 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI