View Single Post
03/17/15, 03:18 AM   #8
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Thanks, Sasky. I've looked to AutoInvite a couple times now for pointers on adding to a default scene group. Actually just started one the other day which adds into the journal group (without that hard-coded position ).

I didn't get a chance to do anything with this request tonight. Got too excited with all the new things in the game! I'll wait to see if Ayantir starts anything tomorrow since it looks like an idea is already taking shape. In the meantime, here's an example of adding a scene to the Journal scene group (it's really just a revised version Sasky's AutoInvite code):

Lua Code:
  1. Packrat = Packrat or {}
  2. Packrat.PackratUI = Packrat.PackratUI or {}
  3.  
  4. function Packrat.PackratUI.Initialize()
  5.     PACKRAT_SCENE = ZO_Scene:New("packrat", SCENE_MANAGER)
  6.     PACKRAT_SCENE:AddFragmentGroup(FRAGMENT_GROUP.MOUSE_DRIVEN_UI_WINDOW)
  7.     PACKRAT_SCENE:AddFragmentGroup(FRAGMENT_GROUP.FRAME_TARGET_STANDARD_RIGHT_PANEL)
  8.     PACKRAT_SCENE:AddFragment(RIGHT_BG_FRAGMENT)
  9.  
  10.     PACKRAT_SCENE:AddFragment(TITLE_FRAGMENT)
  11.  
  12.     PACKRAT_SCENE:AddFragment(PLAYER_PROGRESS_BAR_FRAGMENT)
  13.     PACKRAT_SCENE:AddFragment(PLAYER_PROGRESS_BAR_CURRENT_FRAGMENT)
  14.  
  15.     local pos = #MAIN_MENU.sceneGroupInfo.journalSceneGroup.menuBarIconData + 1
  16.     MAIN_MENU.sceneGroupInfo.journalSceneGroup.menuBarIconData[pos] = {
  17.         categoryName = "Packrat", --actually need to add this string to SI_
  18.         descriptor = "packrat",
  19.         normal = "EsoUI/Art/Campaign/campaign_tabIcon_summary_up.dds", --change to more relevant icon
  20.         pressed = "EsoUI/Art/Campaign/campaign_tabIcon_summary_down.dds",
  21.         highlight = "EsoUI/Art/Campaign/campaign_tabIcon_summary_over.dds",
  22.     }
  23.  
  24.     SCENE_MANAGER:GetSceneGroup("journalSceneGroup").scenes[pos] = "packrat"
  25.     PACKRAT_SCENE:AddFragment(ZO_FadeSceneFragment:New(MAIN_MENU.sceneGroupBar))
  26.  
  27.     MAIN_MENU:AddRawScene("packrat", 6, MAIN_MENU.categoryInfo[6], "journalSceneGroup")
  28. end
  Reply With Quote