Thread: Pet window
View Single Post
  #13  
Unread 12-06-2010, 12:58 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

During runtime of the UI, the main window elements (Pet, Target, Inventory, Broker, Player, etc) all get put into the same "_ROOT" element in which they are located under. With this structure tree you can see how they are placed and how to access them via script:

Code:
_ROOT
   |- Target
      |- v0
      |- v1
      |- HighFantasyPetPage
      |- WindowFrame
   |- Pet
      |- WindowFrame
   |- Random window name
   |- Another random window name
I put a few examle Pages under those windows just to show how the tree looks as you go further in.

So let's say your Pet window's main page has an element of "OnShow".
Inside that element, you need to access your High Fantasy pet page (whatever the name might be). You'll need to travel backwards in the tree just one time (to reach the _ROOT) and then down into that pet page, and mark it visible:

Code:
Parent.Target.HighFantasyPetPage.visible=true
The "Parent." instructs the code to navigate backwards one time in the tree's hierarchy. If you needed to do it more than once, you would just continue:
Parent.Parent.Parent.Parent.WindowName.SubPage1.SubPage2.Page2Text.visible=true

And then do the opposite in a "OnHide" property:

Code:
Parent.Target.HighFantasyPetPage.visible=false
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 12-06-2010 at 01:02 PM.
Reply With Quote