View Single Post
05/18/14, 06:52 PM   #5
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Azbandar View Post
I may just have to give up the hiding in menus, this is all greek to me. I've tried every style here and in the attached post. All errors.

Basically, I'm trying to take something like FreeSlots but make it disappear in a menu. I thought it would be simple, my brain can't grasp it though.
What errors you get?

Here is sample code:
Lua Code:
  1. --simple window with texture:
  2. local tlw, texture
  3. tlw = WINDOW_MANAGER:CreateTopLevelWindow()
  4. tlw:SetDimensions(100,100)
  5. tlw:SetAnchor(CENTER, GuiRoot, CENTER, 0, 0)
  6. tlw:SetHidden(true)
  7. texture = WINDOW_MANAGER:CreateControl(nil, tlw, CT_TEXTURE)
  8. texture:SetTexture("/esoui/art/icons/poi/poi_groupboss_complete.dds")
  9. texture:SetAnchorFill(tlw)
  10.  
  11. --create simple fragment
  12. local fragment = ZO_FadeSceneFragment:New(tlw)
  13.  
  14. --add my fragment to scenes:
  15. local sceneHud = SCENE_MANAGER:GetScene("hud")
  16. local sceneHudUI = SCENE_MANAGER:GetScene("hudui")
  17.  
  18. sceneHud:AddFragment(fragment)
  19. sceneHudUI:AddFragment(fragment)
  Reply With Quote