View Single Post
05/18/14, 06:05 PM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
All default controls in game UI are shown/hidden using scene manager. You can do the same.

Create simple scene fragment:
Lua Code:
  1. local fragment = ZO_SimpleSceneFragment:New(yourControl)
or scene fragment with fade in/out animation:
Lua Code:
  1. local fragment = ZO_FadeSceneFragment:New(yourControl)

And then add your fragment to all scenes where it has to be shown (in your case probably scenes "hud" and "hudui"):
Lua Code:
  1. local scene = SCENE_MANAGER:GetScene("hud")
  2. scene:AddFragment(fragment)
If you want to add more fragments at once you can create fragment group:
Lua Code:
  1. local fragmentGroup = { fragment1, fragment2, fragment3 }
  2.  
  3. scene:AddFragmentGroup(fragmentGroup)
If you want to remove fragment/fragment group from scene use:
Lua Code:
  1. scene:RemoveFragment(fragment)
  2. scene:RemoveFragmentGroup(fragmentGroup)

You can find a few more about this topic here:
http://www.esoui.com/forums/showthread.php?t=1453

Last edited by Garkin : 05/23/14 at 05:32 AM. Reason: Updated for new patch 1.1.2
  Reply With Quote