EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 04-20-2007, 09:18 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default Close Button that just makes window page visible=false?

I've been tinkering and working on some improvements for my browser window mod. It's always a challenge to figure out what is hard coded into the UI and how to work around those things.

I noticed that there are a lot of ways to make a close button. Most of the default windows have the close button as AnyWindow.WindowFrame.Close. The names "WindowFrame" and "Close" can't be changed. Some old style windows have a button called "WC_CloseButton" but this button seems like it has to be at the first level of your window. I just saw some other windows where people just Parent up to the top of the window and set Visible=false.

Is there any real difference with these methods? I'm going to be using "WC_Titlebar" and "WC_Frame" to store some settings so I'll have to use something other than the normal WindowFrame.Close button.
Reply With Quote
  #2  
Unread 04-20-2007, 09:51 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

If a window supports a close button, I tend to use that one to be on safe side, but you can usually macro a /hide <Window> as well.

If you want to use a close button on another level, you can put a WC_CloseButton in your window root, set it to visible=false and use another button whereever you want that presses the WC_CloseButton when you click it.

The old WC_ notation and the new "WindowFrame" formats are identical in function.

You can also just invis a window, but it will still be there and active and not be closed - e.g. an invis chat window still receives chat input, whereas a closed chat window will not.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #3  
Unread 04-20-2007, 10:02 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Ok, I'm going to try seeing what a WC_Closebutton at the first level of the window does. I just tried Parenting to the first level and setting Visible=false and an unintended feature is that you can close and open the browser window and the browser is still exactly as you left it.

I just wonder if this is more taxing memory-wise than a normal close button. I only hear my hard drive loading up the Mozilla DLLs the first time I open up the browser.
Reply With Quote
  #4  
Unread 04-20-2007, 10:07 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by Othesus View Post
Ok, I'm going to try seeing what a WC_Closebutton at the first level of the window does. I just tried Parenting to the first level and setting Visible=false and an unintended feature is that you can close and open the browser window and the browser is still exactly as you left it.

I just wonder if this is more taxing memory-wise than a normal close button. I only hear my hard drive loading up the Mozilla DLLs the first time I open up the browser.
That's what I meant, just setting visible=false keeps the window active and thus using resources.

The windows are loaded from disk the first time you open them in game. Afterwards they stay in memory even after you close them. However, the engine keeps two copies of it, a copy of the file on disk (in the root tree) and a copy of the active window you are seeing (in the root._HUD tree). Closing the window resets that second copy. Logging to char select also resets the entire active tree but keeps the other tree. However, you can also script changes to that one to make changes persistent over different characters (it's not written to disk however).

Whether that also applies to the Mozilla DLLs as well (which I doubt) or whether you just don't hear your hard drive because your operating system kept those DLLs cached in memory I cannot answer.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.

Last edited by gm9 : 04-20-2007 at 10:21 AM. Reason: edited for clarification
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI