EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   Window settings! (https://www.eq2interface.com/forums/showthread.php?t=12879)

samejima 05-16-2009 04:49 PM

Window settings!
 
Is there a way to change a window's settings with a button AND save it. So when you log in again it is still the same?

gm9 05-16-2009 05:38 PM

As far as there are /commands to do it the changes will save, but any property which you change via direct manipulation of the XML will only save after the user manipulates that window in whichever way (of course only insofar as said property is one that will be stored at all in the uisettings.xml).

samejima 05-16-2009 05:45 PM

Quote:

Originally Posted by gm9 (Post 83439)
As far as there are /commands to do it the changes will save, but any property which you change via direct manipulation of the XML will only save after the user manipulates that window in whichever way (of course only insofar as said property is one that will be stored at all in the uisettings.xml).

Come again sir?? Do you mean to say if there was a /command to change the window size etc it would save. Though at the moment there is no way to do it?

gm9 05-16-2009 06:35 PM

Basically yes, but of course there's a way to do it, I'd have thought you'd see it after I told you what I did! :D

Pure XML settings manipulations don't save because they do not set the changed flag of the window and thus the window settings do not get dumped to the uisettings file. However, there are at least two ways to set the changed flag. The "normal" one is user manipulation. However, since we know that properties changed via /commands are saved we conclude that those /commands also set the changed flag. After the changed flag is set the entire window settings are dumped to the uisettings.

Thus it follows that if you want to manipulate the window size you'd simply change the size attribute and then you'd toggle some window property via a /command, e.g. close/reopen or lock/unlock it.

samejima 05-16-2009 06:39 PM

Well as you know! I have plenty of experience opening and closing windows!! I will try that if it does not work prepared to be bugged again!

gm9 05-16-2009 07:16 PM

Functions I tested that worked included /window_close and /window_property lock|unlock.

PS: Yours will probably be the first mod ever to implement this trick I think, I don't think anyone is using it, and tbh I never thought of doing it this way either until a couple of months ago.

samejima 05-16-2009 09:28 PM

Edit I Am Dumb

samejima 05-16-2009 10:28 PM

Alright I give up, I get the window to close via!

window_close MainHUD DetrimentalEffects

It closes the window. Then I camp out, I come back in and it is still closed hopeful! I then show the window and the size is no different....

Code:

OnPress="Parent.Parent.Parent.DetrimentalEffects.Size=500,20
window_close MainHUD DetrimentalEffects"

The code I am using. If I can get this to work! So many options open up for what I want to do!

samejima 05-17-2009 02:28 AM

Logged out(for a while cooked dinner etc) came back deleted my button retyped it. No difference from what I can tell but seems to be working now!!! Thanks a ton sir!

Zonx 06-30-2009 06:39 PM

Not sure /hide_window will reliably force a save. You may have better luck using script to press the default close button.

samejima 07-01-2009 01:43 AM

Locking and unlocking the window is what I eventually ended up doing here is a snip it of my code.

Code:

OnPress="window_property unlock Custom RS_C2C
Parent.Parent.RS_C2C.Height=(COND ? 2 : 1) COND=(checked == true)
window_property lock Custom RS_C2C
Parent.CancelSpellCast.LocalText=COND"

That was some time ago though! Have you been on vacation? :P


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

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