EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Controlling in which direction window resizes? (https://www.eq2interface.com/forums/showthread.php?t=4836)

Agathorn 11-14-2005 10:17 PM

Controlling in which direction window resizes?
 
I am, through a script, resizing my parent window from a larger size to a smaller one and back to the larger one based on a button click. The basic window is designed to expand from larger window DOWN to a smaller window. However when I change the window size, the window resizes upwards, IE the window upper left never changes.

Is there any way to get the resize to work off say the bottom right instead of the upper left? I'm guessing there might be some pack setting that does this but all the pack stuff makes my head spin :p

Note i'm talking about resize taking place via script (setting the window's size value) NOT via user resizing.

Morpheusdead 11-14-2005 10:52 PM

I think maybe if you set all the child windows to pack location=bottom,right it might work but I am really not sure on that

Zonx 11-14-2005 10:58 PM

No "easy" way to do this. No there isn't any setting to control where the window anchors when resized. I submitted this feature request many months ago.

No there isn't any way to do math on the location string to offset the window. Also requested this feature.

The work around I came up with is to use a hidden dock window. Include a custom window matching the smaller size you want. Now give your resize script a line to set location to match the dock's location.

An example of this can be seen in the Fetish6WayInventory mod.

Agathorn 11-15-2005 10:04 AM

Quote:

Originally Posted by Zonx
No "easy" way to do this. No there isn't any setting to control where the window anchors when resized. I submitted this feature request many months ago.

No there isn't any way to do math on the location string to offset the window. Also requested this feature.

The work around I came up with is to use a hidden dock window. Include a custom window matching the smaller size you want. Now give your resize script a line to set location to match the dock's location.

An example of this can be seen in the Fetish6WayInventory mod.

Unfortunately since i'm docking part of the Inventory.Inventory window I don't think I can put the stuff into a seperate window due to hard coding (causes game crashes on drag/drops). What I ended up doing was simply keeping the full window size and adjusting the frame/background size to make it appear as though the window sized downwards. Not at all what I wanted but I guess I don't have a choice :(

Thanks for pointing out that I can't do any mathon the location to offset it because I woke up this morning thinking about trying that lol. I woulda been just butting my head against another wall I guess.

Oh well this works for now. Just lock the window and turn in clickthrough and it works really nice.

Thanks anyway :)

Zonx 11-17-2005 10:22 AM

The same "dock window" trick should work at any level. If you're docking a sub page of inventory.inventory, just make a hidden dummy page at the same lvl pre sized and positioned to the smaller settings, then have your script set the values equal to the dummy page.

Example

Inventory
|_ Inventory
| |_Equipment
| |_Dock2
|_Dock1

Say your Equipment page is 200x300 and you want it to resize down to 100x200 and shoved into the lower right corner.

You'd set the Dock2 page to 100x200 and positioned into the lower right corner.

Your script would be something like...
Code:

OnPress="parent.Equipment.size=parent.Dock2.size parent.Equipment.location=parent.Dock2.location"
If you also wanted inventory.inventory to resize and reposition, you'd use the same method on Dock1, sizing and positioning it where how you want the inventory.inventory window to end up, then using similar script to make the transformation.

Agathorn 11-17-2005 11:06 AM

Ah, I see what you are saying. Still use the same window, but have a dummy window that dictates the size and position of the main window.

Only problem I see with this is wouldn't that essentially be hardcoded? How would the user adjust the location of the dock unless I made the dummy window visible for positioning?

Zonx 11-18-2005 10:23 AM

Include a button in your main window to show the dock window. Make the dock user resizable and/or moveable.

Seriously, look at the Fetish6wayInventory mod ;)

Agathorn 11-18-2005 10:31 AM

Quote:

Originally Posted by Zonx
Include a button in your main window to show the dock window.

Yeah i'm thinking thats what i'm gogin to do. I was trying to keep it simple for the user, but as of right now the clickthrough feature is still kinda bugged (doiesn't save between sessions and has some input issues) so I guess I don't have much of a choice.

As for looking at Fetish.. well I just prefer to build things like this from the ground up if I can. I learn more that way.

Agathorn 11-18-2005 02:00 PM

Ok so I took a look at Fetish Nightfall. Not the code, but just loaded up and used the UI in game to see how it behaved. Slightly similiar to what i'm doing and I see how you did the whole docking window thing from the user perspective. Though what I noticed was that the collapse function rolls down the inventory similiar to what i'm doing but there was no dummy window that I could see, from the perspective of the user, that dictated where that ended up.

So I guess i'll take alook at the code and see what you did :)

Zonx 11-18-2005 04:34 PM

The collapse isn't actually resizing anything, it hides a taller subpage and shows the smaller subpage without changing parent window size.

However the zoom feature does actually change the window size and aligns it to a hidden dock window that can be shown and repositioned by the user with the "D" button ;)


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

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