EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   opening pages in a window (https://www.eq2interface.com/forums/showthread.php?t=1605)

depechenode 02-24-2005 02:48 PM

opening pages in a window
 
I have a ? for the guru's here:

I want to use a button that I can click to open a new page that can be displayed within a current window. Namely, the inventory window.

Once the window displays, I would like to have the window use a close button to hide that window so the inventory window is back to normal.

I tried using onpress and onactivate, but I am not seeing my page open.

I started my new page with visible = false.

Using a button and the onpress property, I told it "newpage.visible = true paperdoll.visible = false" it is not working. I click my button and do not see my new page. Any help please is welcomed.
-dn

Quib 02-24-2005 03:13 PM

Based on "newpage.visible = true paperdoll.visible = false" and assuming your button and newpage are within the EquipmentPage object my guess is you need to use this code:
Code:

Parent.newpage.Visible=true Parent.PaperDoll.Visible=false
Use OnPress for now. After you get the button to work to hide the PaperDoll (why the hell is it called a paperdoll? it's a 3D real-time render) and how your window, you can either use a dual button system to show/hide, a single button that uses !Visible variables to toggle visibility, or a single checkbox to show/hide the two objects.

If you still have trouble, post your XML file.

Quib

depechenode 02-24-2005 03:30 PM

On my newpage do I set that to visible = false within its own properties ?

Or leave as visible and in the Inventory property use Onshow = Parent.Newpage.Visible=false

here is my XML tree:

Using UIBuilder btw -

-Inventory
...-Inventory
......-Newpage
......-Coinpage
......-etc the rest of the normal pages.

Newpage is what I want hidden when Inventory is opened.

Newpage is to be shown over top the paperdoll when the button I have is pressed. Then, Newpage is to be closed via a button on its page to allow paperdoll to be seen again and newpage to close.

Quib 02-24-2005 03:34 PM

Those two things would accomplish the same thing, so it doesn't REALLY matter which way you do it. I'd recommend setting Visible=false in the newpage object. It's more efficient to directly set the variable than to use OnEvents wherever possible.

Quib

Quib 02-24-2005 03:35 PM

I need to know where in the tree your button is as that has a direct impact on the code in the OnEvent.

Quib

depechenode 02-24-2005 03:37 PM

Button to open Newpage is located in:

-Inventory
...-Inventory
...-button for new page


basically it is located on same branch as the close, option and help button.

Quib 02-24-2005 03:43 PM

K, set newpage's Visible property to false.

Try the following code on the button:
Code:

Parent.EquipmentPage.PaperDoll.Visible=false Parent.newpage.Visible=true
Quib

depechenode 02-24-2005 03:48 PM

hehe thanks Quib you are a BIG help!!


Now, I got the Newpage to open. Not too concerned for the moment on the paperdol atm.

Now that I can open the Newpage but I can't get the Newpage to close.

The button to close the Newpage is on the Newpage itself. Using the default close button. I have onpress Parent.Newpage.Visible=False.

It won't close.

So please if you can help me with this, then I will on the paperdoll hiding.

Thanks Quib!!

depechenode 02-24-2005 03:54 PM

lil more info for you Quib, paperdoll should not be of concern now to me. I think I don't need to worry about hiding it. Just need the close button on Newpage to close that page. Thanks!

Quib 02-24-2005 04:02 PM

The button on newpage needs the following OnPress:
Code:

Parent.Visible=false
Since the close button is ON newpage, it's parent IS newpage. The open button is a child of the main page object, and so you specify that newpage is what is being made visible.

Quib

depechenode 02-24-2005 04:05 PM

OK thank you!! I am setting it up now to see if works! Thanks Quib!!

depechenode 02-24-2005 04:22 PM

Ok got the button to work! It closes Newpage. BUT, now paperdoll no longer comes back.

here is the Close button's Onpress from Newpage:

Parent.Visible=False EquipmentPage.PaperDoll.Visible=True

depechenode 02-24-2005 04:29 PM

Got it to wrok woo hoo Ty Quib for your help.

I am finishing my mod then I will post my newest mod for the Inventory window! :nana:

-dn


All times are GMT -5. The time now is 03:03 PM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI