View Single Post
04/03/23, 10:24 AM   #2
FlatBadger
 
FlatBadger's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2021
Posts: 17
It definitely looks like you're overcomplicating it :-)

This is just off the top of my head, so hopefully I'm not talking rubbish, but:

Try creating your tlcFragment as you are, then add it to the hud/hudui (or whereever you want it to show)eg.
Code:
SCENE_MANAGER:GetScene("hud"):AddFragment(tlcFragment)
SCENE_MANAGER:GetScene("hudui"):AddFragment(tlcFragment)
Then to hide/show it use:
Code:
tlcFragment:SetHiddenForReason("disabled", true)
or
Code:
tlcFragment:SetHiddenForReason("disabled", false)
No need to remove it from the scene again in this scenario.

If you like, you can use ZO_HUDFadeSceneFragment to have your fragment fade in/out - you just add a couple of extra parameters to the SetHiddenForReason call, eg.

Code:
tlcFragment:SetHiddenForReason("disable", true, FADE_IN_TIMEIN_MS, FADE_OUT_TIME_IN_MS)

Last edited by FlatBadger : 04/03/23 at 10:30 AM.
  Reply With Quote