Player Progress Bar Auto Hiding
I wrote an experience bar add-on that always displays the player progress bar (a.k.a. experience bar). I make use of scene manager to take care of hiding and showing the add-on.
Lua Code:
This works really well and takes care of most of the heavy lifting. The only other event I need to track is when experience is gained. In that event I update my text label and flash the amount gained. My problem is when the player is a veteran. For some reason, when a veteran player kills a mob the progress bar is hidden. I see an extra "OnHide" event called after the experience gain events. This does not happen prior to veteran status. I can redisplay the bar by shifting in and out of a scene (like opening and closing my inventory view). I need some help debugging and troubleshooting this. If anyone has any ideas please share them. I'm not sure how to find out what is causing the progress bar to be hidden. I have a temporary fix in the latest version of my add-on that calls ZO_PlayerProgressBarCurrentFragment:RefreshBaseType() to redisplay the progress bar, but this ends up causing a "flash" of the bar that I would like to avoid. |
I'm not really sure why, but there are 2 progress bar fragments:
PLAYER_PROGRESS_BAR_FRAGMENT PLAYER_PROGRESS_BAR_CURRENT_FRAGMENT Most of the scenes contains both fragments, so I believe that you will need to show both of them. This is how it is done in Azurah and it seems to be working: Lua Code:
|
Quote:
As an aside, what is the difference between PLAYER_PROGRESS_BAR_FRAGMENT and ZO_ProgressBarFragment? The latter one seems to be nil during add-on initialization. |
Quote:
Lua Code:
|
All times are GMT -6. The time now is 08:07 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI