EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Close Button and Window Settings (https://www.eq2interface.com/forums/showthread.php?t=7006)

Arremis 11-15-2006 12:18 AM

Close Button and Window Settings
 
I'm working on a new bank mod here and I've run into a problem. From what I see the Window Settings button and Close Window button reside inside the Window Frame. Using the window settings, hiding the frame will cause these 2 buttons to disappear as well. I didn't want these buttons hidden when the frame was hidden so I pulled them out of the frame altogether. This caused them to not work. Digging through the command list, I came upon window_close and window_settings. So, I attached these commands to the OnPress event (OnPress window_settings and OnPress window_close in the UIBuilder). Upon loading the bank mod in game, and pressing the buttons, the window settings button didn't work at all, and close window button gave me the proper use for this command is window_close <module> <name>.

Can someone tell me what <module> <name> means, and either how to keep the buttons visible when the window frame is hidden, or how to make them work outside the window frame?

Zonx 11-15-2006 12:34 AM

My suggestion for you is to restore the original default buttons.

Shove them out of the frame so they can't been seen.

Now place copies wherever you want them and give them onPress scripts that Press the default buttons.

Be sure to change the name of the copies.

The advantage of this approach is that your buttons activate the standard mechanism rather than calling some poorly supported script command that may be broaken or break in the future ;)

Arremis 11-15-2006 09:59 AM

Thanks Z...you're the man :)

gm9 11-15-2006 10:44 AM

Actually instead of the buttons in the window frame you can add a WC_Close button, which is another standard button valid on any window. The advantage is that this will cut down on file size. You do not need to move it out of the frame, just set it to Visible=false. Call it via another button as Zonx explained.

Zonx 11-15-2006 08:02 PM

Yep, that works. But be aware all the WC_xxx objects are decremented so could stop functioning at some point.

I am slowly converting all my old window code to use the current SOE standard objects.

thorvang 12-04-2006 07:47 AM

why not just put a onhide="Visible=true" to the RightGrouper window?

Zonx 12-04-2006 08:10 AM

Say SOE adds some hard coded routine that fidles with the window when the close button is pressed. visible="false" doesn't actually call SOE's close button handler.

Pressing the default close button via another button guards against future breakage ;)

thorvang 12-04-2006 08:21 AM

well, they might aswell change the frame.rightgrouper.close order what will break your handler :D

just tried the /window_close command. the module is the parent window while the name is the actual window. /window_close MainHUD Persona would close the persona window.

/window_settings works the same

Zonx 12-13-2006 09:02 PM

Since virtually every window in the UI now uses the current frame nesting, its unlikely they will change it in a way that requires every window to have the same change.

However, they could easily implement some function that fires on close button press that wont be triggered if you close the window via script.

For example, there does seam to be some function call to save setting changes when manually moving windows or using the settings window that isn't triggered if you move a window via script.


All times are GMT -5. The time now is 04:52 AM.

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